diff --git a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml index fe3e1c170fce991454b0442d0613ad3247c067a4..2ca7ca4342fd211a5b6c9a7c883948bfd342570d 100644 --- a/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml +++ b/helm/capif/charts/ocf-helper/templates/ocf-helper-configmap.yaml @@ -26,4 +26,15 @@ data: {{- if .Values.capifConfiguration }} capif_configuration: {{ .Values.capifConfiguration | toYaml | nindent 6 }} - {{- end }} \ No newline at end of file + {{- end }} + + package_paths: { + "helper_api": { + "path": "/api", + "openapi_file": "api/openapi/openapi.yaml" + }, + "configuration_api": { + "path": "/configuration", + "openapi_file": "configuration/openapi/openapi.yaml" + } + } \ No newline at end of file diff --git a/services/docker-compose-capif.yml b/services/docker-compose-capif.yml index e021aa52c815819c8508dab50c5de0fc5f76a2a3..01a34a6c9d53eee9bf3b97b45693a25db4ff58f8 100644 --- a/services/docker-compose-capif.yml +++ b/services/docker-compose-capif.yml @@ -20,6 +20,7 @@ services: restart: unless-stopped volumes: - ${SERVICES_DIR}/helper/config.yaml:/usr/src/app/config.yaml + - ${SERVICES_DIR}/helper/helper_service/certs:/usr/src/app/helper_service/certs extra_hosts: - host.docker.internal:host-gateway - fluent-bit:host-gateway diff --git a/services/helper/config.yaml b/services/helper/config.yaml index 1efa369e54fb0a17672e0a8ff0fc54136c07fe74..2cf3193d4cff3c52c5c887db11721c3002e37dc6 100644 --- a/services/helper/config.yaml +++ b/services/helper/config.yaml @@ -1,23 +1,23 @@ -mongo: { - 'user': 'root', - 'password': 'example', - 'db': 'capif', - 'invoker_col': 'invokerdetails', - 'provider_col': 'providerenrolmentdetails', - 'col_services': "serviceapidescriptions", - 'col_security': "security", - 'col_event': "eventsdetails", - 'col_capif_configuration': "capif_configuration", - 'host': 'mongo', - 'port': "27017" -} +mongo: + user: root + password: example + db: capif + invoker_col: invokerdetails + provider_col: providerenrolmentdetails + col_services: serviceapidescriptions + col_security: security + col_event: eventsdetails + col_capif_configuration: capif_configuration + host: mongo + port: 27017 + + +ca_factory: + url: vault + port: 8200 + token: dev-only-token + verify: False -ca_factory: { - "url": "vault", - "port": "8200", - "token": "dev-only-token", - "verify": False -} capif_configuration: config_description: Default CAPIF Configuration @@ -36,3 +36,12 @@ capif_configuration: oauth: 1 pki: 2 psk: 3 + +package_paths: + helper_api: + path: /api + openapi_file: api/openapi/openapi.yaml + configuration_api: + path: /configuration + openapi_file: configuration/openapi/openapi.yaml + diff --git a/services/helper/helper_service/app.py b/services/helper/helper_service/app.py index 8525aa1ab09f629398313a20c80fd61164626e4f..88d918b93926a9cea8078bd8e32d1b11d61a7f3e 100644 --- a/services/helper/helper_service/app.py +++ b/services/helper/helper_service/app.py @@ -3,17 +3,31 @@ import logging import os import requests from config import Config -from controllers.helper_controller import helper_routes -from db.db import MongoDatabse +from pathlib import Path +from db.db import get_mongo +import connexion +import sys from flask import Flask from OpenSSL.crypto import FILETYPE_PEM, TYPE_RSA, PKey, X509Req, dump_certificate_request, dump_privatekey from asgiref.wsgi import WsgiToAsgi -app = Flask(__name__) +# --- Paths setup: make 'services' discoverable so "import api..." works --- +BASE_DIR = Path(__file__).resolve().parent +SERVICES_DIR = BASE_DIR / "services" + +# Insert services directory at front of sys.path +if SERVICES_DIR.is_dir(): + services_path_str = str(SERVICES_DIR) + if services_path_str not in sys.path: + sys.path.insert(0, services_path_str) +else: + raise RuntimeError(f"Services directory not found at {SERVICES_DIR!s}") + +app = connexion.App(__name__, specification_dir=str(SERVICES_DIR)) config = Config().get_config() # Connect MongoDB and get TTL for superadmin certificate -db = MongoDatabse() +db = get_mongo() capif_config = db.get_col_by_name("capif_configuration").find_one({}) ttl_superadmin_cert = capif_config["settings"]["certificates_expiry"].get("ttl_superadmin_cert", "43000h") @@ -77,7 +91,37 @@ cert_file = open("certs/ca_root.crt", 'wb') cert_file.write(bytes(ca_root, 'utf-8')) cert_file.close() -app.register_blueprint(helper_routes) -app.logger.setLevel(numeric_level) + +package_paths = config.get("package_paths", {}) + +if not package_paths: + logger.error("No package paths defined in configuration.") + raise Exception("No package paths defined in configuration.") + +# Dynamically add all APIs defined in package_paths +for name, pkg in package_paths.items(): + openapi_file = pkg.get("openapi_file") + base_path = pkg.get("path") + + if not openapi_file or not base_path: + logger.warning(f"Skipping package_path '{name}' because 'openapi_file' or 'path' is missing.") + continue + + # Build a readable title from the key, e.g. "helper_api" -> "Helper Api" + title = name.replace("_", " ").title() + + logger.info( + f"Adding API '{name}': openapi_file='{openapi_file}', base_path='{base_path}', title='{title}'" + ) + + app.add_api( + openapi_file, # relative to specification_dir (SERVICES_DIR) + arguments={"title": title}, + pythonic_params=True, + base_path=base_path + ) + + +app.app.logger.setLevel(numeric_level) asgi_app = WsgiToAsgi(app) \ No newline at end of file diff --git a/services/helper/helper_service/controllers/helper_controller.py b/services/helper/helper_service/controllers/helper_controller.py deleted file mode 100644 index 8d50f7c017e69be9afd62ac8bd1831c49cadc711..0000000000000000000000000000000000000000 --- a/services/helper/helper_service/controllers/helper_controller.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env python3 - -from config import Config -from core.helper_operations import HelperOperations -from flask import Blueprint, current_app, jsonify, request - -config = Config().get_config() - -helper_routes = Blueprint("helper_routes", __name__) -helper_operation = HelperOperations() - -@helper_routes.route("/helper/getInvokers", methods=["GET"]) -def getInvokers(): - uuid = request.args.get('uuid') - invoker_id = request.args.get('api_invoker_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - sort_order = request.args.get('sort_order') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"uuid: {uuid}, invoker_id: {invoker_id}, page: {page}, page_size: {page_size}, sort_order: {sort_order}") - - return helper_operation.get_invokers(uuid, invoker_id, page, page_size, sort_order) - -@helper_routes.route("/helper/getProviders", methods=["GET"]) -def getProviders(): - uuid = request.args.get('uuid') - provider_id = request.args.get('api_prov_dom_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - sort_order = request.args.get('sort_order') - - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"uuid: {uuid}, provider_id: {provider_id}, page: {page}, page_size: {page_size}, sort_order: {sort_order}") - - return helper_operation.get_providers(uuid, provider_id, page, page_size, sort_order) - - -@helper_routes.route("/helper/getServices", methods=["GET"]) -def getServices(): - service_id = request.args.get('service_id') - apf_id = request.args.get('apf_id') - api_name = request.args.get('api_name') - page_size = request.args.get('page_size') - page = request.args.get('page') - sort_order = request.args.get('sort_order') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"service_id: {service_id}, apf_id: {apf_id}, api_name: {api_name}, page: {page}, page_size: {page_size}, sort_order: {sort_order}") - - return helper_operation.get_services(service_id, apf_id, api_name, page, page_size, sort_order) - -@helper_routes.route("/helper/getSecurity", methods=["GET"]) -def getSecurity(): - invoker_id = request.args.get('invoker_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"invoker_id: {invoker_id}, page: {page}, page_size: {page_size} ") - - return helper_operation.get_security(invoker_id, page, page_size) - -@helper_routes.route("/helper/getEvents", methods=["GET"]) -def getEvents(): - subscriber_id = request.args.get('subscriber_id') - subscription_id = request.args.get('subscription_id') - page_size = request.args.get('page_size') - page = request.args.get('page') - if page_size: - page_size = int(page_size) - if page_size < 0: - return jsonify(message="The value of the page_size parameter must be greater than 0"), 400 - if page: - page = int(page) - if page < 0: - return jsonify(message="The value of the page parameter must be greater than 0"), 400 - - current_app.logger.debug(f"subscriber_id: {subscriber_id}, subscription_id: {subscription_id}, page: {page}, page_size: {page_size} ") - - return helper_operation.get_events(subscriber_id, subscription_id, page, page_size) - - -@helper_routes.route("/helper/deleteEntities/", methods=["DELETE"]) -def deleteUserEntities(uuid): - return helper_operation.remove_entities(uuid) - - -@helper_routes.route("/helper/getConfiguration", methods=["GET"]) -def getConfiguration(): - """Returns the current configuration""" - return helper_operation.get_configuration() - - -@helper_routes.route("/helper/updateConfigParam", methods=["PATCH"]) -def updateConfigParam(): - """Updates a single configuration parameter""" - data = request.json - param_path = data.get("param_path") - new_value = data.get("new_value") - - if not param_path or new_value is None: - return jsonify(message="Missing 'param_path' or 'new_value' in request body"), 400 - - return helper_operation.update_config_param(param_path, new_value) - - -@helper_routes.route("/helper/replaceConfiguration", methods=["PUT"]) -def replaceConfiguration(): - """Replaces the entire configuration with a new one""" - new_config = request.json - if not new_config: - return jsonify(message="Missing new configuration in request body"), 400 - - return helper_operation.replace_configuration(new_config) - - -@helper_routes.route("/helper/addNewConfiguration", methods=["POST"]) -def add_new_configuration(): - """Adds a new category inside 'settings'.""" - data = request.json - category_name = data.get("category_name") - category_values = data.get("category_values") - - if not category_name or not category_values: - return jsonify(message="Missing 'category_name' or 'category_values' in request body"), 400 - - return helper_operation.add_new_configuration(category_name, category_values) - -@helper_routes.route("/helper/addNewConfigSetting", methods=["PATCH"]) -def add_new_config_setting(): - """Adds a new configuration inside 'settings'.""" - data = request.json - param_path = data.get("param_path") - new_value = data.get("new_value") - - if not param_path or new_value is None: - return jsonify(message="Missing 'param_path' or 'new_value' in request body"), 400 - - return helper_operation.add_new_config_setting(param_path, new_value) - - -@helper_routes.route("/helper/removeConfigParam", methods=["DELETE"]) -def remove_config_param(): - """Deletes a specific parameter inside 'settings'.""" - data = request.json - param_path = data.get("param_path") - - if not param_path: - return jsonify(message="Missing 'param_path' in request body"), 400 - - return helper_operation.remove_config_param(param_path) - - -@helper_routes.route("/helper/removeConfigCategory", methods=["DELETE"]) -def remove_config_category(): - """Deletes an entire category inside 'settings'.""" - data = request.json - category_name = data.get("category_name") - - if not category_name: - return jsonify(message="Missing 'category_name' in request body"), 400 - - return helper_operation.remove_config_category(category_name) - - -@helper_routes.route("/helper/getCcfId", methods=["GET"]) -def get_ccf_id(): - """Returns the current CAPIF ccfId""" - return helper_operation.get_ccf_id() diff --git a/services/helper/helper_service/db/db.py b/services/helper/helper_service/db/db.py index 30c25e8bbb7cd4b25740647f235beec7c887373d..757933d39fb555c8a71dcedb4e893379276b35cb 100644 --- a/services/helper/helper_service/db/db.py +++ b/services/helper/helper_service/db/db.py @@ -1,5 +1,6 @@ import time import secrets +from threading import Lock from bson.codec_options import CodecOptions from config import Config @@ -9,7 +10,26 @@ from pymongo.errors import AutoReconnect class MongoDatabse(): - def __init__(self): + _instance = None + _lock = Lock() + + def __new__(cls): + if cls._instance is None: + with cls._lock: + if cls._instance is None: # double-checked + cls._instance = super().__new__(cls) + cls._instance._init_once() + return cls._instance + + def close(self): + if getattr(self, "_client", None): + self._client.close() + self._client = None + + def get_col_by_name(self, name): + return self.db[name].with_options(codec_options=CodecOptions(tz_aware=True)) + + def _init_once(self): self.config = Config().get_config() self.db = self.__connect() self.invoker_col = self.config['mongo']['invoker_col'] @@ -78,3 +98,9 @@ class MongoDatabse(): print("Capif_configuration already contains data with a unique ccf_id. No default values inserted.") +_singleton = None +def get_mongo(): + global _singleton + if _singleton is None: + _singleton = MongoDatabse() + return _singleton \ No newline at end of file diff --git a/services/helper/helper_service/generate.sh b/services/helper/helper_service/generate.sh new file mode 100755 index 0000000000000000000000000000000000000000..7c67dacb7eeaf1c1f23ab5b165316642e81f162f --- /dev/null +++ b/services/helper/helper_service/generate.sh @@ -0,0 +1,62 @@ +#!/bin/bash +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + echo "Example: $0 openapi/auth.yaml auth" + exit 1 +fi + +YAML_PATH="$1" +SERVICE_NAME="$2" +SERVICE_DIR="services/$SERVICE_NAME" + +# Clean previous service folder if it exists +rm -rf "$SERVICE_DIR" + +# Generate the service using OpenAPI Generator +openapi-generator generate \ + -i "$YAML_PATH" \ + -g python-flask \ + -o "$SERVICE_DIR" \ + --additional-properties=packageName="$SERVICE_NAME" + +# Move generated inner folder to the root of the service directory +if [ -d "$SERVICE_DIR/$SERVICE_NAME" ]; then + mv "$SERVICE_DIR/$SERVICE_NAME"/* "$SERVICE_DIR"/ + rm -rf "$SERVICE_DIR/$SERVICE_NAME" +fi + +# Files to delete +FILES_TO_DELETE=( + ".dockerignore" + ".gitignore" + ".openapi-generator-ignore" + ".travis.yml" + "Dockerfile" + "git_push.sh" + "README.md" + "requirements.txt" + "setup.py" + "test-requirements.txt" + "tox.ini" +) + +# Directories to delete +DIRS_TO_DELETE=( + ".openapi-generator" + ".github" + "test" + "docs" +) + +# Remove unnecessary files and folders +for file in "${FILES_TO_DELETE[@]}"; do + rm -f "$SERVICE_DIR/$file" +done + +for dir in "${DIRS_TO_DELETE[@]}"; do + rm -rf "$SERVICE_DIR/$dir" +done + +echo "✅ Service '$SERVICE_NAME' successfully generated from '$YAML_PATH'" diff --git a/services/helper/helper_service/openapi_helper_api.yaml b/services/helper/helper_service/openapi_helper_api.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c6cd3412ee0914410c4314e314af569de246f858 --- /dev/null +++ b/services/helper/helper_service/openapi_helper_api.yaml @@ -0,0 +1,1404 @@ +openapi: 3.0.1 +info: + title: Helper API + version: "1.0.0" + description: | + CAPIF Helper API for browsing CAPIF runtime data: invokers, providers, services, + security bindings, and subscriptions/events. This is an internal helper interface. +servers: + - url: "{apiRoot}/api" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /deleteEntities/{uuid}: + delete: + summary: Delete entities by UUID + description: Deletes all CAPIF entities (invokers, providers, services, security contexts, events) associated with the given UUID. + operationId: helper_controller.delete_entities + parameters: + - name: uuid + in: path + required: true + schema: + type: string + description: UUID of the user whose entities are to be deleted. + responses: + '200': + description: Entities deleted successfully. + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getCcfId: + get: + summary: Get CCF ID + description: Retrieves the CCF ID of the CAPIF Core Function. + operationId: helper_controller.get_ccf_id + responses: + '200': + description: CCF ID retrieved successfully. + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getInvokers: + get: + summary: Retrieve API invokers + description: Returns invoker entries with pagination and optional filters. + operationId: helper_controller.get_invokers + parameters: + - name: uuid + in: query + schema: + type: string + description: Filter by invoker UUID. + - name: api_invoker_id + in: query + schema: + type: string + description: Filter by CAPIF `apiInvokerId`. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + - name: sort_order + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. + responses: + '200': + description: Paged list of invokers. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseInvoker' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getProviders: + get: + summary: Retrieve providers + description: Returns provider domains (CAPIF provider domains / AEF providers) with pagination. + operationId: helper_controller.get_providers + parameters: + - name: uuid + in: query + schema: + type: string + description: Filter by provider UUID. + - name: api_prov_dom_id + in: query + schema: + type: string + description: Filter by provider domain ID. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + - name: sort_order + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. + responses: + '200': + description: Paged list of providers. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseProvider' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getServices: + get: + summary: Retrieve services + description: Returns published APIs/services exposed by providers. + operationId: helper_controller.get_services + parameters: + - name: service_id + in: query + schema: + type: string + description: Filter by service identifier. + - name: apf_id + in: query + schema: + type: string + description: Filter by APF identifier. + - name: api_name + in: query + schema: + type: string + description: Filter by API name. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + - name: sort_order + in: query + schema: + type: string + enum: + - asc + - desc + description: Sort direction. + responses: + '200': + description: Paged list of services. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseService' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getSecurity: + get: + summary: Retrieve security associations + description: Returns security credentials/bindings for a given invoker. + operationId: helper_controller.get_security + parameters: + - name: invoker_id + in: query + schema: + type: string + description: Filter by invoker identifier. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + responses: + '200': + description: Paged list of security entries. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseSecurity' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /getEvents: + get: + summary: Retrieve CAPIF events + description: Returns CAPIF event subscriptions or delivered events. + operationId: helper_controller.get_events + parameters: + - name: subscriber_id + in: query + schema: + type: string + description: Filter by subscriber identifier. + - name: subscription_id + in: query + schema: + type: string + description: Filter by subscription identifier. + - name: page_size + in: query + schema: + type: integer + minimum: 1 + default: 20 + description: Page size. + - name: page + in: query + schema: + type: integer + minimum: 0 + default: 0 + description: Page index (0-based). + responses: + '200': + description: Paged list of events. + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseEvent' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' +components: + responses: + BadRequest: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + InternalError: + description: Internal server error. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + GenericError: + description: Generic error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + schemas: + ErrorResponse: + type: object + description: Generic error payload. + properties: + message: + type: string + details: + type: string + PaginatedResponseBase: + type: object + description: Common pagination envelope. + properties: + total: + type: integer + example: 42 + description: Total number of resources in CAPIF. + long: + type: integer + example: 0 + description: Total number of resources that match the given parameters + totalPages: + type: integer + example: 20 + description: Total number of pages given page size. + sort_order: + type: string + enum: + - asc + - desc + example: asc + description: Sorting by creation date of the resources (ascending or descending). + PaginatedResponseInvoker: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + invokers: + description: CAPIF invokers list + type: array + items: + $ref: '#/components/schemas/APIInvokerEnrolmentDetails' + PaginatedResponseProvider: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + providers: + description: CAPIF providers list + type: array + items: + $ref: '#/components/schemas/APIProviderEnrolmentDetails' + PaginatedResponseService: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + services: + description: CAPIF services list. + type: array + items: + $ref: '#/components/schemas/ServiceAPIDescription' + PaginatedResponseSecurity: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + security: + description: CAPIF security context list. + type: array + items: + $ref: '#/components/schemas/ServiceSecurity' + PaginatedResponseEvent: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - type: object + properties: + events: + description: CAPIF events list. + type: array + items: + $ref: '#/components/schemas/EventSubscription' + APIInvokerEnrolmentDetails: + required: + - notificationDestination + - onboardingInformation + type: object + properties: + onboarding_date: + type: string + description: Invoker onboarding date + format: date-time + username: + type: string + description: User who registered the invoker + uuid: + type: string + description: uuid of the user who registered the invoker + format: uuid + apiInvokerId: + type: string + description: | + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + onboardingInformation: + $ref: '#/components/schemas/OnboardingInformation' + notificationDestination: + $ref: '#/components/schemas/Uri' + requestTestNotification: + type: boolean + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + apiList: + $ref: '#/components/schemas/APIList' + apiInvokerInformation: + type: string + description: | + Generic information related to the API invoker such as details of the device or the application. + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + description: Information about the API Invoker that requested to onboard + APIProviderEnrolmentDetails: + required: + - regSec + type: object + properties: + onboarding_date: + type: string + description: Provider onboarding date + format: date-time + username: + type: string + description: User who registered the provider + uuid: + type: string + description: uuid of the user who registered the provider + format: uuid + apiProvDomId: + type: string + description: | + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + regSec: + type: string + description: | + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. + apiProvFuncs: + minItems: 1 + type: array + description: | + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. + items: + $ref: '#/components/schemas/APIProviderFunctionDetails' + apiProvDomInfo: + type: string + description: | + Generic information related to the API provider domain such as details of the API provider applications. + suppFeat: + $ref: '#/components/schemas/SupportedFeatures' + failReason: + type: string + description: | + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. + description: Represents an API provider domain's enrolment details. + ServiceSecurity: + required: + - notificationDestination + - securityInfo + type: object + properties: + api_invoker_id: + type: string + description: Id of the invoker of this security context. + securityInfo: + minimum: 1 + type: array + items: + $ref: '#/components/schemas/SecurityInformation' + notificationDestination: + $ref: '#/components/schemas/Uri' + requestTestNotification: + type: boolean + description: | + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + description: | + Represents the details of the security method for each service API interface. When included by the API invoker, it indicates the preferred method of security. When included by the CAPIF core function, it indicates the security method to be used for the service API interface. + SecurityInformation: + required: + - prefSecurityMethods + type: object + properties: + interfaceDetails: + $ref: '#/components/schemas/InterfaceDescription' + aefId: + type: string + description: Identifier of the API exposing function + apiId: + type: string + description: API identifier + prefSecurityMethods: + minItems: 1 + type: array + description: Security methods preferred by the API invoker for the API interface. + items: + $ref: '#/components/schemas/SecurityMethod' + selSecurityMethod: + $ref: '#/components/schemas/SecurityMethod' + authenticationInfo: + type: string + description: Authentication related information + authorizationInfo: + type: string + description: Authorization related information + description: Represents the interface details and the security method. + oneOf: + - required: + - interfaceDetails + - required: + - aefId + EventSubscription: + required: + - events + - notificationDestination + type: object + properties: + events: + minItems: 1 + type: array + description: Subscribed events + items: + $ref: '#/components/schemas/CAPIFEvent' + eventFilters: + minItems: 1 + type: array + description: Subscribed event filters + items: + $ref: '#/components/schemas/CAPIFEventFilter' + eventReq: + $ref: '#/components/schemas/ReportingInformation' + notificationDestination: + $ref: '#/components/schemas/Uri' + requestTestNotification: + type: boolean + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + description: Represents an individual CAPIF Event Subscription resource. + OnboardingInformation: + required: + - apiInvokerPublicKey + type: object + properties: + apiInvokerPublicKey: + type: string + description: The API Invoker's public key + apiInvokerCertificate: + type: string + description: | + The API Invoker's generic client certificate, provided by the CAPIF core function. + onboardingSecret: + type: string + description: | + The API Invoker's onboarding secret, provided by the CAPIF core function. + description: Represents on-boarding information of the API invoker. + APIProviderFunctionDetails: + required: + - apiProvFuncRole + - regInfo + type: object + properties: + apiProvFuncId: + type: string + description: | + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. + regInfo: + $ref: '#/components/schemas/RegistrationInformation' + apiProvFuncRole: + $ref: '#/components/schemas/ApiProviderFuncRole' + apiProvFuncInfo: + type: string + description: | + Generic information related to the API provider domain function such as details of the API provider applications. + description: Represents API provider domain function's details. + ApiProviderFuncRole: + description: | + Possible values are: + - AEF: API provider function is API Exposing Function. + - APF: API provider function is API Publishing Function. + - AMF: API Provider function is API Management Function. + anyOf: + - type: string + enum: + - AEF + - APF + - AMF + - type: string + description: | + This string provides forward-compatiblity with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + RegistrationInformation: + required: + - apiProvPubKey + type: object + properties: + apiProvPubKey: + type: string + description: Public Key of API Provider domain function. + apiProvCert: + type: string + description: API provider domain function's client certificate + description: | + Represents registration information of an individual API provider domain function. + APIList: + type: object + properties: + serviceAPIDescriptions: + minItems: 1 + type: array + description: The list of service APIs that the API Invoker is allowed to invoke. + items: + $ref: '#/components/schemas/ServiceAPIDescription' + description: Represents a list of APIs. + Uri: + type: string + description: string providing an URI formatted according to IETF RFC 3986. + WebsockNotifConfig: + type: object + properties: + websocketUri: + $ref: '#/components/schemas/Link' + requestWebsocketUri: + type: boolean + description: Set by the SCS/AS to indicate that the Websocket delivery is requested. + description: Represents the configuration information for the delivery of notifications over Websockets. + Link: + type: string + description: string formatted according to IETF RFC 3986 identifying a referenced resource. + SupportedFeatures: + pattern: "^[A-Fa-f0-9]*$" + type: string + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + ServiceAPIDescription: + required: + - apiName + type: object + properties: + apiName: + type: string + description: "API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122." + apiId: + type: string + description: | + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). + aefProfiles: + minItems: 1 + type: array + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). + items: + $ref: '#/components/schemas/AefProfile' + description: + type: string + description: Text description of the API + supportedFeatures: + $ref: '#/components/schemas/SupportedFeatures' + shareableInfo: + $ref: '#/components/schemas/ShareableInformation' + serviceAPICategory: + type: string + apiSuppFeats: + $ref: '#/components/schemas/SupportedFeatures' + pubApiPath: + $ref: '#/components/schemas/PublishedApiPath' + ccfId: + type: string + description: CAPIF core function identifier. + description: Represents the description of a service API as published by the APF. + AefProfile: + required: + - aefId + - versions + type: object + properties: + aefId: + type: string + description: Identifier of the API exposing function + versions: + minItems: 1 + type: array + description: API version + items: + $ref: '#/components/schemas/Version' + protocol: + $ref: '#/components/schemas/Protocol' + dataFormat: + $ref: '#/components/schemas/DataFormat' + securityMethods: + minItems: 1 + type: array + description: Security methods supported by the AEF + items: + $ref: '#/components/schemas/SecurityMethod' + domainName: + type: string + description: Domain to which API belongs to + interfaceDescriptions: + minItems: 1 + type: array + description: Interface details + items: + $ref: '#/components/schemas/InterfaceDescription' + aefLocation: + $ref: '#/components/schemas/AefLocation' + description: Represents the AEF profile data. + oneOf: + - required: + - domainName + - required: + - interfaceDescriptions + ShareableInformation: + required: + - isShareable + type: object + properties: + isShareable: + type: boolean + description: | + Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + capifProvDoms: + minItems: 1 + type: array + description: | + List of CAPIF provider domains to which the service API information to be shared. + items: + type: string + description: | + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domains. + PublishedApiPath: + type: object + properties: + ccfIds: + minItems: 1 + type: array + description: A list of CCF identifiers where the service API is already published. + items: + type: string + description: Represents the published API path within the same CAPIF provider domain. + Version: + required: + - apiVersion + type: object + properties: + apiVersion: + type: string + description: API major version in URI (e.g. v1) + expiry: + $ref: '#/components/schemas/DateTime' + resources: + minItems: 1 + type: array + description: Resources supported by the API. + items: + $ref: '#/components/schemas/Resource' + custOperations: + minItems: 1 + type: array + description: Custom operations without resource association. + items: + $ref: '#/components/schemas/CustomOperation' + description: Represents the API version information. + Protocol: + description: | + Possible values are: + - HTTP_1_1: HTTP version 1.1 + - HTTP_2: HTTP version 2 + anyOf: + - type: string + enum: + - HTTP_1_1 + - HTTP_2 + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + DataFormat: + description: | + Possible values are: + - JSON: JavaScript Object Notation + anyOf: + - type: string + enum: + - JSON + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + SecurityMethod: + description: | + Possible values are: + - PSK: Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122 + - PKI: Security method 2 (Using PKI) as described in 3GPP TS 33.122 + - OAUTH: Security method 3 (TLS with OAuth token) as described in 3GPP TS 33.122 + anyOf: + - type: string + enum: + - PSK + - PKI + - OAUTH + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + Resource: + required: + - commType + - resourceName + - uri + type: object + properties: + resourceName: + type: string + description: Resource name + commType: + $ref: '#/components/schemas/CommunicationType' + uri: + type: string + description: | + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + custOpName: + type: string + description: | + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. + operations: + minItems: 1 + type: array + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + description: + type: string + description: Text description of the API resource + description: Represents the API resource data. + CustomOperation: + required: + - commType + - custOpName + type: object + properties: + commType: + $ref: '#/components/schemas/CommunicationType' + custOpName: + type: string + description: | + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. + operations: + minItems: 1 + type: array + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + description: + type: string + description: Text description of the custom operation + description: Represents the description of a custom operation. + CommunicationType: + description: | + Possible values are: + - REQUEST_RESPONSE: The communication is of the type request-response + - SUBSCRIBE_NOTIFY: The communication is of the type subscribe-notify + anyOf: + - type: string + enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + Operation: + description: | + Possible values are: + - GET: HTTP GET method + - POST: HTTP POST method + - PUT: HTTP PUT method + - PATCH: HTTP PATCH method + - DELETE: HTTP DELETE method + anyOf: + - type: string + enum: + - GET + - POST + - PUT + - PATCH + - DELETE + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + InterfaceDescription: + type: object + properties: + ipv4Addr: + $ref: '#/components/schemas/Ipv4Addr' + ipv6Addr: + $ref: '#/components/schemas/Ipv6Addr' + port: + $ref: '#/components/schemas/Port' + securityMethods: + minItems: 1 + type: array + description: | + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. + items: + $ref: '#/components/schemas/SecurityMethod' + description: Represents the description of an API's interface. + oneOf: + - required: + - ipv4Addr + - required: + - ipv6Addr + Ipv4Addr: + type: string + description: string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166. + Ipv6Addr: + type: string + description: string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. + Port: + maximum: 65535 + minimum: 0 + type: integer + description: Unsigned integer with valid values between 0 and 65535. + AefLocation: + type: object + properties: + civicAddr: + $ref: '#/components/schemas/CivicAddress' + geoArea: + $ref: '#/components/schemas/GeographicArea' + dcId: + type: string + description: | + Identifies the data center where the AEF providing the service API is located. + description: | + The location information (e.g. civic address, GPS coordinates, data center ID) where the AEF providing the service API is located. + DateTime: + type: string + description: string with format "date-time" as defined in OpenAPI. + format: date-time + CivicAddress: + type: object + properties: + country: + type: string + A1: + type: string + A2: + type: string + A3: + type: string + A4: + type: string + A5: + type: string + A6: + type: string + PRD: + type: string + POD: + type: string + STS: + type: string + HNO: + type: string + HNS: + type: string + LMK: + type: string + LOC: + type: string + NAM: + type: string + PC: + type: string + BLD: + type: string + UNIT: + type: string + FLR: + type: string + ROOM: + type: string + PLC: + type: string + PCN: + type: string + POBOX: + type: string + ADDCODE: + type: string + SEAT: + type: string + RD: + type: string + RDSEC: + type: string + RDBR: + type: string + RDSUBBR: + type: string + PRM: + type: string + POM: + type: string + usageRules: + type: string + method: + type: string + providedBy: + type: string + description: Indicates a Civic address. + GeographicArea: + description: Geographic area specified by different shape. + anyOf: + - $ref: '#/components/schemas/Point' + - $ref: '#/components/schemas/PointUncertaintyCircle' + - $ref: '#/components/schemas/PointUncertaintyEllipse' + - $ref: '#/components/schemas/Polygon' + - $ref: '#/components/schemas/PointAltitude' + - $ref: '#/components/schemas/PointAltitudeUncertainty' + - $ref: '#/components/schemas/EllipsoidArc' + Point: + description: Ellipsoid Point. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - point + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + GADShape: + required: + - shape + type: object + properties: + shape: + $ref: '#/components/schemas/SupportedGADShapes' + description: Common base type for GAD shapes. + discriminator: + propertyName: shape + mapping: + POINT: '#/components/schemas/Point' + POINT_UNCERTAINTY_CIRCLE: '#/components/schemas/PointUncertaintyCircle' + POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/PointUncertaintyEllipse' + POLYGON: '#/components/schemas/Polygon' + POINT_ALTITUDE: '#/components/schemas/PointAltitude' + POINT_ALTITUDE_UNCERTAINTY: '#/components/schemas/PointAltitudeUncertainty' + ELLIPSOID_ARC: '#/components/schemas/EllipsoidArc' + LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/Local2dPointUncertaintyEllipse' + LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID: '#/components/schemas/Local3dPointUncertaintyEllipsoid' + GeographicalCoordinates: + required: + - lat + - lon + type: object + properties: + lon: + maximum: 180 + minimum: -180 + type: number + format: double + lat: + maximum: 90 + minimum: -90 + type: number + format: double + description: Geographical coordinates. + SupportedGADShapes: + description: Indicates supported GAD shapes. + anyOf: + - type: string + enum: + - POINT + - POINT_UNCERTAINTY_CIRCLE + - POINT_UNCERTAINTY_ELLIPSE + - POLYGON + - POINT_ALTITUDE + - POINT_ALTITUDE_UNCERTAINTY + - ELLIPSOID_ARC + - LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE + - LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID + - type: string + PointUncertaintyCircle: + description: Ellipsoid point with uncertainty circle. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - point + - uncertainty + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertainty: + $ref: '#/components/schemas/Uncertainty' + Uncertainty: + minimum: 0 + type: number + description: Indicates value of uncertainty. + format: float + PointUncertaintyEllipse: + description: Ellipsoid point with uncertainty ellipse. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - confidence + - point + - uncertaintyEllipse + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + confidence: + $ref: '#/components/schemas/Confidence' + UncertaintyEllipse: + required: + - orientationMajor + - semiMajor + - semiMinor + type: object + properties: + semiMajor: + $ref: '#/components/schemas/Uncertainty' + semiMinor: + $ref: '#/components/schemas/Uncertainty' + orientationMajor: + $ref: '#/components/schemas/Orientation' + description: Ellipse with uncertainty. + Confidence: + maximum: 100 + minimum: 0 + type: integer + description: Indicates value of confidence. + Orientation: + maximum: 180 + minimum: 0 + type: integer + description: Indicates value of orientation angle. + Polygon: + description: Polygon. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - pointList + type: object + properties: + pointList: + $ref: '#/components/schemas/PointList' + PointList: + maxItems: 15 + minItems: 3 + type: array + description: List of points. + items: + $ref: '#/components/schemas/GeographicalCoordinates' + PointAltitude: + description: Ellipsoid point with altitude. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - altitude + - point + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + Altitude: + maximum: 32767 + minimum: -32767 + type: number + description: Indicates value of altitude. + format: double + PointAltitudeUncertainty: + description: Ellipsoid point with altitude and uncertainty ellipsoid. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - altitude + - confidence + - point + - uncertaintyAltitude + - uncertaintyEllipse + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + uncertaintyAltitude: + $ref: '#/components/schemas/Uncertainty' + confidence: + $ref: '#/components/schemas/Confidence' + EllipsoidArc: + description: Ellipsoid Arc. + allOf: + - $ref: '#/components/schemas/GADShape' + - required: + - confidence + - includedAngle + - innerRadius + - offsetAngle + - point + - uncertaintyRadius + type: object + properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + innerRadius: + $ref: '#/components/schemas/InnerRadius' + uncertaintyRadius: + $ref: '#/components/schemas/Uncertainty' + offsetAngle: + $ref: '#/components/schemas/Angle' + includedAngle: + $ref: '#/components/schemas/Angle' + confidence: + $ref: '#/components/schemas/Confidence' + InnerRadius: + maximum: 327675 + minimum: 0 + type: integer + description: Indicates value of the inner radius. + format: int32 + Angle: + maximum: 360 + minimum: 0 + type: integer + description: Indicates value of angle. + CAPIFEvent: + description: | + Possible values are: + - SERVICE_API_AVAILABLE: Events related to the availability of service APIs after the service APIs are published. + - SERVICE_API_UNAVAILABLE: Events related to the unavailability of service APIs after the service APIs are unpublished. + - SERVICE_API_UPDATE: Events related to change in service API information. + - API_INVOKER_ONBOARDED: Events related to API invoker onboarded to CAPIF. + - API_INVOKER_OFFBOARDED: Events related to API invoker offboarded from CAPIF. + - SERVICE_API_INVOCATION_SUCCESS: Events related to the successful invocation of service APIs. + - SERVICE_API_INVOCATION_FAILURE: Events related to the failed invocation of service APIs. + - ACCESS_CONTROL_POLICY_UPDATE: Events related to the update for the access control policy related to the service APIs. + - ACCESS_CONTROL_POLICY_UNAVAILABLE: Events related to the unavailability of the access control policy related to the service APIs. + - API_INVOKER_AUTHORIZATION_REVOKED: Events related to the revocation of the authorization of API invokers to access the service APIs. + - API_INVOKER_UPDATED: Events related to API invoker profile updated to CAPIF. + - API_TOPOLOGY_HIDING_CREATED: Events related to the creation or update of the API topology hiding information of the service APIs after the service APIs are published. + - API_TOPOLOGY_HIDING_REVOKED: Events related to the revocation of the API topology hiding information of the service APIs after the service APIs are unpublished. + anyOf: + - type: string + enum: + - SERVICE_API_AVAILABLE + - SERVICE_API_UNAVAILABLE + - SERVICE_API_UPDATE + - API_INVOKER_ONBOARDED + - API_INVOKER_OFFBOARDED + - SERVICE_API_INVOCATION_SUCCESS + - SERVICE_API_INVOCATION_FAILURE + - ACCESS_CONTROL_POLICY_UPDATE + - ACCESS_CONTROL_POLICY_UNAVAILABLE + - API_INVOKER_AUTHORIZATION_REVOKED + - API_INVOKER_UPDATED + - API_TOPOLOGY_HIDING_CREATED + - API_TOPOLOGY_HIDING_REVOKED + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + CAPIFEventFilter: + type: object + properties: + apiIds: + minItems: 1 + type: array + description: Identifier of the service API + items: + type: string + apiInvokerIds: + minItems: 1 + type: array + description: Identity of the API invoker + items: + type: string + aefIds: + minItems: 1 + type: array + description: Identifier of the API exposing function + items: + type: string + description: Represents a CAPIF event filter. + ReportingInformation: + type: object + properties: + immRep: + type: boolean + notifMethod: + $ref: '#/components/schemas/NotificationMethod' + maxReportNbr: + $ref: '#/components/schemas/Uinteger' + monDur: + $ref: '#/components/schemas/DateTime' + repPeriod: + $ref: '#/components/schemas/DurationSec' + sampRatio: + $ref: '#/components/schemas/SamplingRatio' + partitionCriteria: + minItems: 1 + type: array + description: Criteria for partitioning the UEs before applying the sampling ratio. + items: + $ref: '#/components/schemas/PartitioningCriteria' + grpRepTime: + $ref: '#/components/schemas/DurationSec' + notifFlag: + $ref: '#/components/schemas/NotificationFlag' + description: Represents the type of reporting that the subscription requires. + NotificationMethod: + description: | + Possible values are: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + anyOf: + - type: string + enum: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + Uinteger: + minimum: 0 + type: integer + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." + DurationSec: + type: integer + description: indicating a time in seconds. + SamplingRatio: + maximum: 100 + minimum: 1 + type: integer + description: "Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent. \n" + PartitioningCriteria: + description: | + Possible values are: + - "TAC": Type Allocation Code + - "SUBPLMN": Subscriber PLMN ID + - "GEOAREA": Geographical area, i.e. list(s) of TAI(s) + - "SNSSAI": S-NSSAI + - "DNN": DNN + anyOf: + - type: string + enum: + - TAC + - SUBPLMN + - GEOAREA + - SNSSAI + - DNN + - type: string + description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + NotificationFlag: + description: |- + Possible values are: + - ACTIVATE: The event notification is activated. + - DEACTIVATE: The event notification is deactivated and shall be muted. The available + event(s) shall be stored. + - RETRIEVAL: The event notification shall be sent to the NF service consumer(s), + after that, is muted again. + anyOf: + - type: string + enum: + - ACTIVATE + - DEACTIVATE + - RETRIEVAL + - type: string + description: "This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. \n" + diff --git a/services/helper/helper_service/openapi_helper_configuration.yaml b/services/helper/helper_service/openapi_helper_configuration.yaml new file mode 100644 index 0000000000000000000000000000000000000000..55698cb29324bac4783f8c2b633b92de7e416677 --- /dev/null +++ b/services/helper/helper_service/openapi_helper_configuration.yaml @@ -0,0 +1,305 @@ +openapi: 3.0.1 +info: + title: Helper Configuration API + version: "1.0.0" + description: | + CAPIF Helper Configuration API. Allows reading and modifying the runtime configuration + stored in MongoDB (ACL policy, certificate expiration, security priorities, etc). +servers: + - url: "{apiRoot}/configuration" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /getConfiguration: + get: + summary: Read full configuration + description: Returns the entire CAPIF configuration document. + operationId: configuration_controller.get_configuration + responses: + '200': + description: Current configuration + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /updateConfigParam: + patch: + summary: Update single config parameter + description: Updates a single setting inside the configuration using a dotted path selector. + operationId: dynamic_config_controller.update_config_param + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + responses: + '200': + description: Parameter updated + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /replaceConfiguration: + put: + summary: Replace entire configuration + description: Replaces the configuration document with a new one. + operationId: dynamic_config_controller.replace_configuration + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + responses: + '200': + description: Updated configuration + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /addNewConfiguration: + post: + summary: Add new config setting at path + description: Adds a new key/value inside an existing category using "param_path" and "new_value". + operationId: dynamic_config_controller.add_new_config_setting + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + responses: + '200': + description: Setting added + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /addNewConfigSetting: + patch: + summary: Add new configuration category + description: Adds a brand new top-level category. + operationId: dynamic_config_controller.add_new_configuration + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigCategoryCreateRequest' + responses: + '200': + description: Category added + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /removeConfigParam: + delete: + summary: Remove config parameter + description: Deletes a leaf parameter by dotted path. + operationId: dynamic_config_controller.remove_config_param + parameters: + - name: param_path + in: query + required: true + schema: + type: string + description: Parameter path to remove + responses: + '200': + description: Parameter removed + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' + /removeConfigCategory: + delete: + summary: Remove configuration category + description: Deletes an entire top-level category by name. + operationId: dynamic_config_controller.remove_config_category + parameters: + - name: config_path + in: query + required: true + schema: + type: string + description: Configuration path to remove + responses: + '200': + description: Category removed + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalError' + default: + $ref: '#/components/responses/GenericError' +components: + responses: + BadRequest: + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + InternalError: + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + GenericError: + description: Generic error response + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + schemas: + CapifConfiguration: + type: object + additionalProperties: true + description: CAPIF runtime configuration document. + properties: + config_name: + type: string + example: default + description: Configuration name + version: + type: string + example: 1.0 + description: configuration version + settings: + type: object + items: + $ref: '#/components/schemas/Settings' + ConfigParamUpdateRequest: + type: object + required: + - param_path + - new_value + properties: + param_path: + type: string + description: Dotted path to the configuration value to update. + new_value: + description: New value for the configuration parameter. + ConfigCategoryCreateRequest: + type: object + required: + - category_name + - category_values + properties: + category_name: + type: string + description: Name of the new configuration category. + category_values: + type: object + additionalProperties: true + description: Key/value pairs that compose the new category. + GenericError: + type: object + properties: + code: + type: string + message: + type: string + required: + - code + - message + Settings: + type: object + description: Configuration Settings + properties: + certificates_expiry: + type: object + description: Expiry configuration for certificates + properties: + ttl_superadmin_cert: + type: string + example: 4300h + description: ttl for superadmin certificates + ttl_invoker_cert: + type: string + example: 4300h + description: ttl for invoker certificates + ttl_provider_cert: + type: string + example: 4300h + description: ttl for provider certificates + security_method_priority: + type: object + description: priority to follow in granting the security method + properties: + oauth: + type: integer + example: 1 + pki: + type: integer + example: 2 + psk: + type: integer + example: 3 + acl_policy_settings: + type: object + description: default access policies + properties: + allowed_total_invocations: + type: string + example: 5 + description: total number of requests the invoker can make + allowed_invocations_per_second: + type: string + example: 5 + description: total number of requests the invoker can make per second + allowed_invocations_time_range_days: + type: integer + example: 365 + description: time range when an invoker can make requests + + + + + + + + \ No newline at end of file diff --git a/services/helper/helper_service/services/api/__init__.py b/services/helper/helper_service/services/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/helper/helper_service/services/api/__main__.py b/services/helper/helper_service/services/api/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af7e09200589a49d59fe0e6eaa73663281f9817 --- /dev/null +++ b/services/helper/helper_service/services/api/__main__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import connexion + +from api import encoder + + +def main(): + app = connexion.App(__name__, specification_dir='./openapi/') + app.app.json_encoder = encoder.JSONEncoder + app.add_api('openapi.yaml', + arguments={'title': 'Helper API'}, + pythonic_params=True) + + app.run(port=8080) + + +if __name__ == '__main__': + main() diff --git a/services/helper/helper_service/services/api/controllers/__init__.py b/services/helper/helper_service/services/api/controllers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/helper/helper_service/services/api/controllers/default_controller.py b/services/helper/helper_service/services/api/controllers/default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..7b8d451c594e14aa75581a399f09e718904f25fc --- /dev/null +++ b/services/helper/helper_service/services/api/controllers/default_controller.py @@ -0,0 +1,141 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from api.models.error_response import ErrorResponse # noqa: E501 +from api.models.paginated_response_event import PaginatedResponseEvent # noqa: E501 +from api.models.paginated_response_invoker import PaginatedResponseInvoker # noqa: E501 +from api.models.paginated_response_provider import PaginatedResponseProvider # noqa: E501 +from api.models.paginated_response_security import PaginatedResponseSecurity # noqa: E501 +from api.models.paginated_response_service import PaginatedResponseService # noqa: E501 +from api import util + +from ..core.helper_operations import HelperOperations + + +helper_operations = HelperOperations() + +def helper_controller_delete_entities(uuid): # noqa: E501 + """Delete entities by UUID + + Deletes all CAPIF entities (invokers, providers, services, security contexts, events) associated with the given UUID. # noqa: E501 + + :param uuid: UUID of the user whose entities are to be deleted. + :type uuid: str + + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] + """ + return helper_operations.remove_entities(uuid) + + +def helper_controller_get_ccf_id(): # noqa: E501 + """Get CCF ID + + Retrieves the CCF ID of the CAPIF Core Function. # noqa: E501 + + + :rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]] + """ + return helper_operations.get_ccf_id() + + +def helper_controller_get_events(subscriber_id=None, subscription_id=None, page_size=None, page=None): # noqa: E501 + """Retrieve CAPIF events + + Returns CAPIF event subscriptions or delivered events. # noqa: E501 + + :param subscriber_id: Filter by subscriber identifier. + :type subscriber_id: str + :param subscription_id: Filter by subscription identifier. + :type subscription_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + + :rtype: Union[PaginatedResponseEvent, Tuple[PaginatedResponseEvent, int], Tuple[PaginatedResponseEvent, int, Dict[str, str]] + """ + return helper_operations.get_events(subscriber_id, subscription_id, page_size, page) + + +def helper_controller_get_invokers(uuid=None, api_invoker_id=None, page_size=None, page=None, sort_order=None): # noqa: E501 + """Retrieve API invokers + + Returns invoker entries with pagination and optional filters. # noqa: E501 + + :param uuid: Filter by invoker UUID. + :type uuid: str + :param api_invoker_id: Filter by CAPIF `apiInvokerId`. + :type api_invoker_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + :param sort_order: Sort direction. + :type sort_order: str + + :rtype: Union[PaginatedResponseInvoker, Tuple[PaginatedResponseInvoker, int], Tuple[PaginatedResponseInvoker, int, Dict[str, str]] + """ + return helper_operations.get_invokers(uuid, api_invoker_id, page_size, page, sort_order) + + +def helper_controller_get_providers(uuid=None, api_prov_dom_id=None, page_size=None, page=None, sort_order=None): # noqa: E501 + """Retrieve providers + + Returns provider domains (CAPIF provider domains / AEF providers) with pagination. # noqa: E501 + + :param uuid: Filter by provider UUID. + :type uuid: str + :param api_prov_dom_id: Filter by provider domain ID. + :type api_prov_dom_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + :param sort_order: Sort direction. + :type sort_order: str + + :rtype: Union[PaginatedResponseProvider, Tuple[PaginatedResponseProvider, int], Tuple[PaginatedResponseProvider, int, Dict[str, str]] + """ + return helper_operations.get_providers(uuid, api_prov_dom_id, page_size, page, sort_order) + + +def helper_controller_get_security(invoker_id=None, page_size=None, page=None): # noqa: E501 + """Retrieve security associations + + Returns security credentials/bindings for a given invoker. # noqa: E501 + + :param invoker_id: Filter by invoker identifier. + :type invoker_id: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + + :rtype: Union[PaginatedResponseSecurity, Tuple[PaginatedResponseSecurity, int], Tuple[PaginatedResponseSecurity, int, Dict[str, str]] + """ + return helper_operations.get_security(invoker_id, page_size, page) + + +def helper_controller_get_services(service_id=None, apf_id=None, api_name=None, page_size=None, page=None, sort_order=None): # noqa: E501 + """Retrieve services + + Returns published APIs/services exposed by providers. # noqa: E501 + + :param service_id: Filter by service identifier. + :type service_id: str + :param apf_id: Filter by APF identifier. + :type apf_id: str + :param api_name: Filter by API name. + :type api_name: str + :param page_size: Page size. + :type page_size: int + :param page: Page index (0-based). + :type page: int + :param sort_order: Sort direction. + :type sort_order: str + + :rtype: Union[PaginatedResponseService, Tuple[PaginatedResponseService, int], Tuple[PaginatedResponseService, int, Dict[str, str]] + """ + return helper_operations.get_services(service_id, apf_id, api_name, page_size, page, sort_order) diff --git a/services/helper/helper_service/services/api/controllers/security_controller.py b/services/helper/helper_service/services/api/controllers/security_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..6d294ffd6df1a26a469dbb4e72533b01503468dd --- /dev/null +++ b/services/helper/helper_service/services/api/controllers/security_controller.py @@ -0,0 +1,2 @@ +from typing import List + diff --git a/services/helper/helper_service/core/helper_operations.py b/services/helper/helper_service/services/api/core/helper_operations.py similarity index 55% rename from services/helper/helper_service/core/helper_operations.py rename to services/helper/helper_service/services/api/core/helper_operations.py index 6f1fe63e53ea135fbd33004f3226bcf8b7f0460b..f0e5514db0e86c78fee63c1df97f4fc65495d1c9 100644 --- a/services/helper/helper_service/core/helper_operations.py +++ b/services/helper/helper_service/services/api/core/helper_operations.py @@ -3,27 +3,16 @@ import os import pymongo import requests from config import Config -from db.db import MongoDatabse +from db.db import get_mongo from flask import current_app, jsonify -from utils.utils import ( - convert_dict_keys_to_snake_case, - convert_nested_values, - convert_value_to_original_type, - get_nested_value, - to_snake_case, - validate_snake_case_keys -) - class HelperOperations: - PROTECTED_FIELDS = ["ccf_id"] - def __init__(self): - self.db = MongoDatabse() + self.db = get_mongo() self.mimetype = 'application/json' self.config = Config().get_config() - + def get_invokers(self, uuid, invoker_id, page, page_size, sort_order): current_app.logger.debug(f"Getting the invokers") invoker_col = self.db.get_col_by_name(self.db.invoker_col) @@ -56,7 +45,6 @@ class HelperOperations: totalPages = pages, sortOrder = sort_order), 200 - def get_providers(self, uuid, provider_id, page, page_size, sort_order): current_app.logger.debug(f"Getting the providers") provider_col = self.db.get_col_by_name(self.db.provider_col) @@ -210,164 +198,6 @@ class HelperOperations: current_app.logger.debug(f"User entities removed successfully") return jsonify(message="User entities removed successfully"), 200 - - def get_configuration(self): - """Get all current settings.""" - current_app.logger.debug("Retrieving current CAPIF configuration") - config_col = self.db.get_col_by_name(self.db.capif_configuration) - config = config_col.find_one({}, {"_id": 0}) - - if not config: - return jsonify(message="No CAPIF configuration found"), 404 - - return jsonify(config), 200 - - - def update_config_param(self, param_path, new_value): - """ - Updates a single parameter in the configuration. - param_path: Path of the parameter (e.g., settings.acl_policy_settings.allowed_total_invocations) - """ - current_app.logger.debug(f"Updating configuration parameter: {param_path} with value: {new_value}") - - # Protect immutable fields - if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): - return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be modified"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - existing_config = config_col.find_one({}, {"_id": 0}) - current_value = get_nested_value(existing_config, param_path) - - if current_value is None: - return jsonify(message=f"The parameter '{param_path}' does not exist in the configuration"), 404 - - converted_value = convert_value_to_original_type(new_value, current_value) - - if isinstance(converted_value, tuple): - return converted_value - - update_query = {"$set": {param_path: converted_value}} - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or parameter '{param_path}' not updated"), 404 - - return jsonify(message=f"Parameter '{param_path}' updated successfully"), 200 - - - def replace_configuration(self, new_config): - current_app.logger.debug("Replacing entire CAPIF configuration") - - error_response = validate_snake_case_keys(new_config) - if error_response: - return error_response - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - existing_config = config_col.find_one({}, {"_id": 0}) - - if not existing_config: - return jsonify(message="No existing configuration found"), 404 - - # Preserve protected fields - for field in self.PROTECTED_FIELDS: - if field in existing_config: - new_config[field] = existing_config[field] - - new_config = convert_nested_values(new_config, existing_config) - result = config_col.replace_one({}, new_config, upsert=True) - - return jsonify(message="Configuration replaced successfully (protected fields preserved)"), 200 - - - def add_new_configuration(self, category_name, category_values): - """ - Add a new category of parameters in 'settings'. - """ - current_app.logger.debug(f"Adding new category: {category_name} with values: {category_values}") - - # Block protected field creation - if category_name in self.PROTECTED_FIELDS: - return jsonify(message=f"The category '{category_name}' is immutable and cannot be modified"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - category_name_snake = to_snake_case(category_name) - category_values_snake = convert_dict_keys_to_snake_case(category_values) - - update_query = {"$set": {f"settings.{category_name_snake}": category_values_snake}} - - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or category '{category_name_snake}' not added"), 404 - - return jsonify(message=f"Category '{category_name_snake}' added successfully"), 200 - - - def add_new_config_setting(self, param_path, new_value): - """Add a new parameter in 'settings'.""" - current_app.logger.debug(f"Adding new configuration setting: {param_path} with value: {new_value}") - - # Block protected field creation - if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): - return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be added or modified"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) - - update_query = {"$set": {f"settings.{param_path_snake}": new_value}} - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not updated"), 404 - - return jsonify(message=f"Parameter '{param_path_snake}' added successfully"), 200 - - - def remove_config_param(self, param_path): - """Removes a specific parameter inside 'settings'.""" - current_app.logger.debug(f"Removing configuration parameter: {param_path}") - - # Prevent deletion of protected fields - if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): - return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be removed"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) - - update_query = {"$unset": {f"settings.{param_path_snake}": ""}} - - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not removed"), 404 - - return jsonify(message=f"Parameter '{param_path_snake}' removed successfully"), 200 - - - def remove_config_category(self, category_name): - """Removes an entire category inside 'settings'.""" - current_app.logger.debug(f"Removing configuration category: {category_name}") - - # Prevent deletion of protected fields - if category_name in self.PROTECTED_FIELDS: - return jsonify(message=f"The category '{category_name}' is immutable and cannot be removed"), 403 - - config_col = self.db.get_col_by_name(self.db.capif_configuration) - - category_name_snake = to_snake_case(category_name) - - update_query = {"$unset": {f"settings.{category_name_snake}": ""}} - - result = config_col.update_one({}, update_query) - - if result.modified_count == 0: - return jsonify(message=f"No configuration found or category '{category_name_snake}' not removed"), 404 - - return jsonify(message=f"Category '{category_name_snake}' removed successfully"), 200 def get_ccf_id(self): """ diff --git a/services/helper/helper_service/services/api/encoder.py b/services/helper/helper_service/services/api/encoder.py new file mode 100644 index 0000000000000000000000000000000000000000..1a660a3e21e1be01e6a259220847c8b9efacb209 --- /dev/null +++ b/services/helper/helper_service/services/api/encoder.py @@ -0,0 +1,19 @@ +from connexion.apps.flask_app import FlaskJSONEncoder + +from api.models.base_model import Model + + +class JSONEncoder(FlaskJSONEncoder): + include_nulls = False + + def default(self, o): + if isinstance(o, Model): + dikt = {} + for attr in o.openapi_types: + value = getattr(o, attr) + if value is None and not self.include_nulls: + continue + attr = o.attribute_map[attr] + dikt[attr] = value + return dikt + return FlaskJSONEncoder.default(self, o) diff --git a/services/helper/helper_service/services/api/models/__init__.py b/services/helper/helper_service/services/api/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..68260afdc75335b0def50dcf88b7e3c7ee249804 --- /dev/null +++ b/services/helper/helper_service/services/api/models/__init__.py @@ -0,0 +1,53 @@ +# flake8: noqa +# import models into model package +from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api.models.api_list import APIList +from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails +from api.models.api_provider_function_details import APIProviderFunctionDetails +from api.models.aef_location import AefLocation +from api.models.aef_profile import AefProfile +from api.models.api_provider_func_role import ApiProviderFuncRole +from api.models.capif_event import CAPIFEvent +from api.models.capif_event_filter import CAPIFEventFilter +from api.models.civic_address import CivicAddress +from api.models.communication_type import CommunicationType +from api.models.custom_operation import CustomOperation +from api.models.data_format import DataFormat +from api.models.ellipsoid_arc import EllipsoidArc +from api.models.error_response import ErrorResponse +from api.models.event_subscription import EventSubscription +from api.models.gad_shape import GADShape +from api.models.geographic_area import GeographicArea +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.interface_description import InterfaceDescription +from api.models.notification_flag import NotificationFlag +from api.models.notification_method import NotificationMethod +from api.models.onboarding_information import OnboardingInformation +from api.models.operation import Operation +from api.models.paginated_response_base import PaginatedResponseBase +from api.models.paginated_response_event import PaginatedResponseEvent +from api.models.paginated_response_invoker import PaginatedResponseInvoker +from api.models.paginated_response_provider import PaginatedResponseProvider +from api.models.paginated_response_security import PaginatedResponseSecurity +from api.models.paginated_response_service import PaginatedResponseService +from api.models.partitioning_criteria import PartitioningCriteria +from api.models.point import Point +from api.models.point_altitude import PointAltitude +from api.models.point_altitude_uncertainty import PointAltitudeUncertainty +from api.models.point_uncertainty_circle import PointUncertaintyCircle +from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from api.models.polygon import Polygon +from api.models.protocol import Protocol +from api.models.published_api_path import PublishedApiPath +from api.models.registration_information import RegistrationInformation +from api.models.reporting_information import ReportingInformation +from api.models.resource import Resource +from api.models.security_information import SecurityInformation +from api.models.security_method import SecurityMethod +from api.models.service_api_description import ServiceAPIDescription +from api.models.service_security import ServiceSecurity +from api.models.shareable_information import ShareableInformation +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api.models.version import Version +from api.models.websock_notif_config import WebsockNotifConfig diff --git a/services/helper/helper_service/services/api/models/aef_location.py b/services/helper/helper_service/services/api/models/aef_location.py new file mode 100644 index 0000000000000000000000000000000000000000..5ab8090274f1970f944a3063fb86546282104442 --- /dev/null +++ b/services/helper/helper_service/services/api/models/aef_location.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.civic_address import CivicAddress +from api.models.geographic_area import GeographicArea +from api import util + +from api.models.civic_address import CivicAddress # noqa: E501 +from api.models.geographic_area import GeographicArea # noqa: E501 + +class AefLocation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, civic_addr=None, geo_area=None, dc_id=None): # noqa: E501 + """AefLocation - a model defined in OpenAPI + + :param civic_addr: The civic_addr of this AefLocation. # noqa: E501 + :type civic_addr: CivicAddress + :param geo_area: The geo_area of this AefLocation. # noqa: E501 + :type geo_area: GeographicArea + :param dc_id: The dc_id of this AefLocation. # noqa: E501 + :type dc_id: str + """ + self.openapi_types = { + 'civic_addr': CivicAddress, + 'geo_area': GeographicArea, + 'dc_id': str + } + + self.attribute_map = { + 'civic_addr': 'civicAddr', + 'geo_area': 'geoArea', + 'dc_id': 'dcId' + } + + self._civic_addr = civic_addr + self._geo_area = geo_area + self._dc_id = dc_id + + @classmethod + def from_dict(cls, dikt) -> 'AefLocation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefLocation of this AefLocation. # noqa: E501 + :rtype: AefLocation + """ + return util.deserialize_model(dikt, cls) + + @property + def civic_addr(self) -> CivicAddress: + """Gets the civic_addr of this AefLocation. + + + :return: The civic_addr of this AefLocation. + :rtype: CivicAddress + """ + return self._civic_addr + + @civic_addr.setter + def civic_addr(self, civic_addr: CivicAddress): + """Sets the civic_addr of this AefLocation. + + + :param civic_addr: The civic_addr of this AefLocation. + :type civic_addr: CivicAddress + """ + + self._civic_addr = civic_addr + + @property + def geo_area(self) -> GeographicArea: + """Gets the geo_area of this AefLocation. + + + :return: The geo_area of this AefLocation. + :rtype: GeographicArea + """ + return self._geo_area + + @geo_area.setter + def geo_area(self, geo_area: GeographicArea): + """Sets the geo_area of this AefLocation. + + + :param geo_area: The geo_area of this AefLocation. + :type geo_area: GeographicArea + """ + + self._geo_area = geo_area + + @property + def dc_id(self) -> str: + """Gets the dc_id of this AefLocation. + + Identifies the data center where the AEF providing the service API is located. # noqa: E501 + + :return: The dc_id of this AefLocation. + :rtype: str + """ + return self._dc_id + + @dc_id.setter + def dc_id(self, dc_id: str): + """Sets the dc_id of this AefLocation. + + Identifies the data center where the AEF providing the service API is located. # noqa: E501 + + :param dc_id: The dc_id of this AefLocation. + :type dc_id: str + """ + + self._dc_id = dc_id diff --git a/services/helper/helper_service/services/api/models/aef_profile.py b/services/helper/helper_service/services/api/models/aef_profile.py new file mode 100644 index 0000000000000000000000000000000000000000..4b39781653e47bd9d412dd08210aaae82d4e78b6 --- /dev/null +++ b/services/helper/helper_service/services/api/models/aef_profile.py @@ -0,0 +1,275 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.aef_location import AefLocation +from api.models.data_format import DataFormat +from api.models.interface_description import InterfaceDescription +from api.models.protocol import Protocol +from api.models.security_method import SecurityMethod +from api.models.version import Version +from api import util + +from api.models.aef_location import AefLocation # noqa: E501 +from api.models.data_format import DataFormat # noqa: E501 +from api.models.interface_description import InterfaceDescription # noqa: E501 +from api.models.protocol import Protocol # noqa: E501 +from api.models.security_method import SecurityMethod # noqa: E501 +from api.models.version import Version # noqa: E501 + +class AefProfile(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, aef_id=None, versions=None, protocol=None, data_format=None, security_methods=None, domain_name=None, interface_descriptions=None, aef_location=None): # noqa: E501 + """AefProfile - a model defined in OpenAPI + + :param aef_id: The aef_id of this AefProfile. # noqa: E501 + :type aef_id: str + :param versions: The versions of this AefProfile. # noqa: E501 + :type versions: List[Version] + :param protocol: The protocol of this AefProfile. # noqa: E501 + :type protocol: Protocol + :param data_format: The data_format of this AefProfile. # noqa: E501 + :type data_format: DataFormat + :param security_methods: The security_methods of this AefProfile. # noqa: E501 + :type security_methods: List[SecurityMethod] + :param domain_name: The domain_name of this AefProfile. # noqa: E501 + :type domain_name: str + :param interface_descriptions: The interface_descriptions of this AefProfile. # noqa: E501 + :type interface_descriptions: List[InterfaceDescription] + :param aef_location: The aef_location of this AefProfile. # noqa: E501 + :type aef_location: AefLocation + """ + self.openapi_types = { + 'aef_id': str, + 'versions': List[Version], + 'protocol': Protocol, + 'data_format': DataFormat, + 'security_methods': List[SecurityMethod], + 'domain_name': str, + 'interface_descriptions': List[InterfaceDescription], + 'aef_location': AefLocation + } + + self.attribute_map = { + 'aef_id': 'aefId', + 'versions': 'versions', + 'protocol': 'protocol', + 'data_format': 'dataFormat', + 'security_methods': 'securityMethods', + 'domain_name': 'domainName', + 'interface_descriptions': 'interfaceDescriptions', + 'aef_location': 'aefLocation' + } + + self._aef_id = aef_id + self._versions = versions + self._protocol = protocol + self._data_format = data_format + self._security_methods = security_methods + self._domain_name = domain_name + self._interface_descriptions = interface_descriptions + self._aef_location = aef_location + + @classmethod + def from_dict(cls, dikt) -> 'AefProfile': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The AefProfile of this AefProfile. # noqa: E501 + :rtype: AefProfile + """ + return util.deserialize_model(dikt, cls) + + @property + def aef_id(self) -> str: + """Gets the aef_id of this AefProfile. + + Identifier of the API exposing function # noqa: E501 + + :return: The aef_id of this AefProfile. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this AefProfile. + + Identifier of the API exposing function # noqa: E501 + + :param aef_id: The aef_id of this AefProfile. + :type aef_id: str + """ + if aef_id is None: + raise ValueError("Invalid value for `aef_id`, must not be `None`") # noqa: E501 + + self._aef_id = aef_id + + @property + def versions(self) -> List[Version]: + """Gets the versions of this AefProfile. + + API version # noqa: E501 + + :return: The versions of this AefProfile. + :rtype: List[Version] + """ + return self._versions + + @versions.setter + def versions(self, versions: List[Version]): + """Sets the versions of this AefProfile. + + API version # noqa: E501 + + :param versions: The versions of this AefProfile. + :type versions: List[Version] + """ + if versions is None: + raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501 + if versions is not None and len(versions) < 1: + raise ValueError("Invalid value for `versions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._versions = versions + + @property + def protocol(self) -> Protocol: + """Gets the protocol of this AefProfile. + + + :return: The protocol of this AefProfile. + :rtype: Protocol + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol: Protocol): + """Sets the protocol of this AefProfile. + + + :param protocol: The protocol of this AefProfile. + :type protocol: Protocol + """ + + self._protocol = protocol + + @property + def data_format(self) -> DataFormat: + """Gets the data_format of this AefProfile. + + + :return: The data_format of this AefProfile. + :rtype: DataFormat + """ + return self._data_format + + @data_format.setter + def data_format(self, data_format: DataFormat): + """Sets the data_format of this AefProfile. + + + :param data_format: The data_format of this AefProfile. + :type data_format: DataFormat + """ + + self._data_format = data_format + + @property + def security_methods(self) -> List[SecurityMethod]: + """Gets the security_methods of this AefProfile. + + Security methods supported by the AEF # noqa: E501 + + :return: The security_methods of this AefProfile. + :rtype: List[SecurityMethod] + """ + return self._security_methods + + @security_methods.setter + def security_methods(self, security_methods: List[SecurityMethod]): + """Sets the security_methods of this AefProfile. + + Security methods supported by the AEF # noqa: E501 + + :param security_methods: The security_methods of this AefProfile. + :type security_methods: List[SecurityMethod] + """ + if security_methods is not None and len(security_methods) < 1: + raise ValueError("Invalid value for `security_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._security_methods = security_methods + + @property + def domain_name(self) -> str: + """Gets the domain_name of this AefProfile. + + Domain to which API belongs to # noqa: E501 + + :return: The domain_name of this AefProfile. + :rtype: str + """ + return self._domain_name + + @domain_name.setter + def domain_name(self, domain_name: str): + """Sets the domain_name of this AefProfile. + + Domain to which API belongs to # noqa: E501 + + :param domain_name: The domain_name of this AefProfile. + :type domain_name: str + """ + + self._domain_name = domain_name + + @property + def interface_descriptions(self) -> List[InterfaceDescription]: + """Gets the interface_descriptions of this AefProfile. + + Interface details # noqa: E501 + + :return: The interface_descriptions of this AefProfile. + :rtype: List[InterfaceDescription] + """ + return self._interface_descriptions + + @interface_descriptions.setter + def interface_descriptions(self, interface_descriptions: List[InterfaceDescription]): + """Sets the interface_descriptions of this AefProfile. + + Interface details # noqa: E501 + + :param interface_descriptions: The interface_descriptions of this AefProfile. + :type interface_descriptions: List[InterfaceDescription] + """ + if interface_descriptions is not None and len(interface_descriptions) < 1: + raise ValueError("Invalid value for `interface_descriptions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._interface_descriptions = interface_descriptions + + @property + def aef_location(self) -> AefLocation: + """Gets the aef_location of this AefProfile. + + + :return: The aef_location of this AefProfile. + :rtype: AefLocation + """ + return self._aef_location + + @aef_location.setter + def aef_location(self, aef_location: AefLocation): + """Sets the aef_location of this AefProfile. + + + :param aef_location: The aef_location of this AefProfile. + :type aef_location: AefLocation + """ + + self._aef_location = aef_location diff --git a/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py b/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py new file mode 100644 index 0000000000000000000000000000000000000000..fa1b4d4a5a9074e6d87580eb4efdca209c066fb4 --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_invoker_enrolment_details.py @@ -0,0 +1,351 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_list import APIList +from api.models.onboarding_information import OnboardingInformation +from api.models.websock_notif_config import WebsockNotifConfig +import re +from api import util + +from api.models.api_list import APIList # noqa: E501 +from api.models.onboarding_information import OnboardingInformation # noqa: E501 +from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 +import re # noqa: E501 + +class APIInvokerEnrolmentDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, onboarding_date=None, username=None, uuid=None, api_invoker_id=None, onboarding_information=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, api_list=None, api_invoker_information=None, supported_features=None): # noqa: E501 + """APIInvokerEnrolmentDetails - a model defined in OpenAPI + + :param onboarding_date: The onboarding_date of this APIInvokerEnrolmentDetails. # noqa: E501 + :type onboarding_date: datetime + :param username: The username of this APIInvokerEnrolmentDetails. # noqa: E501 + :type username: str + :param uuid: The uuid of this APIInvokerEnrolmentDetails. # noqa: E501 + :type uuid: str + :param api_invoker_id: The api_invoker_id of this APIInvokerEnrolmentDetails. # noqa: E501 + :type api_invoker_id: str + :param onboarding_information: The onboarding_information of this APIInvokerEnrolmentDetails. # noqa: E501 + :type onboarding_information: OnboardingInformation + :param notification_destination: The notification_destination of this APIInvokerEnrolmentDetails. # noqa: E501 + :type notification_destination: str + :param request_test_notification: The request_test_notification of this APIInvokerEnrolmentDetails. # noqa: E501 + :type request_test_notification: bool + :param websock_notif_config: The websock_notif_config of this APIInvokerEnrolmentDetails. # noqa: E501 + :type websock_notif_config: WebsockNotifConfig + :param api_list: The api_list of this APIInvokerEnrolmentDetails. # noqa: E501 + :type api_list: APIList + :param api_invoker_information: The api_invoker_information of this APIInvokerEnrolmentDetails. # noqa: E501 + :type api_invoker_information: str + :param supported_features: The supported_features of this APIInvokerEnrolmentDetails. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'onboarding_date': datetime, + 'username': str, + 'uuid': str, + 'api_invoker_id': str, + 'onboarding_information': OnboardingInformation, + 'notification_destination': str, + 'request_test_notification': bool, + 'websock_notif_config': WebsockNotifConfig, + 'api_list': APIList, + 'api_invoker_information': str, + 'supported_features': str + } + + self.attribute_map = { + 'onboarding_date': 'onboarding_date', + 'username': 'username', + 'uuid': 'uuid', + 'api_invoker_id': 'apiInvokerId', + 'onboarding_information': 'onboardingInformation', + 'notification_destination': 'notificationDestination', + 'request_test_notification': 'requestTestNotification', + 'websock_notif_config': 'websockNotifConfig', + 'api_list': 'apiList', + 'api_invoker_information': 'apiInvokerInformation', + 'supported_features': 'supportedFeatures' + } + + self._onboarding_date = onboarding_date + self._username = username + self._uuid = uuid + self._api_invoker_id = api_invoker_id + self._onboarding_information = onboarding_information + self._notification_destination = notification_destination + self._request_test_notification = request_test_notification + self._websock_notif_config = websock_notif_config + self._api_list = api_list + self._api_invoker_information = api_invoker_information + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'APIInvokerEnrolmentDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIInvokerEnrolmentDetails of this APIInvokerEnrolmentDetails. # noqa: E501 + :rtype: APIInvokerEnrolmentDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def onboarding_date(self) -> datetime: + """Gets the onboarding_date of this APIInvokerEnrolmentDetails. + + Invoker onboarding date # noqa: E501 + + :return: The onboarding_date of this APIInvokerEnrolmentDetails. + :rtype: datetime + """ + return self._onboarding_date + + @onboarding_date.setter + def onboarding_date(self, onboarding_date: datetime): + """Sets the onboarding_date of this APIInvokerEnrolmentDetails. + + Invoker onboarding date # noqa: E501 + + :param onboarding_date: The onboarding_date of this APIInvokerEnrolmentDetails. + :type onboarding_date: datetime + """ + + self._onboarding_date = onboarding_date + + @property + def username(self) -> str: + """Gets the username of this APIInvokerEnrolmentDetails. + + User who registered the invoker # noqa: E501 + + :return: The username of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._username + + @username.setter + def username(self, username: str): + """Sets the username of this APIInvokerEnrolmentDetails. + + User who registered the invoker # noqa: E501 + + :param username: The username of this APIInvokerEnrolmentDetails. + :type username: str + """ + + self._username = username + + @property + def uuid(self) -> str: + """Gets the uuid of this APIInvokerEnrolmentDetails. + + uuid of the user who registered the invoker # noqa: E501 + + :return: The uuid of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid: str): + """Sets the uuid of this APIInvokerEnrolmentDetails. + + uuid of the user who registered the invoker # noqa: E501 + + :param uuid: The uuid of this APIInvokerEnrolmentDetails. + :type uuid: str + """ + + self._uuid = uuid + + @property + def api_invoker_id(self) -> str: + """Gets the api_invoker_id of this APIInvokerEnrolmentDetails. + + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :return: The api_invoker_id of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._api_invoker_id + + @api_invoker_id.setter + def api_invoker_id(self, api_invoker_id: str): + """Sets the api_invoker_id of this APIInvokerEnrolmentDetails. + + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :param api_invoker_id: The api_invoker_id of this APIInvokerEnrolmentDetails. + :type api_invoker_id: str + """ + + self._api_invoker_id = api_invoker_id + + @property + def onboarding_information(self) -> OnboardingInformation: + """Gets the onboarding_information of this APIInvokerEnrolmentDetails. + + + :return: The onboarding_information of this APIInvokerEnrolmentDetails. + :rtype: OnboardingInformation + """ + return self._onboarding_information + + @onboarding_information.setter + def onboarding_information(self, onboarding_information: OnboardingInformation): + """Sets the onboarding_information of this APIInvokerEnrolmentDetails. + + + :param onboarding_information: The onboarding_information of this APIInvokerEnrolmentDetails. + :type onboarding_information: OnboardingInformation + """ + if onboarding_information is None: + raise ValueError("Invalid value for `onboarding_information`, must not be `None`") # noqa: E501 + + self._onboarding_information = onboarding_information + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this APIInvokerEnrolmentDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this APIInvokerEnrolmentDetails. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this APIInvokerEnrolmentDetails. + :type notification_destination: str + """ + if notification_destination is None: + raise ValueError("Invalid value for `notification_destination`, must not be `None`") # noqa: E501 + + self._notification_destination = notification_destination + + @property + def request_test_notification(self) -> bool: + """Gets the request_test_notification of this APIInvokerEnrolmentDetails. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :return: The request_test_notification of this APIInvokerEnrolmentDetails. + :rtype: bool + """ + return self._request_test_notification + + @request_test_notification.setter + def request_test_notification(self, request_test_notification: bool): + """Sets the request_test_notification of this APIInvokerEnrolmentDetails. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :param request_test_notification: The request_test_notification of this APIInvokerEnrolmentDetails. + :type request_test_notification: bool + """ + + self._request_test_notification = request_test_notification + + @property + def websock_notif_config(self) -> WebsockNotifConfig: + """Gets the websock_notif_config of this APIInvokerEnrolmentDetails. + + + :return: The websock_notif_config of this APIInvokerEnrolmentDetails. + :rtype: WebsockNotifConfig + """ + return self._websock_notif_config + + @websock_notif_config.setter + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): + """Sets the websock_notif_config of this APIInvokerEnrolmentDetails. + + + :param websock_notif_config: The websock_notif_config of this APIInvokerEnrolmentDetails. + :type websock_notif_config: WebsockNotifConfig + """ + + self._websock_notif_config = websock_notif_config + + @property + def api_list(self) -> APIList: + """Gets the api_list of this APIInvokerEnrolmentDetails. + + + :return: The api_list of this APIInvokerEnrolmentDetails. + :rtype: APIList + """ + return self._api_list + + @api_list.setter + def api_list(self, api_list: APIList): + """Sets the api_list of this APIInvokerEnrolmentDetails. + + + :param api_list: The api_list of this APIInvokerEnrolmentDetails. + :type api_list: APIList + """ + + self._api_list = api_list + + @property + def api_invoker_information(self) -> str: + """Gets the api_invoker_information of this APIInvokerEnrolmentDetails. + + Generic information related to the API invoker such as details of the device or the application. # noqa: E501 + + :return: The api_invoker_information of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._api_invoker_information + + @api_invoker_information.setter + def api_invoker_information(self, api_invoker_information: str): + """Sets the api_invoker_information of this APIInvokerEnrolmentDetails. + + Generic information related to the API invoker such as details of the device or the application. # noqa: E501 + + :param api_invoker_information: The api_invoker_information of this APIInvokerEnrolmentDetails. + :type api_invoker_information: str + """ + + self._api_invoker_information = api_invoker_information + + @property + def supported_features(self) -> str: + """Gets the supported_features of this APIInvokerEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this APIInvokerEnrolmentDetails. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this APIInvokerEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this APIInvokerEnrolmentDetails. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/helper/helper_service/services/api/models/api_list.py b/services/helper/helper_service/services/api/models/api_list.py new file mode 100644 index 0000000000000000000000000000000000000000..09e0dd1a729fbc9c69f632ecbbf38c17e02f4266 --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_list.py @@ -0,0 +1,67 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.service_api_description import ServiceAPIDescription +from api import util + +from api.models.service_api_description import ServiceAPIDescription # noqa: E501 + +class APIList(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, service_api_descriptions=None): # noqa: E501 + """APIList - a model defined in OpenAPI + + :param service_api_descriptions: The service_api_descriptions of this APIList. # noqa: E501 + :type service_api_descriptions: List[ServiceAPIDescription] + """ + self.openapi_types = { + 'service_api_descriptions': List[ServiceAPIDescription] + } + + self.attribute_map = { + 'service_api_descriptions': 'serviceAPIDescriptions' + } + + self._service_api_descriptions = service_api_descriptions + + @classmethod + def from_dict(cls, dikt) -> 'APIList': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIList of this APIList. # noqa: E501 + :rtype: APIList + """ + return util.deserialize_model(dikt, cls) + + @property + def service_api_descriptions(self) -> List[ServiceAPIDescription]: + """Gets the service_api_descriptions of this APIList. + + The list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 + + :return: The service_api_descriptions of this APIList. + :rtype: List[ServiceAPIDescription] + """ + return self._service_api_descriptions + + @service_api_descriptions.setter + def service_api_descriptions(self, service_api_descriptions: List[ServiceAPIDescription]): + """Sets the service_api_descriptions of this APIList. + + The list of service APIs that the API Invoker is allowed to invoke. # noqa: E501 + + :param service_api_descriptions: The service_api_descriptions of this APIList. + :type service_api_descriptions: List[ServiceAPIDescription] + """ + if service_api_descriptions is not None and len(service_api_descriptions) < 1: + raise ValueError("Invalid value for `service_api_descriptions`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._service_api_descriptions = service_api_descriptions diff --git a/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py b/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py new file mode 100644 index 0000000000000000000000000000000000000000..8cba9810375c9a94beab3e93ce77615f0cec30e9 --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_provider_enrolment_details.py @@ -0,0 +1,297 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_provider_function_details import APIProviderFunctionDetails +import re +from api import util + +from api.models.api_provider_function_details import APIProviderFunctionDetails # noqa: E501 +import re # noqa: E501 + +class APIProviderEnrolmentDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, onboarding_date=None, username=None, uuid=None, api_prov_dom_id=None, reg_sec=None, api_prov_funcs=None, api_prov_dom_info=None, supp_feat=None, fail_reason=None): # noqa: E501 + """APIProviderEnrolmentDetails - a model defined in OpenAPI + + :param onboarding_date: The onboarding_date of this APIProviderEnrolmentDetails. # noqa: E501 + :type onboarding_date: datetime + :param username: The username of this APIProviderEnrolmentDetails. # noqa: E501 + :type username: str + :param uuid: The uuid of this APIProviderEnrolmentDetails. # noqa: E501 + :type uuid: str + :param api_prov_dom_id: The api_prov_dom_id of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_dom_id: str + :param reg_sec: The reg_sec of this APIProviderEnrolmentDetails. # noqa: E501 + :type reg_sec: str + :param api_prov_funcs: The api_prov_funcs of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_funcs: List[APIProviderFunctionDetails] + :param api_prov_dom_info: The api_prov_dom_info of this APIProviderEnrolmentDetails. # noqa: E501 + :type api_prov_dom_info: str + :param supp_feat: The supp_feat of this APIProviderEnrolmentDetails. # noqa: E501 + :type supp_feat: str + :param fail_reason: The fail_reason of this APIProviderEnrolmentDetails. # noqa: E501 + :type fail_reason: str + """ + self.openapi_types = { + 'onboarding_date': datetime, + 'username': str, + 'uuid': str, + 'api_prov_dom_id': str, + 'reg_sec': str, + 'api_prov_funcs': List[APIProviderFunctionDetails], + 'api_prov_dom_info': str, + 'supp_feat': str, + 'fail_reason': str + } + + self.attribute_map = { + 'onboarding_date': 'onboarding_date', + 'username': 'username', + 'uuid': 'uuid', + 'api_prov_dom_id': 'apiProvDomId', + 'reg_sec': 'regSec', + 'api_prov_funcs': 'apiProvFuncs', + 'api_prov_dom_info': 'apiProvDomInfo', + 'supp_feat': 'suppFeat', + 'fail_reason': 'failReason' + } + + self._onboarding_date = onboarding_date + self._username = username + self._uuid = uuid + self._api_prov_dom_id = api_prov_dom_id + self._reg_sec = reg_sec + self._api_prov_funcs = api_prov_funcs + self._api_prov_dom_info = api_prov_dom_info + self._supp_feat = supp_feat + self._fail_reason = fail_reason + + @classmethod + def from_dict(cls, dikt) -> 'APIProviderEnrolmentDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIProviderEnrolmentDetails of this APIProviderEnrolmentDetails. # noqa: E501 + :rtype: APIProviderEnrolmentDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def onboarding_date(self) -> datetime: + """Gets the onboarding_date of this APIProviderEnrolmentDetails. + + Provider onboarding date # noqa: E501 + + :return: The onboarding_date of this APIProviderEnrolmentDetails. + :rtype: datetime + """ + return self._onboarding_date + + @onboarding_date.setter + def onboarding_date(self, onboarding_date: datetime): + """Sets the onboarding_date of this APIProviderEnrolmentDetails. + + Provider onboarding date # noqa: E501 + + :param onboarding_date: The onboarding_date of this APIProviderEnrolmentDetails. + :type onboarding_date: datetime + """ + + self._onboarding_date = onboarding_date + + @property + def username(self) -> str: + """Gets the username of this APIProviderEnrolmentDetails. + + User who registered the provider # noqa: E501 + + :return: The username of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._username + + @username.setter + def username(self, username: str): + """Sets the username of this APIProviderEnrolmentDetails. + + User who registered the provider # noqa: E501 + + :param username: The username of this APIProviderEnrolmentDetails. + :type username: str + """ + + self._username = username + + @property + def uuid(self) -> str: + """Gets the uuid of this APIProviderEnrolmentDetails. + + uuid of the user who registered the provider # noqa: E501 + + :return: The uuid of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid: str): + """Sets the uuid of this APIProviderEnrolmentDetails. + + uuid of the user who registered the provider # noqa: E501 + + :param uuid: The uuid of this APIProviderEnrolmentDetails. + :type uuid: str + """ + + self._uuid = uuid + + @property + def api_prov_dom_id(self) -> str: + """Gets the api_prov_dom_id of this APIProviderEnrolmentDetails. + + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :return: The api_prov_dom_id of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._api_prov_dom_id + + @api_prov_dom_id.setter + def api_prov_dom_id(self, api_prov_dom_id: str): + """Sets the api_prov_dom_id of this APIProviderEnrolmentDetails. + + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :param api_prov_dom_id: The api_prov_dom_id of this APIProviderEnrolmentDetails. + :type api_prov_dom_id: str + """ + + self._api_prov_dom_id = api_prov_dom_id + + @property + def reg_sec(self) -> str: + """Gets the reg_sec of this APIProviderEnrolmentDetails. + + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. # noqa: E501 + + :return: The reg_sec of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._reg_sec + + @reg_sec.setter + def reg_sec(self, reg_sec: str): + """Sets the reg_sec of this APIProviderEnrolmentDetails. + + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. # noqa: E501 + + :param reg_sec: The reg_sec of this APIProviderEnrolmentDetails. + :type reg_sec: str + """ + if reg_sec is None: + raise ValueError("Invalid value for `reg_sec`, must not be `None`") # noqa: E501 + + self._reg_sec = reg_sec + + @property + def api_prov_funcs(self) -> List[APIProviderFunctionDetails]: + """Gets the api_prov_funcs of this APIProviderEnrolmentDetails. + + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. # noqa: E501 + + :return: The api_prov_funcs of this APIProviderEnrolmentDetails. + :rtype: List[APIProviderFunctionDetails] + """ + return self._api_prov_funcs + + @api_prov_funcs.setter + def api_prov_funcs(self, api_prov_funcs: List[APIProviderFunctionDetails]): + """Sets the api_prov_funcs of this APIProviderEnrolmentDetails. + + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. # noqa: E501 + + :param api_prov_funcs: The api_prov_funcs of this APIProviderEnrolmentDetails. + :type api_prov_funcs: List[APIProviderFunctionDetails] + """ + if api_prov_funcs is not None and len(api_prov_funcs) < 1: + raise ValueError("Invalid value for `api_prov_funcs`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_prov_funcs = api_prov_funcs + + @property + def api_prov_dom_info(self) -> str: + """Gets the api_prov_dom_info of this APIProviderEnrolmentDetails. + + Generic information related to the API provider domain such as details of the API provider applications. # noqa: E501 + + :return: The api_prov_dom_info of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._api_prov_dom_info + + @api_prov_dom_info.setter + def api_prov_dom_info(self, api_prov_dom_info: str): + """Sets the api_prov_dom_info of this APIProviderEnrolmentDetails. + + Generic information related to the API provider domain such as details of the API provider applications. # noqa: E501 + + :param api_prov_dom_info: The api_prov_dom_info of this APIProviderEnrolmentDetails. + :type api_prov_dom_info: str + """ + + self._api_prov_dom_info = api_prov_dom_info + + @property + def supp_feat(self) -> str: + """Gets the supp_feat of this APIProviderEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supp_feat of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._supp_feat + + @supp_feat.setter + def supp_feat(self, supp_feat: str): + """Sets the supp_feat of this APIProviderEnrolmentDetails. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supp_feat: The supp_feat of this APIProviderEnrolmentDetails. + :type supp_feat: str + """ + if supp_feat is not None and not re.search(r'^[A-Fa-f0-9]*$', supp_feat): # noqa: E501 + raise ValueError(r"Invalid value for `supp_feat`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supp_feat = supp_feat + + @property + def fail_reason(self) -> str: + """Gets the fail_reason of this APIProviderEnrolmentDetails. + + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. # noqa: E501 + + :return: The fail_reason of this APIProviderEnrolmentDetails. + :rtype: str + """ + return self._fail_reason + + @fail_reason.setter + def fail_reason(self, fail_reason: str): + """Sets the fail_reason of this APIProviderEnrolmentDetails. + + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. # noqa: E501 + + :param fail_reason: The fail_reason of this APIProviderEnrolmentDetails. + :type fail_reason: str + """ + + self._fail_reason = fail_reason diff --git a/services/helper/helper_service/services/api/models/api_provider_func_role.py b/services/helper/helper_service/services/api/models/api_provider_func_role.py new file mode 100644 index 0000000000000000000000000000000000000000..d3bda3c86b155d1ef114adad0f9deedaf110579c --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_provider_func_role.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class ApiProviderFuncRole(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """ApiProviderFuncRole - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'ApiProviderFuncRole': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ApiProviderFuncRole of this ApiProviderFuncRole. # noqa: E501 + :rtype: ApiProviderFuncRole + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/api_provider_function_details.py b/services/helper/helper_service/services/api/models/api_provider_function_details.py new file mode 100644 index 0000000000000000000000000000000000000000..6998632ab8d1a7a6190b4efe88c838ff651e4291 --- /dev/null +++ b/services/helper/helper_service/services/api/models/api_provider_function_details.py @@ -0,0 +1,151 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_provider_func_role import ApiProviderFuncRole +from api.models.registration_information import RegistrationInformation +from api import util + +from api.models.api_provider_func_role import ApiProviderFuncRole # noqa: E501 +from api.models.registration_information import RegistrationInformation # noqa: E501 + +class APIProviderFunctionDetails(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_prov_func_id=None, reg_info=None, api_prov_func_role=None, api_prov_func_info=None): # noqa: E501 + """APIProviderFunctionDetails - a model defined in OpenAPI + + :param api_prov_func_id: The api_prov_func_id of this APIProviderFunctionDetails. # noqa: E501 + :type api_prov_func_id: str + :param reg_info: The reg_info of this APIProviderFunctionDetails. # noqa: E501 + :type reg_info: RegistrationInformation + :param api_prov_func_role: The api_prov_func_role of this APIProviderFunctionDetails. # noqa: E501 + :type api_prov_func_role: ApiProviderFuncRole + :param api_prov_func_info: The api_prov_func_info of this APIProviderFunctionDetails. # noqa: E501 + :type api_prov_func_info: str + """ + self.openapi_types = { + 'api_prov_func_id': str, + 'reg_info': RegistrationInformation, + 'api_prov_func_role': ApiProviderFuncRole, + 'api_prov_func_info': str + } + + self.attribute_map = { + 'api_prov_func_id': 'apiProvFuncId', + 'reg_info': 'regInfo', + 'api_prov_func_role': 'apiProvFuncRole', + 'api_prov_func_info': 'apiProvFuncInfo' + } + + self._api_prov_func_id = api_prov_func_id + self._reg_info = reg_info + self._api_prov_func_role = api_prov_func_role + self._api_prov_func_info = api_prov_func_info + + @classmethod + def from_dict(cls, dikt) -> 'APIProviderFunctionDetails': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The APIProviderFunctionDetails of this APIProviderFunctionDetails. # noqa: E501 + :rtype: APIProviderFunctionDetails + """ + return util.deserialize_model(dikt, cls) + + @property + def api_prov_func_id(self) -> str: + """Gets the api_prov_func_id of this APIProviderFunctionDetails. + + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :return: The api_prov_func_id of this APIProviderFunctionDetails. + :rtype: str + """ + return self._api_prov_func_id + + @api_prov_func_id.setter + def api_prov_func_id(self, api_prov_func_id: str): + """Sets the api_prov_func_id of this APIProviderFunctionDetails. + + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. # noqa: E501 + + :param api_prov_func_id: The api_prov_func_id of this APIProviderFunctionDetails. + :type api_prov_func_id: str + """ + + self._api_prov_func_id = api_prov_func_id + + @property + def reg_info(self) -> RegistrationInformation: + """Gets the reg_info of this APIProviderFunctionDetails. + + + :return: The reg_info of this APIProviderFunctionDetails. + :rtype: RegistrationInformation + """ + return self._reg_info + + @reg_info.setter + def reg_info(self, reg_info: RegistrationInformation): + """Sets the reg_info of this APIProviderFunctionDetails. + + + :param reg_info: The reg_info of this APIProviderFunctionDetails. + :type reg_info: RegistrationInformation + """ + if reg_info is None: + raise ValueError("Invalid value for `reg_info`, must not be `None`") # noqa: E501 + + self._reg_info = reg_info + + @property + def api_prov_func_role(self) -> ApiProviderFuncRole: + """Gets the api_prov_func_role of this APIProviderFunctionDetails. + + + :return: The api_prov_func_role of this APIProviderFunctionDetails. + :rtype: ApiProviderFuncRole + """ + return self._api_prov_func_role + + @api_prov_func_role.setter + def api_prov_func_role(self, api_prov_func_role: ApiProviderFuncRole): + """Sets the api_prov_func_role of this APIProviderFunctionDetails. + + + :param api_prov_func_role: The api_prov_func_role of this APIProviderFunctionDetails. + :type api_prov_func_role: ApiProviderFuncRole + """ + if api_prov_func_role is None: + raise ValueError("Invalid value for `api_prov_func_role`, must not be `None`") # noqa: E501 + + self._api_prov_func_role = api_prov_func_role + + @property + def api_prov_func_info(self) -> str: + """Gets the api_prov_func_info of this APIProviderFunctionDetails. + + Generic information related to the API provider domain function such as details of the API provider applications. # noqa: E501 + + :return: The api_prov_func_info of this APIProviderFunctionDetails. + :rtype: str + """ + return self._api_prov_func_info + + @api_prov_func_info.setter + def api_prov_func_info(self, api_prov_func_info: str): + """Sets the api_prov_func_info of this APIProviderFunctionDetails. + + Generic information related to the API provider domain function such as details of the API provider applications. # noqa: E501 + + :param api_prov_func_info: The api_prov_func_info of this APIProviderFunctionDetails. + :type api_prov_func_info: str + """ + + self._api_prov_func_info = api_prov_func_info diff --git a/services/helper/helper_service/services/api/models/base_model.py b/services/helper/helper_service/services/api/models/base_model.py new file mode 100644 index 0000000000000000000000000000000000000000..7b48dda28c2c42ed4d6c284a7dad61dc4d88bd5c --- /dev/null +++ b/services/helper/helper_service/services/api/models/base_model.py @@ -0,0 +1,68 @@ +import pprint + +import typing + +from api import util + +T = typing.TypeVar('T') + + +class Model: + # openapiTypes: The key is attribute name and the + # value is attribute type. + openapi_types: typing.Dict[str, type] = {} + + # attributeMap: The key is attribute name and the + # value is json key in definition. + attribute_map: typing.Dict[str, str] = {} + + @classmethod + def from_dict(cls: typing.Type[T], dikt) -> T: + """Returns the dict as a model""" + return util.deserialize_model(dikt, cls) + + def to_dict(self): + """Returns the model properties as a dict + + :rtype: dict + """ + result = {} + + for attr in self.openapi_types: + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model + + :rtype: str + """ + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/services/helper/helper_service/services/api/models/capif_event.py b/services/helper/helper_service/services/api/models/capif_event.py new file mode 100644 index 0000000000000000000000000000000000000000..edf95766e218d16d58a23b088ce6ea5eaad5257b --- /dev/null +++ b/services/helper/helper_service/services/api/models/capif_event.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CAPIFEvent(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """CAPIFEvent - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'CAPIFEvent': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CAPIFEvent of this CAPIFEvent. # noqa: E501 + :rtype: CAPIFEvent + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/capif_event_filter.py b/services/helper/helper_service/services/api/models/capif_event_filter.py new file mode 100644 index 0000000000000000000000000000000000000000..f0f6a138bc83e47fe3ad10838bb0549f0404b699 --- /dev/null +++ b/services/helper/helper_service/services/api/models/capif_event_filter.py @@ -0,0 +1,125 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CAPIFEventFilter(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_ids=None, api_invoker_ids=None, aef_ids=None): # noqa: E501 + """CAPIFEventFilter - a model defined in OpenAPI + + :param api_ids: The api_ids of this CAPIFEventFilter. # noqa: E501 + :type api_ids: List[str] + :param api_invoker_ids: The api_invoker_ids of this CAPIFEventFilter. # noqa: E501 + :type api_invoker_ids: List[str] + :param aef_ids: The aef_ids of this CAPIFEventFilter. # noqa: E501 + :type aef_ids: List[str] + """ + self.openapi_types = { + 'api_ids': List[str], + 'api_invoker_ids': List[str], + 'aef_ids': List[str] + } + + self.attribute_map = { + 'api_ids': 'apiIds', + 'api_invoker_ids': 'apiInvokerIds', + 'aef_ids': 'aefIds' + } + + self._api_ids = api_ids + self._api_invoker_ids = api_invoker_ids + self._aef_ids = aef_ids + + @classmethod + def from_dict(cls, dikt) -> 'CAPIFEventFilter': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CAPIFEventFilter of this CAPIFEventFilter. # noqa: E501 + :rtype: CAPIFEventFilter + """ + return util.deserialize_model(dikt, cls) + + @property + def api_ids(self) -> List[str]: + """Gets the api_ids of this CAPIFEventFilter. + + Identifier of the service API # noqa: E501 + + :return: The api_ids of this CAPIFEventFilter. + :rtype: List[str] + """ + return self._api_ids + + @api_ids.setter + def api_ids(self, api_ids: List[str]): + """Sets the api_ids of this CAPIFEventFilter. + + Identifier of the service API # noqa: E501 + + :param api_ids: The api_ids of this CAPIFEventFilter. + :type api_ids: List[str] + """ + if api_ids is not None and len(api_ids) < 1: + raise ValueError("Invalid value for `api_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_ids = api_ids + + @property + def api_invoker_ids(self) -> List[str]: + """Gets the api_invoker_ids of this CAPIFEventFilter. + + Identity of the API invoker # noqa: E501 + + :return: The api_invoker_ids of this CAPIFEventFilter. + :rtype: List[str] + """ + return self._api_invoker_ids + + @api_invoker_ids.setter + def api_invoker_ids(self, api_invoker_ids: List[str]): + """Sets the api_invoker_ids of this CAPIFEventFilter. + + Identity of the API invoker # noqa: E501 + + :param api_invoker_ids: The api_invoker_ids of this CAPIFEventFilter. + :type api_invoker_ids: List[str] + """ + if api_invoker_ids is not None and len(api_invoker_ids) < 1: + raise ValueError("Invalid value for `api_invoker_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._api_invoker_ids = api_invoker_ids + + @property + def aef_ids(self) -> List[str]: + """Gets the aef_ids of this CAPIFEventFilter. + + Identifier of the API exposing function # noqa: E501 + + :return: The aef_ids of this CAPIFEventFilter. + :rtype: List[str] + """ + return self._aef_ids + + @aef_ids.setter + def aef_ids(self, aef_ids: List[str]): + """Sets the aef_ids of this CAPIFEventFilter. + + Identifier of the API exposing function # noqa: E501 + + :param aef_ids: The aef_ids of this CAPIFEventFilter. + :type aef_ids: List[str] + """ + if aef_ids is not None and len(aef_ids) < 1: + raise ValueError("Invalid value for `aef_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_ids = aef_ids diff --git a/services/helper/helper_service/services/api/models/civic_address.py b/services/helper/helper_service/services/api/models/civic_address.py new file mode 100644 index 0000000000000000000000000000000000000000..736673b25bd6f2305eb82fde496ec9206575b26e --- /dev/null +++ b/services/helper/helper_service/services/api/models/civic_address.py @@ -0,0 +1,919 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CivicAddress(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, country=None, a1=None, a2=None, a3=None, a4=None, a5=None, a6=None, prd=None, pod=None, sts=None, hno=None, hns=None, lmk=None, loc=None, nam=None, pc=None, bld=None, unit=None, flr=None, room=None, plc=None, pcn=None, pobox=None, addcode=None, seat=None, rd=None, rdsec=None, rdbr=None, rdsubbr=None, prm=None, pom=None, usage_rules=None, method=None, provided_by=None): # noqa: E501 + """CivicAddress - a model defined in OpenAPI + + :param country: The country of this CivicAddress. # noqa: E501 + :type country: str + :param a1: The a1 of this CivicAddress. # noqa: E501 + :type a1: str + :param a2: The a2 of this CivicAddress. # noqa: E501 + :type a2: str + :param a3: The a3 of this CivicAddress. # noqa: E501 + :type a3: str + :param a4: The a4 of this CivicAddress. # noqa: E501 + :type a4: str + :param a5: The a5 of this CivicAddress. # noqa: E501 + :type a5: str + :param a6: The a6 of this CivicAddress. # noqa: E501 + :type a6: str + :param prd: The prd of this CivicAddress. # noqa: E501 + :type prd: str + :param pod: The pod of this CivicAddress. # noqa: E501 + :type pod: str + :param sts: The sts of this CivicAddress. # noqa: E501 + :type sts: str + :param hno: The hno of this CivicAddress. # noqa: E501 + :type hno: str + :param hns: The hns of this CivicAddress. # noqa: E501 + :type hns: str + :param lmk: The lmk of this CivicAddress. # noqa: E501 + :type lmk: str + :param loc: The loc of this CivicAddress. # noqa: E501 + :type loc: str + :param nam: The nam of this CivicAddress. # noqa: E501 + :type nam: str + :param pc: The pc of this CivicAddress. # noqa: E501 + :type pc: str + :param bld: The bld of this CivicAddress. # noqa: E501 + :type bld: str + :param unit: The unit of this CivicAddress. # noqa: E501 + :type unit: str + :param flr: The flr of this CivicAddress. # noqa: E501 + :type flr: str + :param room: The room of this CivicAddress. # noqa: E501 + :type room: str + :param plc: The plc of this CivicAddress. # noqa: E501 + :type plc: str + :param pcn: The pcn of this CivicAddress. # noqa: E501 + :type pcn: str + :param pobox: The pobox of this CivicAddress. # noqa: E501 + :type pobox: str + :param addcode: The addcode of this CivicAddress. # noqa: E501 + :type addcode: str + :param seat: The seat of this CivicAddress. # noqa: E501 + :type seat: str + :param rd: The rd of this CivicAddress. # noqa: E501 + :type rd: str + :param rdsec: The rdsec of this CivicAddress. # noqa: E501 + :type rdsec: str + :param rdbr: The rdbr of this CivicAddress. # noqa: E501 + :type rdbr: str + :param rdsubbr: The rdsubbr of this CivicAddress. # noqa: E501 + :type rdsubbr: str + :param prm: The prm of this CivicAddress. # noqa: E501 + :type prm: str + :param pom: The pom of this CivicAddress. # noqa: E501 + :type pom: str + :param usage_rules: The usage_rules of this CivicAddress. # noqa: E501 + :type usage_rules: str + :param method: The method of this CivicAddress. # noqa: E501 + :type method: str + :param provided_by: The provided_by of this CivicAddress. # noqa: E501 + :type provided_by: str + """ + self.openapi_types = { + 'country': str, + 'a1': str, + 'a2': str, + 'a3': str, + 'a4': str, + 'a5': str, + 'a6': str, + 'prd': str, + 'pod': str, + 'sts': str, + 'hno': str, + 'hns': str, + 'lmk': str, + 'loc': str, + 'nam': str, + 'pc': str, + 'bld': str, + 'unit': str, + 'flr': str, + 'room': str, + 'plc': str, + 'pcn': str, + 'pobox': str, + 'addcode': str, + 'seat': str, + 'rd': str, + 'rdsec': str, + 'rdbr': str, + 'rdsubbr': str, + 'prm': str, + 'pom': str, + 'usage_rules': str, + 'method': str, + 'provided_by': str + } + + self.attribute_map = { + 'country': 'country', + 'a1': 'A1', + 'a2': 'A2', + 'a3': 'A3', + 'a4': 'A4', + 'a5': 'A5', + 'a6': 'A6', + 'prd': 'PRD', + 'pod': 'POD', + 'sts': 'STS', + 'hno': 'HNO', + 'hns': 'HNS', + 'lmk': 'LMK', + 'loc': 'LOC', + 'nam': 'NAM', + 'pc': 'PC', + 'bld': 'BLD', + 'unit': 'UNIT', + 'flr': 'FLR', + 'room': 'ROOM', + 'plc': 'PLC', + 'pcn': 'PCN', + 'pobox': 'POBOX', + 'addcode': 'ADDCODE', + 'seat': 'SEAT', + 'rd': 'RD', + 'rdsec': 'RDSEC', + 'rdbr': 'RDBR', + 'rdsubbr': 'RDSUBBR', + 'prm': 'PRM', + 'pom': 'POM', + 'usage_rules': 'usageRules', + 'method': 'method', + 'provided_by': 'providedBy' + } + + self._country = country + self._a1 = a1 + self._a2 = a2 + self._a3 = a3 + self._a4 = a4 + self._a5 = a5 + self._a6 = a6 + self._prd = prd + self._pod = pod + self._sts = sts + self._hno = hno + self._hns = hns + self._lmk = lmk + self._loc = loc + self._nam = nam + self._pc = pc + self._bld = bld + self._unit = unit + self._flr = flr + self._room = room + self._plc = plc + self._pcn = pcn + self._pobox = pobox + self._addcode = addcode + self._seat = seat + self._rd = rd + self._rdsec = rdsec + self._rdbr = rdbr + self._rdsubbr = rdsubbr + self._prm = prm + self._pom = pom + self._usage_rules = usage_rules + self._method = method + self._provided_by = provided_by + + @classmethod + def from_dict(cls, dikt) -> 'CivicAddress': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CivicAddress of this CivicAddress. # noqa: E501 + :rtype: CivicAddress + """ + return util.deserialize_model(dikt, cls) + + @property + def country(self) -> str: + """Gets the country of this CivicAddress. + + + :return: The country of this CivicAddress. + :rtype: str + """ + return self._country + + @country.setter + def country(self, country: str): + """Sets the country of this CivicAddress. + + + :param country: The country of this CivicAddress. + :type country: str + """ + + self._country = country + + @property + def a1(self) -> str: + """Gets the a1 of this CivicAddress. + + + :return: The a1 of this CivicAddress. + :rtype: str + """ + return self._a1 + + @a1.setter + def a1(self, a1: str): + """Sets the a1 of this CivicAddress. + + + :param a1: The a1 of this CivicAddress. + :type a1: str + """ + + self._a1 = a1 + + @property + def a2(self) -> str: + """Gets the a2 of this CivicAddress. + + + :return: The a2 of this CivicAddress. + :rtype: str + """ + return self._a2 + + @a2.setter + def a2(self, a2: str): + """Sets the a2 of this CivicAddress. + + + :param a2: The a2 of this CivicAddress. + :type a2: str + """ + + self._a2 = a2 + + @property + def a3(self) -> str: + """Gets the a3 of this CivicAddress. + + + :return: The a3 of this CivicAddress. + :rtype: str + """ + return self._a3 + + @a3.setter + def a3(self, a3: str): + """Sets the a3 of this CivicAddress. + + + :param a3: The a3 of this CivicAddress. + :type a3: str + """ + + self._a3 = a3 + + @property + def a4(self) -> str: + """Gets the a4 of this CivicAddress. + + + :return: The a4 of this CivicAddress. + :rtype: str + """ + return self._a4 + + @a4.setter + def a4(self, a4: str): + """Sets the a4 of this CivicAddress. + + + :param a4: The a4 of this CivicAddress. + :type a4: str + """ + + self._a4 = a4 + + @property + def a5(self) -> str: + """Gets the a5 of this CivicAddress. + + + :return: The a5 of this CivicAddress. + :rtype: str + """ + return self._a5 + + @a5.setter + def a5(self, a5: str): + """Sets the a5 of this CivicAddress. + + + :param a5: The a5 of this CivicAddress. + :type a5: str + """ + + self._a5 = a5 + + @property + def a6(self) -> str: + """Gets the a6 of this CivicAddress. + + + :return: The a6 of this CivicAddress. + :rtype: str + """ + return self._a6 + + @a6.setter + def a6(self, a6: str): + """Sets the a6 of this CivicAddress. + + + :param a6: The a6 of this CivicAddress. + :type a6: str + """ + + self._a6 = a6 + + @property + def prd(self) -> str: + """Gets the prd of this CivicAddress. + + + :return: The prd of this CivicAddress. + :rtype: str + """ + return self._prd + + @prd.setter + def prd(self, prd: str): + """Sets the prd of this CivicAddress. + + + :param prd: The prd of this CivicAddress. + :type prd: str + """ + + self._prd = prd + + @property + def pod(self) -> str: + """Gets the pod of this CivicAddress. + + + :return: The pod of this CivicAddress. + :rtype: str + """ + return self._pod + + @pod.setter + def pod(self, pod: str): + """Sets the pod of this CivicAddress. + + + :param pod: The pod of this CivicAddress. + :type pod: str + """ + + self._pod = pod + + @property + def sts(self) -> str: + """Gets the sts of this CivicAddress. + + + :return: The sts of this CivicAddress. + :rtype: str + """ + return self._sts + + @sts.setter + def sts(self, sts: str): + """Sets the sts of this CivicAddress. + + + :param sts: The sts of this CivicAddress. + :type sts: str + """ + + self._sts = sts + + @property + def hno(self) -> str: + """Gets the hno of this CivicAddress. + + + :return: The hno of this CivicAddress. + :rtype: str + """ + return self._hno + + @hno.setter + def hno(self, hno: str): + """Sets the hno of this CivicAddress. + + + :param hno: The hno of this CivicAddress. + :type hno: str + """ + + self._hno = hno + + @property + def hns(self) -> str: + """Gets the hns of this CivicAddress. + + + :return: The hns of this CivicAddress. + :rtype: str + """ + return self._hns + + @hns.setter + def hns(self, hns: str): + """Sets the hns of this CivicAddress. + + + :param hns: The hns of this CivicAddress. + :type hns: str + """ + + self._hns = hns + + @property + def lmk(self) -> str: + """Gets the lmk of this CivicAddress. + + + :return: The lmk of this CivicAddress. + :rtype: str + """ + return self._lmk + + @lmk.setter + def lmk(self, lmk: str): + """Sets the lmk of this CivicAddress. + + + :param lmk: The lmk of this CivicAddress. + :type lmk: str + """ + + self._lmk = lmk + + @property + def loc(self) -> str: + """Gets the loc of this CivicAddress. + + + :return: The loc of this CivicAddress. + :rtype: str + """ + return self._loc + + @loc.setter + def loc(self, loc: str): + """Sets the loc of this CivicAddress. + + + :param loc: The loc of this CivicAddress. + :type loc: str + """ + + self._loc = loc + + @property + def nam(self) -> str: + """Gets the nam of this CivicAddress. + + + :return: The nam of this CivicAddress. + :rtype: str + """ + return self._nam + + @nam.setter + def nam(self, nam: str): + """Sets the nam of this CivicAddress. + + + :param nam: The nam of this CivicAddress. + :type nam: str + """ + + self._nam = nam + + @property + def pc(self) -> str: + """Gets the pc of this CivicAddress. + + + :return: The pc of this CivicAddress. + :rtype: str + """ + return self._pc + + @pc.setter + def pc(self, pc: str): + """Sets the pc of this CivicAddress. + + + :param pc: The pc of this CivicAddress. + :type pc: str + """ + + self._pc = pc + + @property + def bld(self) -> str: + """Gets the bld of this CivicAddress. + + + :return: The bld of this CivicAddress. + :rtype: str + """ + return self._bld + + @bld.setter + def bld(self, bld: str): + """Sets the bld of this CivicAddress. + + + :param bld: The bld of this CivicAddress. + :type bld: str + """ + + self._bld = bld + + @property + def unit(self) -> str: + """Gets the unit of this CivicAddress. + + + :return: The unit of this CivicAddress. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit: str): + """Sets the unit of this CivicAddress. + + + :param unit: The unit of this CivicAddress. + :type unit: str + """ + + self._unit = unit + + @property + def flr(self) -> str: + """Gets the flr of this CivicAddress. + + + :return: The flr of this CivicAddress. + :rtype: str + """ + return self._flr + + @flr.setter + def flr(self, flr: str): + """Sets the flr of this CivicAddress. + + + :param flr: The flr of this CivicAddress. + :type flr: str + """ + + self._flr = flr + + @property + def room(self) -> str: + """Gets the room of this CivicAddress. + + + :return: The room of this CivicAddress. + :rtype: str + """ + return self._room + + @room.setter + def room(self, room: str): + """Sets the room of this CivicAddress. + + + :param room: The room of this CivicAddress. + :type room: str + """ + + self._room = room + + @property + def plc(self) -> str: + """Gets the plc of this CivicAddress. + + + :return: The plc of this CivicAddress. + :rtype: str + """ + return self._plc + + @plc.setter + def plc(self, plc: str): + """Sets the plc of this CivicAddress. + + + :param plc: The plc of this CivicAddress. + :type plc: str + """ + + self._plc = plc + + @property + def pcn(self) -> str: + """Gets the pcn of this CivicAddress. + + + :return: The pcn of this CivicAddress. + :rtype: str + """ + return self._pcn + + @pcn.setter + def pcn(self, pcn: str): + """Sets the pcn of this CivicAddress. + + + :param pcn: The pcn of this CivicAddress. + :type pcn: str + """ + + self._pcn = pcn + + @property + def pobox(self) -> str: + """Gets the pobox of this CivicAddress. + + + :return: The pobox of this CivicAddress. + :rtype: str + """ + return self._pobox + + @pobox.setter + def pobox(self, pobox: str): + """Sets the pobox of this CivicAddress. + + + :param pobox: The pobox of this CivicAddress. + :type pobox: str + """ + + self._pobox = pobox + + @property + def addcode(self) -> str: + """Gets the addcode of this CivicAddress. + + + :return: The addcode of this CivicAddress. + :rtype: str + """ + return self._addcode + + @addcode.setter + def addcode(self, addcode: str): + """Sets the addcode of this CivicAddress. + + + :param addcode: The addcode of this CivicAddress. + :type addcode: str + """ + + self._addcode = addcode + + @property + def seat(self) -> str: + """Gets the seat of this CivicAddress. + + + :return: The seat of this CivicAddress. + :rtype: str + """ + return self._seat + + @seat.setter + def seat(self, seat: str): + """Sets the seat of this CivicAddress. + + + :param seat: The seat of this CivicAddress. + :type seat: str + """ + + self._seat = seat + + @property + def rd(self) -> str: + """Gets the rd of this CivicAddress. + + + :return: The rd of this CivicAddress. + :rtype: str + """ + return self._rd + + @rd.setter + def rd(self, rd: str): + """Sets the rd of this CivicAddress. + + + :param rd: The rd of this CivicAddress. + :type rd: str + """ + + self._rd = rd + + @property + def rdsec(self) -> str: + """Gets the rdsec of this CivicAddress. + + + :return: The rdsec of this CivicAddress. + :rtype: str + """ + return self._rdsec + + @rdsec.setter + def rdsec(self, rdsec: str): + """Sets the rdsec of this CivicAddress. + + + :param rdsec: The rdsec of this CivicAddress. + :type rdsec: str + """ + + self._rdsec = rdsec + + @property + def rdbr(self) -> str: + """Gets the rdbr of this CivicAddress. + + + :return: The rdbr of this CivicAddress. + :rtype: str + """ + return self._rdbr + + @rdbr.setter + def rdbr(self, rdbr: str): + """Sets the rdbr of this CivicAddress. + + + :param rdbr: The rdbr of this CivicAddress. + :type rdbr: str + """ + + self._rdbr = rdbr + + @property + def rdsubbr(self) -> str: + """Gets the rdsubbr of this CivicAddress. + + + :return: The rdsubbr of this CivicAddress. + :rtype: str + """ + return self._rdsubbr + + @rdsubbr.setter + def rdsubbr(self, rdsubbr: str): + """Sets the rdsubbr of this CivicAddress. + + + :param rdsubbr: The rdsubbr of this CivicAddress. + :type rdsubbr: str + """ + + self._rdsubbr = rdsubbr + + @property + def prm(self) -> str: + """Gets the prm of this CivicAddress. + + + :return: The prm of this CivicAddress. + :rtype: str + """ + return self._prm + + @prm.setter + def prm(self, prm: str): + """Sets the prm of this CivicAddress. + + + :param prm: The prm of this CivicAddress. + :type prm: str + """ + + self._prm = prm + + @property + def pom(self) -> str: + """Gets the pom of this CivicAddress. + + + :return: The pom of this CivicAddress. + :rtype: str + """ + return self._pom + + @pom.setter + def pom(self, pom: str): + """Sets the pom of this CivicAddress. + + + :param pom: The pom of this CivicAddress. + :type pom: str + """ + + self._pom = pom + + @property + def usage_rules(self) -> str: + """Gets the usage_rules of this CivicAddress. + + + :return: The usage_rules of this CivicAddress. + :rtype: str + """ + return self._usage_rules + + @usage_rules.setter + def usage_rules(self, usage_rules: str): + """Sets the usage_rules of this CivicAddress. + + + :param usage_rules: The usage_rules of this CivicAddress. + :type usage_rules: str + """ + + self._usage_rules = usage_rules + + @property + def method(self) -> str: + """Gets the method of this CivicAddress. + + + :return: The method of this CivicAddress. + :rtype: str + """ + return self._method + + @method.setter + def method(self, method: str): + """Sets the method of this CivicAddress. + + + :param method: The method of this CivicAddress. + :type method: str + """ + + self._method = method + + @property + def provided_by(self) -> str: + """Gets the provided_by of this CivicAddress. + + + :return: The provided_by of this CivicAddress. + :rtype: str + """ + return self._provided_by + + @provided_by.setter + def provided_by(self, provided_by: str): + """Sets the provided_by of this CivicAddress. + + + :param provided_by: The provided_by of this CivicAddress. + :type provided_by: str + """ + + self._provided_by = provided_by diff --git a/services/helper/helper_service/services/api/models/communication_type.py b/services/helper/helper_service/services/api/models/communication_type.py new file mode 100644 index 0000000000000000000000000000000000000000..03b51da9f2dc5b8e16d466cbf0c7d9f04feb7f20 --- /dev/null +++ b/services/helper/helper_service/services/api/models/communication_type.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class CommunicationType(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """CommunicationType - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'CommunicationType': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CommunicationType of this CommunicationType. # noqa: E501 + :rtype: CommunicationType + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/custom_operation.py b/services/helper/helper_service/services/api/models/custom_operation.py new file mode 100644 index 0000000000000000000000000000000000000000..19fefc74f5539ce94fa82d84402ed5d7b2df7785 --- /dev/null +++ b/services/helper/helper_service/services/api/models/custom_operation.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.communication_type import CommunicationType +from api.models.operation import Operation +from api import util + +from api.models.communication_type import CommunicationType # noqa: E501 +from api.models.operation import Operation # noqa: E501 + +class CustomOperation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, comm_type=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """CustomOperation - a model defined in OpenAPI + + :param comm_type: The comm_type of this CustomOperation. # noqa: E501 + :type comm_type: CommunicationType + :param cust_op_name: The cust_op_name of this CustomOperation. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this CustomOperation. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this CustomOperation. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'comm_type': CommunicationType, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'comm_type': 'commType', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._comm_type = comm_type + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'CustomOperation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CustomOperation of this CustomOperation. # noqa: E501 + :rtype: CustomOperation + """ + return util.deserialize_model(dikt, cls) + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this CustomOperation. + + + :return: The comm_type of this CustomOperation. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this CustomOperation. + + + :param comm_type: The comm_type of this CustomOperation. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this CustomOperation. + + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The cust_op_name of this CustomOperation. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this CustomOperation. + + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param cust_op_name: The cust_op_name of this CustomOperation. + :type cust_op_name: str + """ + if cust_op_name is None: + raise ValueError("Invalid value for `cust_op_name`, must not be `None`") # noqa: E501 + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this CustomOperation. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :return: The operations of this CustomOperation. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this CustomOperation. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :param operations: The operations of this CustomOperation. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this CustomOperation. + + Text description of the custom operation # noqa: E501 + + :return: The description of this CustomOperation. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this CustomOperation. + + Text description of the custom operation # noqa: E501 + + :param description: The description of this CustomOperation. + :type description: str + """ + + self._description = description diff --git a/services/helper/helper_service/services/api/models/data_format.py b/services/helper/helper_service/services/api/models/data_format.py new file mode 100644 index 0000000000000000000000000000000000000000..d58cc9ed2cb8731d84a04150da99f741fbb4a22a --- /dev/null +++ b/services/helper/helper_service/services/api/models/data_format.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class DataFormat(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """DataFormat - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'DataFormat': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataFormat of this DataFormat. # noqa: E501 + :rtype: DataFormat + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/ellipsoid_arc.py b/services/helper/helper_service/services/api/models/ellipsoid_arc.py new file mode 100644 index 0000000000000000000000000000000000000000..21fbfcb02089c609c4be022b29dbccfc4732a2ff --- /dev/null +++ b/services/helper/helper_service/services/api/models/ellipsoid_arc.py @@ -0,0 +1,265 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class EllipsoidArc(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, inner_radius=None, uncertainty_radius=None, offset_angle=None, included_angle=None, confidence=None): # noqa: E501 + """EllipsoidArc - a model defined in OpenAPI + + :param shape: The shape of this EllipsoidArc. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this EllipsoidArc. # noqa: E501 + :type point: GeographicalCoordinates + :param inner_radius: The inner_radius of this EllipsoidArc. # noqa: E501 + :type inner_radius: int + :param uncertainty_radius: The uncertainty_radius of this EllipsoidArc. # noqa: E501 + :type uncertainty_radius: float + :param offset_angle: The offset_angle of this EllipsoidArc. # noqa: E501 + :type offset_angle: int + :param included_angle: The included_angle of this EllipsoidArc. # noqa: E501 + :type included_angle: int + :param confidence: The confidence of this EllipsoidArc. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'inner_radius': int, + 'uncertainty_radius': float, + 'offset_angle': int, + 'included_angle': int, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'inner_radius': 'innerRadius', + 'uncertainty_radius': 'uncertaintyRadius', + 'offset_angle': 'offsetAngle', + 'included_angle': 'includedAngle', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._inner_radius = inner_radius + self._uncertainty_radius = uncertainty_radius + self._offset_angle = offset_angle + self._included_angle = included_angle + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'EllipsoidArc': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EllipsoidArc of this EllipsoidArc. # noqa: E501 + :rtype: EllipsoidArc + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this EllipsoidArc. + + + :return: The shape of this EllipsoidArc. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this EllipsoidArc. + + + :param shape: The shape of this EllipsoidArc. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this EllipsoidArc. + + + :return: The point of this EllipsoidArc. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this EllipsoidArc. + + + :param point: The point of this EllipsoidArc. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def inner_radius(self) -> int: + """Gets the inner_radius of this EllipsoidArc. + + Indicates value of the inner radius. # noqa: E501 + + :return: The inner_radius of this EllipsoidArc. + :rtype: int + """ + return self._inner_radius + + @inner_radius.setter + def inner_radius(self, inner_radius: int): + """Sets the inner_radius of this EllipsoidArc. + + Indicates value of the inner radius. # noqa: E501 + + :param inner_radius: The inner_radius of this EllipsoidArc. + :type inner_radius: int + """ + if inner_radius is None: + raise ValueError("Invalid value for `inner_radius`, must not be `None`") # noqa: E501 + if inner_radius is not None and inner_radius > 327675: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value less than or equal to `327675`") # noqa: E501 + if inner_radius is not None and inner_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._inner_radius = inner_radius + + @property + def uncertainty_radius(self) -> float: + """Gets the uncertainty_radius of this EllipsoidArc. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_radius of this EllipsoidArc. + :rtype: float + """ + return self._uncertainty_radius + + @uncertainty_radius.setter + def uncertainty_radius(self, uncertainty_radius: float): + """Sets the uncertainty_radius of this EllipsoidArc. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_radius: The uncertainty_radius of this EllipsoidArc. + :type uncertainty_radius: float + """ + if uncertainty_radius is None: + raise ValueError("Invalid value for `uncertainty_radius`, must not be `None`") # noqa: E501 + if uncertainty_radius is not None and uncertainty_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_radius = uncertainty_radius + + @property + def offset_angle(self) -> int: + """Gets the offset_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :return: The offset_angle of this EllipsoidArc. + :rtype: int + """ + return self._offset_angle + + @offset_angle.setter + def offset_angle(self, offset_angle: int): + """Sets the offset_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :param offset_angle: The offset_angle of this EllipsoidArc. + :type offset_angle: int + """ + if offset_angle is None: + raise ValueError("Invalid value for `offset_angle`, must not be `None`") # noqa: E501 + if offset_angle is not None and offset_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value less than or equal to `360`") # noqa: E501 + if offset_angle is not None and offset_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._offset_angle = offset_angle + + @property + def included_angle(self) -> int: + """Gets the included_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :return: The included_angle of this EllipsoidArc. + :rtype: int + """ + return self._included_angle + + @included_angle.setter + def included_angle(self, included_angle: int): + """Sets the included_angle of this EllipsoidArc. + + Indicates value of angle. # noqa: E501 + + :param included_angle: The included_angle of this EllipsoidArc. + :type included_angle: int + """ + if included_angle is None: + raise ValueError("Invalid value for `included_angle`, must not be `None`") # noqa: E501 + if included_angle is not None and included_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value less than or equal to `360`") # noqa: E501 + if included_angle is not None and included_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._included_angle = included_angle + + @property + def confidence(self) -> int: + """Gets the confidence of this EllipsoidArc. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this EllipsoidArc. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this EllipsoidArc. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this EllipsoidArc. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/helper/helper_service/services/api/models/error_response.py b/services/helper/helper_service/services/api/models/error_response.py new file mode 100644 index 0000000000000000000000000000000000000000..1748be6fd9fd9f92c3f961b570b67e721fd75d62 --- /dev/null +++ b/services/helper/helper_service/services/api/models/error_response.py @@ -0,0 +1,87 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class ErrorResponse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, message=None, details=None): # noqa: E501 + """ErrorResponse - a model defined in OpenAPI + + :param message: The message of this ErrorResponse. # noqa: E501 + :type message: str + :param details: The details of this ErrorResponse. # noqa: E501 + :type details: str + """ + self.openapi_types = { + 'message': str, + 'details': str + } + + self.attribute_map = { + 'message': 'message', + 'details': 'details' + } + + self._message = message + self._details = details + + @classmethod + def from_dict(cls, dikt) -> 'ErrorResponse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ErrorResponse of this ErrorResponse. # noqa: E501 + :rtype: ErrorResponse + """ + return util.deserialize_model(dikt, cls) + + @property + def message(self) -> str: + """Gets the message of this ErrorResponse. + + + :return: The message of this ErrorResponse. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message: str): + """Sets the message of this ErrorResponse. + + + :param message: The message of this ErrorResponse. + :type message: str + """ + + self._message = message + + @property + def details(self) -> str: + """Gets the details of this ErrorResponse. + + + :return: The details of this ErrorResponse. + :rtype: str + """ + return self._details + + @details.setter + def details(self, details: str): + """Sets the details of this ErrorResponse. + + + :param details: The details of this ErrorResponse. + :type details: str + """ + + self._details = details diff --git a/services/helper/helper_service/services/api/models/event_subscription.py b/services/helper/helper_service/services/api/models/event_subscription.py new file mode 100644 index 0000000000000000000000000000000000000000..ea6429c7b7fe595e95131011994382c6d56b0f4f --- /dev/null +++ b/services/helper/helper_service/services/api/models/event_subscription.py @@ -0,0 +1,247 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.capif_event import CAPIFEvent +from api.models.capif_event_filter import CAPIFEventFilter +from api.models.reporting_information import ReportingInformation +from api.models.websock_notif_config import WebsockNotifConfig +import re +from api import util + +from api.models.capif_event import CAPIFEvent # noqa: E501 +from api.models.capif_event_filter import CAPIFEventFilter # noqa: E501 +from api.models.reporting_information import ReportingInformation # noqa: E501 +from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 +import re # noqa: E501 + +class EventSubscription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, events=None, event_filters=None, event_req=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, supported_features=None): # noqa: E501 + """EventSubscription - a model defined in OpenAPI + + :param events: The events of this EventSubscription. # noqa: E501 + :type events: List[CAPIFEvent] + :param event_filters: The event_filters of this EventSubscription. # noqa: E501 + :type event_filters: List[CAPIFEventFilter] + :param event_req: The event_req of this EventSubscription. # noqa: E501 + :type event_req: ReportingInformation + :param notification_destination: The notification_destination of this EventSubscription. # noqa: E501 + :type notification_destination: str + :param request_test_notification: The request_test_notification of this EventSubscription. # noqa: E501 + :type request_test_notification: bool + :param websock_notif_config: The websock_notif_config of this EventSubscription. # noqa: E501 + :type websock_notif_config: WebsockNotifConfig + :param supported_features: The supported_features of this EventSubscription. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'events': List[CAPIFEvent], + 'event_filters': List[CAPIFEventFilter], + 'event_req': ReportingInformation, + 'notification_destination': str, + 'request_test_notification': bool, + 'websock_notif_config': WebsockNotifConfig, + 'supported_features': str + } + + self.attribute_map = { + 'events': 'events', + 'event_filters': 'eventFilters', + 'event_req': 'eventReq', + 'notification_destination': 'notificationDestination', + 'request_test_notification': 'requestTestNotification', + 'websock_notif_config': 'websockNotifConfig', + 'supported_features': 'supportedFeatures' + } + + self._events = events + self._event_filters = event_filters + self._event_req = event_req + self._notification_destination = notification_destination + self._request_test_notification = request_test_notification + self._websock_notif_config = websock_notif_config + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'EventSubscription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EventSubscription of this EventSubscription. # noqa: E501 + :rtype: EventSubscription + """ + return util.deserialize_model(dikt, cls) + + @property + def events(self) -> List[CAPIFEvent]: + """Gets the events of this EventSubscription. + + Subscribed events # noqa: E501 + + :return: The events of this EventSubscription. + :rtype: List[CAPIFEvent] + """ + return self._events + + @events.setter + def events(self, events: List[CAPIFEvent]): + """Sets the events of this EventSubscription. + + Subscribed events # noqa: E501 + + :param events: The events of this EventSubscription. + :type events: List[CAPIFEvent] + """ + if events is None: + raise ValueError("Invalid value for `events`, must not be `None`") # noqa: E501 + if events is not None and len(events) < 1: + raise ValueError("Invalid value for `events`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._events = events + + @property + def event_filters(self) -> List[CAPIFEventFilter]: + """Gets the event_filters of this EventSubscription. + + Subscribed event filters # noqa: E501 + + :return: The event_filters of this EventSubscription. + :rtype: List[CAPIFEventFilter] + """ + return self._event_filters + + @event_filters.setter + def event_filters(self, event_filters: List[CAPIFEventFilter]): + """Sets the event_filters of this EventSubscription. + + Subscribed event filters # noqa: E501 + + :param event_filters: The event_filters of this EventSubscription. + :type event_filters: List[CAPIFEventFilter] + """ + if event_filters is not None and len(event_filters) < 1: + raise ValueError("Invalid value for `event_filters`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._event_filters = event_filters + + @property + def event_req(self) -> ReportingInformation: + """Gets the event_req of this EventSubscription. + + + :return: The event_req of this EventSubscription. + :rtype: ReportingInformation + """ + return self._event_req + + @event_req.setter + def event_req(self, event_req: ReportingInformation): + """Sets the event_req of this EventSubscription. + + + :param event_req: The event_req of this EventSubscription. + :type event_req: ReportingInformation + """ + + self._event_req = event_req + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this EventSubscription. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this EventSubscription. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this EventSubscription. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this EventSubscription. + :type notification_destination: str + """ + if notification_destination is None: + raise ValueError("Invalid value for `notification_destination`, must not be `None`") # noqa: E501 + + self._notification_destination = notification_destination + + @property + def request_test_notification(self) -> bool: + """Gets the request_test_notification of this EventSubscription. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :return: The request_test_notification of this EventSubscription. + :rtype: bool + """ + return self._request_test_notification + + @request_test_notification.setter + def request_test_notification(self, request_test_notification: bool): + """Sets the request_test_notification of this EventSubscription. + + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :param request_test_notification: The request_test_notification of this EventSubscription. + :type request_test_notification: bool + """ + + self._request_test_notification = request_test_notification + + @property + def websock_notif_config(self) -> WebsockNotifConfig: + """Gets the websock_notif_config of this EventSubscription. + + + :return: The websock_notif_config of this EventSubscription. + :rtype: WebsockNotifConfig + """ + return self._websock_notif_config + + @websock_notif_config.setter + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): + """Sets the websock_notif_config of this EventSubscription. + + + :param websock_notif_config: The websock_notif_config of this EventSubscription. + :type websock_notif_config: WebsockNotifConfig + """ + + self._websock_notif_config = websock_notif_config + + @property + def supported_features(self) -> str: + """Gets the supported_features of this EventSubscription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this EventSubscription. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this EventSubscription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this EventSubscription. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/helper/helper_service/services/api/models/gad_shape.py b/services/helper/helper_service/services/api/models/gad_shape.py new file mode 100644 index 0000000000000000000000000000000000000000..291b6528c623f22fa5423125c5421a18d1b64e1b --- /dev/null +++ b/services/helper/helper_service/services/api/models/gad_shape.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class GADShape(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None): # noqa: E501 + """GADShape - a model defined in OpenAPI + + :param shape: The shape of this GADShape. # noqa: E501 + :type shape: SupportedGADShapes + """ + self.openapi_types = { + 'shape': SupportedGADShapes + } + + self.attribute_map = { + 'shape': 'shape' + } + + self._shape = shape + + @classmethod + def from_dict(cls, dikt) -> 'GADShape': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GADShape of this GADShape. # noqa: E501 + :rtype: GADShape + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this GADShape. + + + :return: The shape of this GADShape. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this GADShape. + + + :param shape: The shape of this GADShape. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape diff --git a/services/helper/helper_service/services/api/models/geographic_area.py b/services/helper/helper_service/services/api/models/geographic_area.py new file mode 100644 index 0000000000000000000000000000000000000000..0b402441aa3c0663a1689961f06df1c32e47c098 --- /dev/null +++ b/services/helper/helper_service/services/api/models/geographic_area.py @@ -0,0 +1,439 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.ellipsoid_arc import EllipsoidArc +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.point import Point +from api.models.point_altitude import PointAltitude +from api.models.point_altitude_uncertainty import PointAltitudeUncertainty +from api.models.point_uncertainty_circle import PointUncertaintyCircle +from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse +from api.models.polygon import Polygon +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api import util + +from api.models.ellipsoid_arc import EllipsoidArc # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.point import Point # noqa: E501 +from api.models.point_altitude import PointAltitude # noqa: E501 +from api.models.point_altitude_uncertainty import PointAltitudeUncertainty # noqa: E501 +from api.models.point_uncertainty_circle import PointUncertaintyCircle # noqa: E501 +from api.models.point_uncertainty_ellipse import PointUncertaintyEllipse # noqa: E501 +from api.models.polygon import Polygon # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class GeographicArea(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty=None, uncertainty_ellipse=None, confidence=None, point_list=None, altitude=None, uncertainty_altitude=None, inner_radius=None, uncertainty_radius=None, offset_angle=None, included_angle=None): # noqa: E501 + """GeographicArea - a model defined in OpenAPI + + :param shape: The shape of this GeographicArea. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this GeographicArea. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty: The uncertainty of this GeographicArea. # noqa: E501 + :type uncertainty: float + :param uncertainty_ellipse: The uncertainty_ellipse of this GeographicArea. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this GeographicArea. # noqa: E501 + :type confidence: int + :param point_list: The point_list of this GeographicArea. # noqa: E501 + :type point_list: List[GeographicalCoordinates] + :param altitude: The altitude of this GeographicArea. # noqa: E501 + :type altitude: float + :param uncertainty_altitude: The uncertainty_altitude of this GeographicArea. # noqa: E501 + :type uncertainty_altitude: float + :param inner_radius: The inner_radius of this GeographicArea. # noqa: E501 + :type inner_radius: int + :param uncertainty_radius: The uncertainty_radius of this GeographicArea. # noqa: E501 + :type uncertainty_radius: float + :param offset_angle: The offset_angle of this GeographicArea. # noqa: E501 + :type offset_angle: int + :param included_angle: The included_angle of this GeographicArea. # noqa: E501 + :type included_angle: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty': float, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int, + 'point_list': List[GeographicalCoordinates], + 'altitude': float, + 'uncertainty_altitude': float, + 'inner_radius': int, + 'uncertainty_radius': float, + 'offset_angle': int, + 'included_angle': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty': 'uncertainty', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence', + 'point_list': 'pointList', + 'altitude': 'altitude', + 'uncertainty_altitude': 'uncertaintyAltitude', + 'inner_radius': 'innerRadius', + 'uncertainty_radius': 'uncertaintyRadius', + 'offset_angle': 'offsetAngle', + 'included_angle': 'includedAngle' + } + + self._shape = shape + self._point = point + self._uncertainty = uncertainty + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + self._point_list = point_list + self._altitude = altitude + self._uncertainty_altitude = uncertainty_altitude + self._inner_radius = inner_radius + self._uncertainty_radius = uncertainty_radius + self._offset_angle = offset_angle + self._included_angle = included_angle + + @classmethod + def from_dict(cls, dikt) -> 'GeographicArea': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GeographicArea of this GeographicArea. # noqa: E501 + :rtype: GeographicArea + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this GeographicArea. + + + :return: The shape of this GeographicArea. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this GeographicArea. + + + :param shape: The shape of this GeographicArea. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this GeographicArea. + + + :return: The point of this GeographicArea. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this GeographicArea. + + + :param point: The point of this GeographicArea. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty(self) -> float: + """Gets the uncertainty of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty of this GeographicArea. + :rtype: float + """ + return self._uncertainty + + @uncertainty.setter + def uncertainty(self, uncertainty: float): + """Sets the uncertainty of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty: The uncertainty of this GeographicArea. + :type uncertainty: float + """ + if uncertainty is None: + raise ValueError("Invalid value for `uncertainty`, must not be `None`") # noqa: E501 + if uncertainty is not None and uncertainty < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty = uncertainty + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this GeographicArea. + + + :return: The uncertainty_ellipse of this GeographicArea. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this GeographicArea. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this GeographicArea. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this GeographicArea. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this GeographicArea. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this GeographicArea. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence + + @property + def point_list(self) -> List[GeographicalCoordinates]: + """Gets the point_list of this GeographicArea. + + List of points. # noqa: E501 + + :return: The point_list of this GeographicArea. + :rtype: List[GeographicalCoordinates] + """ + return self._point_list + + @point_list.setter + def point_list(self, point_list: List[GeographicalCoordinates]): + """Sets the point_list of this GeographicArea. + + List of points. # noqa: E501 + + :param point_list: The point_list of this GeographicArea. + :type point_list: List[GeographicalCoordinates] + """ + if point_list is None: + raise ValueError("Invalid value for `point_list`, must not be `None`") # noqa: E501 + if point_list is not None and len(point_list) > 15: + raise ValueError("Invalid value for `point_list`, number of items must be less than or equal to `15`") # noqa: E501 + if point_list is not None and len(point_list) < 3: + raise ValueError("Invalid value for `point_list`, number of items must be greater than or equal to `3`") # noqa: E501 + + self._point_list = point_list + + @property + def altitude(self) -> float: + """Gets the altitude of this GeographicArea. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this GeographicArea. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this GeographicArea. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this GeographicArea. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude + + @property + def uncertainty_altitude(self) -> float: + """Gets the uncertainty_altitude of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_altitude of this GeographicArea. + :rtype: float + """ + return self._uncertainty_altitude + + @uncertainty_altitude.setter + def uncertainty_altitude(self, uncertainty_altitude: float): + """Sets the uncertainty_altitude of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_altitude: The uncertainty_altitude of this GeographicArea. + :type uncertainty_altitude: float + """ + if uncertainty_altitude is None: + raise ValueError("Invalid value for `uncertainty_altitude`, must not be `None`") # noqa: E501 + if uncertainty_altitude is not None and uncertainty_altitude < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_altitude`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_altitude = uncertainty_altitude + + @property + def inner_radius(self) -> int: + """Gets the inner_radius of this GeographicArea. + + Indicates value of the inner radius. # noqa: E501 + + :return: The inner_radius of this GeographicArea. + :rtype: int + """ + return self._inner_radius + + @inner_radius.setter + def inner_radius(self, inner_radius: int): + """Sets the inner_radius of this GeographicArea. + + Indicates value of the inner radius. # noqa: E501 + + :param inner_radius: The inner_radius of this GeographicArea. + :type inner_radius: int + """ + if inner_radius is None: + raise ValueError("Invalid value for `inner_radius`, must not be `None`") # noqa: E501 + if inner_radius is not None and inner_radius > 327675: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value less than or equal to `327675`") # noqa: E501 + if inner_radius is not None and inner_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `inner_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._inner_radius = inner_radius + + @property + def uncertainty_radius(self) -> float: + """Gets the uncertainty_radius of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_radius of this GeographicArea. + :rtype: float + """ + return self._uncertainty_radius + + @uncertainty_radius.setter + def uncertainty_radius(self, uncertainty_radius: float): + """Sets the uncertainty_radius of this GeographicArea. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_radius: The uncertainty_radius of this GeographicArea. + :type uncertainty_radius: float + """ + if uncertainty_radius is None: + raise ValueError("Invalid value for `uncertainty_radius`, must not be `None`") # noqa: E501 + if uncertainty_radius is not None and uncertainty_radius < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_radius`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_radius = uncertainty_radius + + @property + def offset_angle(self) -> int: + """Gets the offset_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :return: The offset_angle of this GeographicArea. + :rtype: int + """ + return self._offset_angle + + @offset_angle.setter + def offset_angle(self, offset_angle: int): + """Sets the offset_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :param offset_angle: The offset_angle of this GeographicArea. + :type offset_angle: int + """ + if offset_angle is None: + raise ValueError("Invalid value for `offset_angle`, must not be `None`") # noqa: E501 + if offset_angle is not None and offset_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value less than or equal to `360`") # noqa: E501 + if offset_angle is not None and offset_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `offset_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._offset_angle = offset_angle + + @property + def included_angle(self) -> int: + """Gets the included_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :return: The included_angle of this GeographicArea. + :rtype: int + """ + return self._included_angle + + @included_angle.setter + def included_angle(self, included_angle: int): + """Sets the included_angle of this GeographicArea. + + Indicates value of angle. # noqa: E501 + + :param included_angle: The included_angle of this GeographicArea. + :type included_angle: int + """ + if included_angle is None: + raise ValueError("Invalid value for `included_angle`, must not be `None`") # noqa: E501 + if included_angle is not None and included_angle > 360: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value less than or equal to `360`") # noqa: E501 + if included_angle is not None and included_angle < 0: # noqa: E501 + raise ValueError("Invalid value for `included_angle`, must be a value greater than or equal to `0`") # noqa: E501 + + self._included_angle = included_angle diff --git a/services/helper/helper_service/services/api/models/geographical_coordinates.py b/services/helper/helper_service/services/api/models/geographical_coordinates.py new file mode 100644 index 0000000000000000000000000000000000000000..86ffac3a922c43fdd123d32e2c72a0edf6f02942 --- /dev/null +++ b/services/helper/helper_service/services/api/models/geographical_coordinates.py @@ -0,0 +1,99 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class GeographicalCoordinates(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, lon=None, lat=None): # noqa: E501 + """GeographicalCoordinates - a model defined in OpenAPI + + :param lon: The lon of this GeographicalCoordinates. # noqa: E501 + :type lon: float + :param lat: The lat of this GeographicalCoordinates. # noqa: E501 + :type lat: float + """ + self.openapi_types = { + 'lon': float, + 'lat': float + } + + self.attribute_map = { + 'lon': 'lon', + 'lat': 'lat' + } + + self._lon = lon + self._lat = lat + + @classmethod + def from_dict(cls, dikt) -> 'GeographicalCoordinates': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GeographicalCoordinates of this GeographicalCoordinates. # noqa: E501 + :rtype: GeographicalCoordinates + """ + return util.deserialize_model(dikt, cls) + + @property + def lon(self) -> float: + """Gets the lon of this GeographicalCoordinates. + + + :return: The lon of this GeographicalCoordinates. + :rtype: float + """ + return self._lon + + @lon.setter + def lon(self, lon: float): + """Sets the lon of this GeographicalCoordinates. + + + :param lon: The lon of this GeographicalCoordinates. + :type lon: float + """ + if lon is None: + raise ValueError("Invalid value for `lon`, must not be `None`") # noqa: E501 + if lon is not None and lon > 180: # noqa: E501 + raise ValueError("Invalid value for `lon`, must be a value less than or equal to `180`") # noqa: E501 + if lon is not None and lon < -180: # noqa: E501 + raise ValueError("Invalid value for `lon`, must be a value greater than or equal to `-180`") # noqa: E501 + + self._lon = lon + + @property + def lat(self) -> float: + """Gets the lat of this GeographicalCoordinates. + + + :return: The lat of this GeographicalCoordinates. + :rtype: float + """ + return self._lat + + @lat.setter + def lat(self, lat: float): + """Sets the lat of this GeographicalCoordinates. + + + :param lat: The lat of this GeographicalCoordinates. + :type lat: float + """ + if lat is None: + raise ValueError("Invalid value for `lat`, must not be `None`") # noqa: E501 + if lat is not None and lat > 90: # noqa: E501 + raise ValueError("Invalid value for `lat`, must be a value less than or equal to `90`") # noqa: E501 + if lat is not None and lat < -90: # noqa: E501 + raise ValueError("Invalid value for `lat`, must be a value greater than or equal to `-90`") # noqa: E501 + + self._lat = lat diff --git a/services/helper/helper_service/services/api/models/interface_description.py b/services/helper/helper_service/services/api/models/interface_description.py new file mode 100644 index 0000000000000000000000000000000000000000..64a9e1bf07e4187ac78b266ba52f0ce4b350de86 --- /dev/null +++ b/services/helper/helper_service/services/api/models/interface_description.py @@ -0,0 +1,155 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.security_method import SecurityMethod +from api import util + +from api.models.security_method import SecurityMethod # noqa: E501 + +class InterfaceDescription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ipv4_addr=None, ipv6_addr=None, port=None, security_methods=None): # noqa: E501 + """InterfaceDescription - a model defined in OpenAPI + + :param ipv4_addr: The ipv4_addr of this InterfaceDescription. # noqa: E501 + :type ipv4_addr: str + :param ipv6_addr: The ipv6_addr of this InterfaceDescription. # noqa: E501 + :type ipv6_addr: str + :param port: The port of this InterfaceDescription. # noqa: E501 + :type port: int + :param security_methods: The security_methods of this InterfaceDescription. # noqa: E501 + :type security_methods: List[SecurityMethod] + """ + self.openapi_types = { + 'ipv4_addr': str, + 'ipv6_addr': str, + 'port': int, + 'security_methods': List[SecurityMethod] + } + + self.attribute_map = { + 'ipv4_addr': 'ipv4Addr', + 'ipv6_addr': 'ipv6Addr', + 'port': 'port', + 'security_methods': 'securityMethods' + } + + self._ipv4_addr = ipv4_addr + self._ipv6_addr = ipv6_addr + self._port = port + self._security_methods = security_methods + + @classmethod + def from_dict(cls, dikt) -> 'InterfaceDescription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The InterfaceDescription of this InterfaceDescription. # noqa: E501 + :rtype: InterfaceDescription + """ + return util.deserialize_model(dikt, cls) + + @property + def ipv4_addr(self) -> str: + """Gets the ipv4_addr of this InterfaceDescription. + + string identifying a Ipv4 address formatted in the \"dotted decimal\" notation as defined in IETF RFC 1166. # noqa: E501 + + :return: The ipv4_addr of this InterfaceDescription. + :rtype: str + """ + return self._ipv4_addr + + @ipv4_addr.setter + def ipv4_addr(self, ipv4_addr: str): + """Sets the ipv4_addr of this InterfaceDescription. + + string identifying a Ipv4 address formatted in the \"dotted decimal\" notation as defined in IETF RFC 1166. # noqa: E501 + + :param ipv4_addr: The ipv4_addr of this InterfaceDescription. + :type ipv4_addr: str + """ + + self._ipv4_addr = ipv4_addr + + @property + def ipv6_addr(self) -> str: + """Gets the ipv6_addr of this InterfaceDescription. + + string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. # noqa: E501 + + :return: The ipv6_addr of this InterfaceDescription. + :rtype: str + """ + return self._ipv6_addr + + @ipv6_addr.setter + def ipv6_addr(self, ipv6_addr: str): + """Sets the ipv6_addr of this InterfaceDescription. + + string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used. # noqa: E501 + + :param ipv6_addr: The ipv6_addr of this InterfaceDescription. + :type ipv6_addr: str + """ + + self._ipv6_addr = ipv6_addr + + @property + def port(self) -> int: + """Gets the port of this InterfaceDescription. + + Unsigned integer with valid values between 0 and 65535. # noqa: E501 + + :return: The port of this InterfaceDescription. + :rtype: int + """ + return self._port + + @port.setter + def port(self, port: int): + """Sets the port of this InterfaceDescription. + + Unsigned integer with valid values between 0 and 65535. # noqa: E501 + + :param port: The port of this InterfaceDescription. + :type port: int + """ + if port is not None and port > 65535: # noqa: E501 + raise ValueError("Invalid value for `port`, must be a value less than or equal to `65535`") # noqa: E501 + if port is not None and port < 0: # noqa: E501 + raise ValueError("Invalid value for `port`, must be a value greater than or equal to `0`") # noqa: E501 + + self._port = port + + @property + def security_methods(self) -> List[SecurityMethod]: + """Gets the security_methods of this InterfaceDescription. + + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + + :return: The security_methods of this InterfaceDescription. + :rtype: List[SecurityMethod] + """ + return self._security_methods + + @security_methods.setter + def security_methods(self, security_methods: List[SecurityMethod]): + """Sets the security_methods of this InterfaceDescription. + + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. # noqa: E501 + + :param security_methods: The security_methods of this InterfaceDescription. + :type security_methods: List[SecurityMethod] + """ + if security_methods is not None and len(security_methods) < 1: + raise ValueError("Invalid value for `security_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._security_methods = security_methods diff --git a/services/helper/helper_service/services/api/models/notification_flag.py b/services/helper/helper_service/services/api/models/notification_flag.py new file mode 100644 index 0000000000000000000000000000000000000000..a41c1d8ad07a9fe0b533680554e47248588f4bf1 --- /dev/null +++ b/services/helper/helper_service/services/api/models/notification_flag.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class NotificationFlag(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """NotificationFlag - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'NotificationFlag': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NotificationFlag of this NotificationFlag. # noqa: E501 + :rtype: NotificationFlag + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/notification_method.py b/services/helper/helper_service/services/api/models/notification_method.py new file mode 100644 index 0000000000000000000000000000000000000000..b3a906ef6dddf76d0236e083dc5148cabbd21bbe --- /dev/null +++ b/services/helper/helper_service/services/api/models/notification_method.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class NotificationMethod(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """NotificationMethod - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'NotificationMethod': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The NotificationMethod of this NotificationMethod. # noqa: E501 + :rtype: NotificationMethod + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/onboarding_information.py b/services/helper/helper_service/services/api/models/onboarding_information.py new file mode 100644 index 0000000000000000000000000000000000000000..370d59ac3b7eda336739141d4bd70d71061cbbe5 --- /dev/null +++ b/services/helper/helper_service/services/api/models/onboarding_information.py @@ -0,0 +1,121 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class OnboardingInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_invoker_public_key=None, api_invoker_certificate=None, onboarding_secret=None): # noqa: E501 + """OnboardingInformation - a model defined in OpenAPI + + :param api_invoker_public_key: The api_invoker_public_key of this OnboardingInformation. # noqa: E501 + :type api_invoker_public_key: str + :param api_invoker_certificate: The api_invoker_certificate of this OnboardingInformation. # noqa: E501 + :type api_invoker_certificate: str + :param onboarding_secret: The onboarding_secret of this OnboardingInformation. # noqa: E501 + :type onboarding_secret: str + """ + self.openapi_types = { + 'api_invoker_public_key': str, + 'api_invoker_certificate': str, + 'onboarding_secret': str + } + + self.attribute_map = { + 'api_invoker_public_key': 'apiInvokerPublicKey', + 'api_invoker_certificate': 'apiInvokerCertificate', + 'onboarding_secret': 'onboardingSecret' + } + + self._api_invoker_public_key = api_invoker_public_key + self._api_invoker_certificate = api_invoker_certificate + self._onboarding_secret = onboarding_secret + + @classmethod + def from_dict(cls, dikt) -> 'OnboardingInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The OnboardingInformation of this OnboardingInformation. # noqa: E501 + :rtype: OnboardingInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def api_invoker_public_key(self) -> str: + """Gets the api_invoker_public_key of this OnboardingInformation. + + The API Invoker's public key # noqa: E501 + + :return: The api_invoker_public_key of this OnboardingInformation. + :rtype: str + """ + return self._api_invoker_public_key + + @api_invoker_public_key.setter + def api_invoker_public_key(self, api_invoker_public_key: str): + """Sets the api_invoker_public_key of this OnboardingInformation. + + The API Invoker's public key # noqa: E501 + + :param api_invoker_public_key: The api_invoker_public_key of this OnboardingInformation. + :type api_invoker_public_key: str + """ + if api_invoker_public_key is None: + raise ValueError("Invalid value for `api_invoker_public_key`, must not be `None`") # noqa: E501 + + self._api_invoker_public_key = api_invoker_public_key + + @property + def api_invoker_certificate(self) -> str: + """Gets the api_invoker_certificate of this OnboardingInformation. + + The API Invoker's generic client certificate, provided by the CAPIF core function. # noqa: E501 + + :return: The api_invoker_certificate of this OnboardingInformation. + :rtype: str + """ + return self._api_invoker_certificate + + @api_invoker_certificate.setter + def api_invoker_certificate(self, api_invoker_certificate: str): + """Sets the api_invoker_certificate of this OnboardingInformation. + + The API Invoker's generic client certificate, provided by the CAPIF core function. # noqa: E501 + + :param api_invoker_certificate: The api_invoker_certificate of this OnboardingInformation. + :type api_invoker_certificate: str + """ + + self._api_invoker_certificate = api_invoker_certificate + + @property + def onboarding_secret(self) -> str: + """Gets the onboarding_secret of this OnboardingInformation. + + The API Invoker's onboarding secret, provided by the CAPIF core function. # noqa: E501 + + :return: The onboarding_secret of this OnboardingInformation. + :rtype: str + """ + return self._onboarding_secret + + @onboarding_secret.setter + def onboarding_secret(self, onboarding_secret: str): + """Sets the onboarding_secret of this OnboardingInformation. + + The API Invoker's onboarding secret, provided by the CAPIF core function. # noqa: E501 + + :param onboarding_secret: The onboarding_secret of this OnboardingInformation. + :type onboarding_secret: str + """ + + self._onboarding_secret = onboarding_secret diff --git a/services/helper/helper_service/services/api/models/operation.py b/services/helper/helper_service/services/api/models/operation.py new file mode 100644 index 0000000000000000000000000000000000000000..1ed73788b6abe3d8465d048e9c32e9c99757e565 --- /dev/null +++ b/services/helper/helper_service/services/api/models/operation.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class Operation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """Operation - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Operation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Operation of this Operation. # noqa: E501 + :rtype: Operation + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/paginated_response_base.py b/services/helper/helper_service/services/api/models/paginated_response_base.py new file mode 100644 index 0000000000000000000000000000000000000000..339b5b569dcb6d886a91bb2e55f0e18d02bc048e --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_base.py @@ -0,0 +1,153 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class PaginatedResponseBase(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None): # noqa: E501 + """PaginatedResponseBase - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseBase. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseBase. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseBase. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseBase. # noqa: E501 + :type sort_order: str + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseBase': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseBase of this PaginatedResponseBase. # noqa: E501 + :rtype: PaginatedResponseBase + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseBase. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseBase. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseBase. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseBase. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseBase. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseBase. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseBase. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseBase. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseBase. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseBase. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseBase. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseBase. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseBase. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseBase. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseBase. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseBase. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order diff --git a/services/helper/helper_service/services/api/models/paginated_response_event.py b/services/helper/helper_service/services/api/models/paginated_response_event.py new file mode 100644 index 0000000000000000000000000000000000000000..fd9445d33911ea2d625c4970e49afde41ed55e4e --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_event.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.event_subscription import EventSubscription +from api import util + +from api.models.event_subscription import EventSubscription # noqa: E501 + +class PaginatedResponseEvent(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, events=None): # noqa: E501 + """PaginatedResponseEvent - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseEvent. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseEvent. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseEvent. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseEvent. # noqa: E501 + :type sort_order: str + :param events: The events of this PaginatedResponseEvent. # noqa: E501 + :type events: List[EventSubscription] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'events': List[EventSubscription] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'events': 'events' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._events = events + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseEvent': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseEvent of this PaginatedResponseEvent. # noqa: E501 + :rtype: PaginatedResponseEvent + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseEvent. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseEvent. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseEvent. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseEvent. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseEvent. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseEvent. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseEvent. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseEvent. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseEvent. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseEvent. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseEvent. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseEvent. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseEvent. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseEvent. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseEvent. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseEvent. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def events(self) -> List[EventSubscription]: + """Gets the events of this PaginatedResponseEvent. + + CAPIF events list. # noqa: E501 + + :return: The events of this PaginatedResponseEvent. + :rtype: List[EventSubscription] + """ + return self._events + + @events.setter + def events(self, events: List[EventSubscription]): + """Sets the events of this PaginatedResponseEvent. + + CAPIF events list. # noqa: E501 + + :param events: The events of this PaginatedResponseEvent. + :type events: List[EventSubscription] + """ + + self._events = events diff --git a/services/helper/helper_service/services/api/models/paginated_response_invoker.py b/services/helper/helper_service/services/api/models/paginated_response_invoker.py new file mode 100644 index 0000000000000000000000000000000000000000..11e9334e31892d7ebb91e651cf1a44ea62afe15f --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_invoker.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails +from api import util + +from api.models.api_invoker_enrolment_details import APIInvokerEnrolmentDetails # noqa: E501 + +class PaginatedResponseInvoker(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, invokers=None): # noqa: E501 + """PaginatedResponseInvoker - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseInvoker. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseInvoker. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseInvoker. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseInvoker. # noqa: E501 + :type sort_order: str + :param invokers: The invokers of this PaginatedResponseInvoker. # noqa: E501 + :type invokers: List[APIInvokerEnrolmentDetails] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'invokers': List[APIInvokerEnrolmentDetails] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'invokers': 'invokers' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._invokers = invokers + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseInvoker': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseInvoker of this PaginatedResponseInvoker. # noqa: E501 + :rtype: PaginatedResponseInvoker + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseInvoker. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseInvoker. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseInvoker. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseInvoker. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseInvoker. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseInvoker. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseInvoker. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseInvoker. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseInvoker. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseInvoker. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseInvoker. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseInvoker. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseInvoker. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseInvoker. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseInvoker. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseInvoker. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def invokers(self) -> List[APIInvokerEnrolmentDetails]: + """Gets the invokers of this PaginatedResponseInvoker. + + CAPIF invokers list # noqa: E501 + + :return: The invokers of this PaginatedResponseInvoker. + :rtype: List[APIInvokerEnrolmentDetails] + """ + return self._invokers + + @invokers.setter + def invokers(self, invokers: List[APIInvokerEnrolmentDetails]): + """Sets the invokers of this PaginatedResponseInvoker. + + CAPIF invokers list # noqa: E501 + + :param invokers: The invokers of this PaginatedResponseInvoker. + :type invokers: List[APIInvokerEnrolmentDetails] + """ + + self._invokers = invokers diff --git a/services/helper/helper_service/services/api/models/paginated_response_provider.py b/services/helper/helper_service/services/api/models/paginated_response_provider.py new file mode 100644 index 0000000000000000000000000000000000000000..a6ae7f6938d3dc2371f67a772b002f1560c8cda7 --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_provider.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails +from api import util + +from api.models.api_provider_enrolment_details import APIProviderEnrolmentDetails # noqa: E501 + +class PaginatedResponseProvider(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, providers=None): # noqa: E501 + """PaginatedResponseProvider - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseProvider. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseProvider. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseProvider. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseProvider. # noqa: E501 + :type sort_order: str + :param providers: The providers of this PaginatedResponseProvider. # noqa: E501 + :type providers: List[APIProviderEnrolmentDetails] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'providers': List[APIProviderEnrolmentDetails] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'providers': 'providers' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._providers = providers + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseProvider': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseProvider of this PaginatedResponseProvider. # noqa: E501 + :rtype: PaginatedResponseProvider + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseProvider. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseProvider. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseProvider. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseProvider. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseProvider. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseProvider. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseProvider. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseProvider. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseProvider. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseProvider. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseProvider. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseProvider. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseProvider. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseProvider. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseProvider. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseProvider. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def providers(self) -> List[APIProviderEnrolmentDetails]: + """Gets the providers of this PaginatedResponseProvider. + + CAPIF providers list # noqa: E501 + + :return: The providers of this PaginatedResponseProvider. + :rtype: List[APIProviderEnrolmentDetails] + """ + return self._providers + + @providers.setter + def providers(self, providers: List[APIProviderEnrolmentDetails]): + """Sets the providers of this PaginatedResponseProvider. + + CAPIF providers list # noqa: E501 + + :param providers: The providers of this PaginatedResponseProvider. + :type providers: List[APIProviderEnrolmentDetails] + """ + + self._providers = providers diff --git a/services/helper/helper_service/services/api/models/paginated_response_security.py b/services/helper/helper_service/services/api/models/paginated_response_security.py new file mode 100644 index 0000000000000000000000000000000000000000..d6c857176d9ae60e33a4c3e2ce04b4eb5bf10fae --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_security.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.service_security import ServiceSecurity +from api import util + +from api.models.service_security import ServiceSecurity # noqa: E501 + +class PaginatedResponseSecurity(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, security=None): # noqa: E501 + """PaginatedResponseSecurity - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseSecurity. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseSecurity. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseSecurity. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseSecurity. # noqa: E501 + :type sort_order: str + :param security: The security of this PaginatedResponseSecurity. # noqa: E501 + :type security: List[ServiceSecurity] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'security': List[ServiceSecurity] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'security': 'security' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._security = security + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseSecurity': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseSecurity of this PaginatedResponseSecurity. # noqa: E501 + :rtype: PaginatedResponseSecurity + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseSecurity. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseSecurity. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseSecurity. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseSecurity. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseSecurity. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseSecurity. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseSecurity. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseSecurity. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseSecurity. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseSecurity. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseSecurity. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseSecurity. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseSecurity. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseSecurity. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseSecurity. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseSecurity. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def security(self) -> List[ServiceSecurity]: + """Gets the security of this PaginatedResponseSecurity. + + CAPIF security context list. # noqa: E501 + + :return: The security of this PaginatedResponseSecurity. + :rtype: List[ServiceSecurity] + """ + return self._security + + @security.setter + def security(self, security: List[ServiceSecurity]): + """Sets the security of this PaginatedResponseSecurity. + + CAPIF security context list. # noqa: E501 + + :param security: The security of this PaginatedResponseSecurity. + :type security: List[ServiceSecurity] + """ + + self._security = security diff --git a/services/helper/helper_service/services/api/models/paginated_response_service.py b/services/helper/helper_service/services/api/models/paginated_response_service.py new file mode 100644 index 0000000000000000000000000000000000000000..96f6522007b644484b735eb11890798c1e75020e --- /dev/null +++ b/services/helper/helper_service/services/api/models/paginated_response_service.py @@ -0,0 +1,183 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.service_api_description import ServiceAPIDescription +from api import util + +from api.models.service_api_description import ServiceAPIDescription # noqa: E501 + +class PaginatedResponseService(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, total=None, long=None, total_pages=None, sort_order=None, services=None): # noqa: E501 + """PaginatedResponseService - a model defined in OpenAPI + + :param total: The total of this PaginatedResponseService. # noqa: E501 + :type total: int + :param long: The long of this PaginatedResponseService. # noqa: E501 + :type long: int + :param total_pages: The total_pages of this PaginatedResponseService. # noqa: E501 + :type total_pages: int + :param sort_order: The sort_order of this PaginatedResponseService. # noqa: E501 + :type sort_order: str + :param services: The services of this PaginatedResponseService. # noqa: E501 + :type services: List[ServiceAPIDescription] + """ + self.openapi_types = { + 'total': int, + 'long': int, + 'total_pages': int, + 'sort_order': str, + 'services': List[ServiceAPIDescription] + } + + self.attribute_map = { + 'total': 'total', + 'long': 'long', + 'total_pages': 'totalPages', + 'sort_order': 'sort_order', + 'services': 'services' + } + + self._total = total + self._long = long + self._total_pages = total_pages + self._sort_order = sort_order + self._services = services + + @classmethod + def from_dict(cls, dikt) -> 'PaginatedResponseService': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PaginatedResponseService of this PaginatedResponseService. # noqa: E501 + :rtype: PaginatedResponseService + """ + return util.deserialize_model(dikt, cls) + + @property + def total(self) -> int: + """Gets the total of this PaginatedResponseService. + + Total number of resources in CAPIF. # noqa: E501 + + :return: The total of this PaginatedResponseService. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total: int): + """Sets the total of this PaginatedResponseService. + + Total number of resources in CAPIF. # noqa: E501 + + :param total: The total of this PaginatedResponseService. + :type total: int + """ + + self._total = total + + @property + def long(self) -> int: + """Gets the long of this PaginatedResponseService. + + Total number of resources that match the given parameters # noqa: E501 + + :return: The long of this PaginatedResponseService. + :rtype: int + """ + return self._long + + @long.setter + def long(self, long: int): + """Sets the long of this PaginatedResponseService. + + Total number of resources that match the given parameters # noqa: E501 + + :param long: The long of this PaginatedResponseService. + :type long: int + """ + + self._long = long + + @property + def total_pages(self) -> int: + """Gets the total_pages of this PaginatedResponseService. + + Total number of pages given page size. # noqa: E501 + + :return: The total_pages of this PaginatedResponseService. + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages: int): + """Sets the total_pages of this PaginatedResponseService. + + Total number of pages given page size. # noqa: E501 + + :param total_pages: The total_pages of this PaginatedResponseService. + :type total_pages: int + """ + + self._total_pages = total_pages + + @property + def sort_order(self) -> str: + """Gets the sort_order of this PaginatedResponseService. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :return: The sort_order of this PaginatedResponseService. + :rtype: str + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order: str): + """Sets the sort_order of this PaginatedResponseService. + + Sorting by creation date of the resources (ascending or descending). # noqa: E501 + + :param sort_order: The sort_order of this PaginatedResponseService. + :type sort_order: str + """ + allowed_values = ["asc", "desc"] # noqa: E501 + if sort_order not in allowed_values: + raise ValueError( + "Invalid value for `sort_order` ({0}), must be one of {1}" + .format(sort_order, allowed_values) + ) + + self._sort_order = sort_order + + @property + def services(self) -> List[ServiceAPIDescription]: + """Gets the services of this PaginatedResponseService. + + CAPIF services list. # noqa: E501 + + :return: The services of this PaginatedResponseService. + :rtype: List[ServiceAPIDescription] + """ + return self._services + + @services.setter + def services(self, services: List[ServiceAPIDescription]): + """Sets the services of this PaginatedResponseService. + + CAPIF services list. # noqa: E501 + + :param services: The services of this PaginatedResponseService. + :type services: List[ServiceAPIDescription] + """ + + self._services = services diff --git a/services/helper/helper_service/services/api/models/partitioning_criteria.py b/services/helper/helper_service/services/api/models/partitioning_criteria.py new file mode 100644 index 0000000000000000000000000000000000000000..d4ad3b81c9db0eb39c1e7436a3bfd593779d8aaf --- /dev/null +++ b/services/helper/helper_service/services/api/models/partitioning_criteria.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class PartitioningCriteria(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """PartitioningCriteria - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'PartitioningCriteria': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PartitioningCriteria of this PartitioningCriteria. # noqa: E501 + :rtype: PartitioningCriteria + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/point.py b/services/helper/helper_service/services/api/models/point.py new file mode 100644 index 0000000000000000000000000000000000000000..cb7f758bc6ba967d32e69fb2e91d1073c7cccb28 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point.py @@ -0,0 +1,97 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class Point(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None): # noqa: E501 + """Point - a model defined in OpenAPI + + :param shape: The shape of this Point. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this Point. # noqa: E501 + :type point: GeographicalCoordinates + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point' + } + + self._shape = shape + self._point = point + + @classmethod + def from_dict(cls, dikt) -> 'Point': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Point of this Point. # noqa: E501 + :rtype: Point + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Point. + + + :return: The shape of this Point. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Point. + + + :param shape: The shape of this Point. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this Point. + + + :return: The point of this Point. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this Point. + + + :param point: The point of this Point. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point diff --git a/services/helper/helper_service/services/api/models/point_altitude.py b/services/helper/helper_service/services/api/models/point_altitude.py new file mode 100644 index 0000000000000000000000000000000000000000..d2041c32c66fedea6eca3d022214731fad6e7f88 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_altitude.py @@ -0,0 +1,131 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class PointAltitude(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, altitude=None): # noqa: E501 + """PointAltitude - a model defined in OpenAPI + + :param shape: The shape of this PointAltitude. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointAltitude. # noqa: E501 + :type point: GeographicalCoordinates + :param altitude: The altitude of this PointAltitude. # noqa: E501 + :type altitude: float + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'altitude': float + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'altitude': 'altitude' + } + + self._shape = shape + self._point = point + self._altitude = altitude + + @classmethod + def from_dict(cls, dikt) -> 'PointAltitude': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointAltitude of this PointAltitude. # noqa: E501 + :rtype: PointAltitude + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointAltitude. + + + :return: The shape of this PointAltitude. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointAltitude. + + + :param shape: The shape of this PointAltitude. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointAltitude. + + + :return: The point of this PointAltitude. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointAltitude. + + + :param point: The point of this PointAltitude. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def altitude(self) -> float: + """Gets the altitude of this PointAltitude. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this PointAltitude. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this PointAltitude. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this PointAltitude. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude diff --git a/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py b/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py new file mode 100644 index 0000000000000000000000000000000000000000..e5ff1da8aced777323d3ae77292bc5da70e69864 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_altitude_uncertainty.py @@ -0,0 +1,227 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class PointAltitudeUncertainty(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, altitude=None, uncertainty_ellipse=None, uncertainty_altitude=None, confidence=None): # noqa: E501 + """PointAltitudeUncertainty - a model defined in OpenAPI + + :param shape: The shape of this PointAltitudeUncertainty. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointAltitudeUncertainty. # noqa: E501 + :type point: GeographicalCoordinates + :param altitude: The altitude of this PointAltitudeUncertainty. # noqa: E501 + :type altitude: float + :param uncertainty_ellipse: The uncertainty_ellipse of this PointAltitudeUncertainty. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param uncertainty_altitude: The uncertainty_altitude of this PointAltitudeUncertainty. # noqa: E501 + :type uncertainty_altitude: float + :param confidence: The confidence of this PointAltitudeUncertainty. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'altitude': float, + 'uncertainty_ellipse': UncertaintyEllipse, + 'uncertainty_altitude': float, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'altitude': 'altitude', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'uncertainty_altitude': 'uncertaintyAltitude', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._altitude = altitude + self._uncertainty_ellipse = uncertainty_ellipse + self._uncertainty_altitude = uncertainty_altitude + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'PointAltitudeUncertainty': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointAltitudeUncertainty of this PointAltitudeUncertainty. # noqa: E501 + :rtype: PointAltitudeUncertainty + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointAltitudeUncertainty. + + + :return: The shape of this PointAltitudeUncertainty. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointAltitudeUncertainty. + + + :param shape: The shape of this PointAltitudeUncertainty. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointAltitudeUncertainty. + + + :return: The point of this PointAltitudeUncertainty. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointAltitudeUncertainty. + + + :param point: The point of this PointAltitudeUncertainty. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def altitude(self) -> float: + """Gets the altitude of this PointAltitudeUncertainty. + + Indicates value of altitude. # noqa: E501 + + :return: The altitude of this PointAltitudeUncertainty. + :rtype: float + """ + return self._altitude + + @altitude.setter + def altitude(self, altitude: float): + """Sets the altitude of this PointAltitudeUncertainty. + + Indicates value of altitude. # noqa: E501 + + :param altitude: The altitude of this PointAltitudeUncertainty. + :type altitude: float + """ + if altitude is None: + raise ValueError("Invalid value for `altitude`, must not be `None`") # noqa: E501 + if altitude is not None and altitude > 32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value less than or equal to `32767`") # noqa: E501 + if altitude is not None and altitude < -32767: # noqa: E501 + raise ValueError("Invalid value for `altitude`, must be a value greater than or equal to `-32767`") # noqa: E501 + + self._altitude = altitude + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this PointAltitudeUncertainty. + + + :return: The uncertainty_ellipse of this PointAltitudeUncertainty. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this PointAltitudeUncertainty. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this PointAltitudeUncertainty. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def uncertainty_altitude(self) -> float: + """Gets the uncertainty_altitude of this PointAltitudeUncertainty. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty_altitude of this PointAltitudeUncertainty. + :rtype: float + """ + return self._uncertainty_altitude + + @uncertainty_altitude.setter + def uncertainty_altitude(self, uncertainty_altitude: float): + """Sets the uncertainty_altitude of this PointAltitudeUncertainty. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty_altitude: The uncertainty_altitude of this PointAltitudeUncertainty. + :type uncertainty_altitude: float + """ + if uncertainty_altitude is None: + raise ValueError("Invalid value for `uncertainty_altitude`, must not be `None`") # noqa: E501 + if uncertainty_altitude is not None and uncertainty_altitude < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty_altitude`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty_altitude = uncertainty_altitude + + @property + def confidence(self) -> int: + """Gets the confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this PointAltitudeUncertainty. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this PointAltitudeUncertainty. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this PointAltitudeUncertainty. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/helper/helper_service/services/api/models/point_uncertainty_circle.py b/services/helper/helper_service/services/api/models/point_uncertainty_circle.py new file mode 100644 index 0000000000000000000000000000000000000000..54c312f223276b34b8854c152368bac7e14c49ed --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_uncertainty_circle.py @@ -0,0 +1,129 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class PointUncertaintyCircle(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty=None): # noqa: E501 + """PointUncertaintyCircle - a model defined in OpenAPI + + :param shape: The shape of this PointUncertaintyCircle. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointUncertaintyCircle. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty: The uncertainty of this PointUncertaintyCircle. # noqa: E501 + :type uncertainty: float + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty': float + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty': 'uncertainty' + } + + self._shape = shape + self._point = point + self._uncertainty = uncertainty + + @classmethod + def from_dict(cls, dikt) -> 'PointUncertaintyCircle': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointUncertaintyCircle of this PointUncertaintyCircle. # noqa: E501 + :rtype: PointUncertaintyCircle + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointUncertaintyCircle. + + + :return: The shape of this PointUncertaintyCircle. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointUncertaintyCircle. + + + :param shape: The shape of this PointUncertaintyCircle. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointUncertaintyCircle. + + + :return: The point of this PointUncertaintyCircle. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointUncertaintyCircle. + + + :param point: The point of this PointUncertaintyCircle. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty(self) -> float: + """Gets the uncertainty of this PointUncertaintyCircle. + + Indicates value of uncertainty. # noqa: E501 + + :return: The uncertainty of this PointUncertaintyCircle. + :rtype: float + """ + return self._uncertainty + + @uncertainty.setter + def uncertainty(self, uncertainty: float): + """Sets the uncertainty of this PointUncertaintyCircle. + + Indicates value of uncertainty. # noqa: E501 + + :param uncertainty: The uncertainty of this PointUncertaintyCircle. + :type uncertainty: float + """ + if uncertainty is None: + raise ValueError("Invalid value for `uncertainty`, must not be `None`") # noqa: E501 + if uncertainty is not None and uncertainty < 0: # noqa: E501 + raise ValueError("Invalid value for `uncertainty`, must be a value greater than or equal to `0`") # noqa: E501 + + self._uncertainty = uncertainty diff --git a/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py b/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py new file mode 100644 index 0000000000000000000000000000000000000000..293c7b0826486aa9648e97b763773a2a26749e79 --- /dev/null +++ b/services/helper/helper_service/services/api/models/point_uncertainty_ellipse.py @@ -0,0 +1,161 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api.models.uncertainty_ellipse import UncertaintyEllipse +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 +from api.models.uncertainty_ellipse import UncertaintyEllipse # noqa: E501 + +class PointUncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point=None, uncertainty_ellipse=None, confidence=None): # noqa: E501 + """PointUncertaintyEllipse - a model defined in OpenAPI + + :param shape: The shape of this PointUncertaintyEllipse. # noqa: E501 + :type shape: SupportedGADShapes + :param point: The point of this PointUncertaintyEllipse. # noqa: E501 + :type point: GeographicalCoordinates + :param uncertainty_ellipse: The uncertainty_ellipse of this PointUncertaintyEllipse. # noqa: E501 + :type uncertainty_ellipse: UncertaintyEllipse + :param confidence: The confidence of this PointUncertaintyEllipse. # noqa: E501 + :type confidence: int + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point': GeographicalCoordinates, + 'uncertainty_ellipse': UncertaintyEllipse, + 'confidence': int + } + + self.attribute_map = { + 'shape': 'shape', + 'point': 'point', + 'uncertainty_ellipse': 'uncertaintyEllipse', + 'confidence': 'confidence' + } + + self._shape = shape + self._point = point + self._uncertainty_ellipse = uncertainty_ellipse + self._confidence = confidence + + @classmethod + def from_dict(cls, dikt) -> 'PointUncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PointUncertaintyEllipse of this PointUncertaintyEllipse. # noqa: E501 + :rtype: PointUncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this PointUncertaintyEllipse. + + + :return: The shape of this PointUncertaintyEllipse. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this PointUncertaintyEllipse. + + + :param shape: The shape of this PointUncertaintyEllipse. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point(self) -> GeographicalCoordinates: + """Gets the point of this PointUncertaintyEllipse. + + + :return: The point of this PointUncertaintyEllipse. + :rtype: GeographicalCoordinates + """ + return self._point + + @point.setter + def point(self, point: GeographicalCoordinates): + """Sets the point of this PointUncertaintyEllipse. + + + :param point: The point of this PointUncertaintyEllipse. + :type point: GeographicalCoordinates + """ + if point is None: + raise ValueError("Invalid value for `point`, must not be `None`") # noqa: E501 + + self._point = point + + @property + def uncertainty_ellipse(self) -> UncertaintyEllipse: + """Gets the uncertainty_ellipse of this PointUncertaintyEllipse. + + + :return: The uncertainty_ellipse of this PointUncertaintyEllipse. + :rtype: UncertaintyEllipse + """ + return self._uncertainty_ellipse + + @uncertainty_ellipse.setter + def uncertainty_ellipse(self, uncertainty_ellipse: UncertaintyEllipse): + """Sets the uncertainty_ellipse of this PointUncertaintyEllipse. + + + :param uncertainty_ellipse: The uncertainty_ellipse of this PointUncertaintyEllipse. + :type uncertainty_ellipse: UncertaintyEllipse + """ + if uncertainty_ellipse is None: + raise ValueError("Invalid value for `uncertainty_ellipse`, must not be `None`") # noqa: E501 + + self._uncertainty_ellipse = uncertainty_ellipse + + @property + def confidence(self) -> int: + """Gets the confidence of this PointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :return: The confidence of this PointUncertaintyEllipse. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence: int): + """Sets the confidence of this PointUncertaintyEllipse. + + Indicates value of confidence. # noqa: E501 + + :param confidence: The confidence of this PointUncertaintyEllipse. + :type confidence: int + """ + if confidence is None: + raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501 + if confidence is not None and confidence > 100: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value less than or equal to `100`") # noqa: E501 + if confidence is not None and confidence < 0: # noqa: E501 + raise ValueError("Invalid value for `confidence`, must be a value greater than or equal to `0`") # noqa: E501 + + self._confidence = confidence diff --git a/services/helper/helper_service/services/api/models/polygon.py b/services/helper/helper_service/services/api/models/polygon.py new file mode 100644 index 0000000000000000000000000000000000000000..069abe4ad4aec77b9fdead4058c8892644541228 --- /dev/null +++ b/services/helper/helper_service/services/api/models/polygon.py @@ -0,0 +1,103 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.gad_shape import GADShape +from api.models.geographical_coordinates import GeographicalCoordinates +from api.models.supported_gad_shapes import SupportedGADShapes +from api import util + +from api.models.gad_shape import GADShape # noqa: E501 +from api.models.geographical_coordinates import GeographicalCoordinates # noqa: E501 +from api.models.supported_gad_shapes import SupportedGADShapes # noqa: E501 + +class Polygon(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, shape=None, point_list=None): # noqa: E501 + """Polygon - a model defined in OpenAPI + + :param shape: The shape of this Polygon. # noqa: E501 + :type shape: SupportedGADShapes + :param point_list: The point_list of this Polygon. # noqa: E501 + :type point_list: List[GeographicalCoordinates] + """ + self.openapi_types = { + 'shape': SupportedGADShapes, + 'point_list': List[GeographicalCoordinates] + } + + self.attribute_map = { + 'shape': 'shape', + 'point_list': 'pointList' + } + + self._shape = shape + self._point_list = point_list + + @classmethod + def from_dict(cls, dikt) -> 'Polygon': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Polygon of this Polygon. # noqa: E501 + :rtype: Polygon + """ + return util.deserialize_model(dikt, cls) + + @property + def shape(self) -> SupportedGADShapes: + """Gets the shape of this Polygon. + + + :return: The shape of this Polygon. + :rtype: SupportedGADShapes + """ + return self._shape + + @shape.setter + def shape(self, shape: SupportedGADShapes): + """Sets the shape of this Polygon. + + + :param shape: The shape of this Polygon. + :type shape: SupportedGADShapes + """ + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + + self._shape = shape + + @property + def point_list(self) -> List[GeographicalCoordinates]: + """Gets the point_list of this Polygon. + + List of points. # noqa: E501 + + :return: The point_list of this Polygon. + :rtype: List[GeographicalCoordinates] + """ + return self._point_list + + @point_list.setter + def point_list(self, point_list: List[GeographicalCoordinates]): + """Sets the point_list of this Polygon. + + List of points. # noqa: E501 + + :param point_list: The point_list of this Polygon. + :type point_list: List[GeographicalCoordinates] + """ + if point_list is None: + raise ValueError("Invalid value for `point_list`, must not be `None`") # noqa: E501 + if point_list is not None and len(point_list) > 15: + raise ValueError("Invalid value for `point_list`, number of items must be less than or equal to `15`") # noqa: E501 + if point_list is not None and len(point_list) < 3: + raise ValueError("Invalid value for `point_list`, number of items must be greater than or equal to `3`") # noqa: E501 + + self._point_list = point_list diff --git a/services/helper/helper_service/services/api/models/protocol.py b/services/helper/helper_service/services/api/models/protocol.py new file mode 100644 index 0000000000000000000000000000000000000000..b311a1aa41249a49af8cfaeb816b57062e9cadb4 --- /dev/null +++ b/services/helper/helper_service/services/api/models/protocol.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class Protocol(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """Protocol - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'Protocol': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Protocol of this Protocol. # noqa: E501 + :rtype: Protocol + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/published_api_path.py b/services/helper/helper_service/services/api/models/published_api_path.py new file mode 100644 index 0000000000000000000000000000000000000000..94acc894443b335b4006bda2f3b63111c5cca0f4 --- /dev/null +++ b/services/helper/helper_service/services/api/models/published_api_path.py @@ -0,0 +1,65 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class PublishedApiPath(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ccf_ids=None): # noqa: E501 + """PublishedApiPath - a model defined in OpenAPI + + :param ccf_ids: The ccf_ids of this PublishedApiPath. # noqa: E501 + :type ccf_ids: List[str] + """ + self.openapi_types = { + 'ccf_ids': List[str] + } + + self.attribute_map = { + 'ccf_ids': 'ccfIds' + } + + self._ccf_ids = ccf_ids + + @classmethod + def from_dict(cls, dikt) -> 'PublishedApiPath': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The PublishedApiPath of this PublishedApiPath. # noqa: E501 + :rtype: PublishedApiPath + """ + return util.deserialize_model(dikt, cls) + + @property + def ccf_ids(self) -> List[str]: + """Gets the ccf_ids of this PublishedApiPath. + + A list of CCF identifiers where the service API is already published. # noqa: E501 + + :return: The ccf_ids of this PublishedApiPath. + :rtype: List[str] + """ + return self._ccf_ids + + @ccf_ids.setter + def ccf_ids(self, ccf_ids: List[str]): + """Sets the ccf_ids of this PublishedApiPath. + + A list of CCF identifiers where the service API is already published. # noqa: E501 + + :param ccf_ids: The ccf_ids of this PublishedApiPath. + :type ccf_ids: List[str] + """ + if ccf_ids is not None and len(ccf_ids) < 1: + raise ValueError("Invalid value for `ccf_ids`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._ccf_ids = ccf_ids diff --git a/services/helper/helper_service/services/api/models/registration_information.py b/services/helper/helper_service/services/api/models/registration_information.py new file mode 100644 index 0000000000000000000000000000000000000000..e1db5aa4b1711e229365d66e66e8109076d36d76 --- /dev/null +++ b/services/helper/helper_service/services/api/models/registration_information.py @@ -0,0 +1,93 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class RegistrationInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_prov_pub_key=None, api_prov_cert=None): # noqa: E501 + """RegistrationInformation - a model defined in OpenAPI + + :param api_prov_pub_key: The api_prov_pub_key of this RegistrationInformation. # noqa: E501 + :type api_prov_pub_key: str + :param api_prov_cert: The api_prov_cert of this RegistrationInformation. # noqa: E501 + :type api_prov_cert: str + """ + self.openapi_types = { + 'api_prov_pub_key': str, + 'api_prov_cert': str + } + + self.attribute_map = { + 'api_prov_pub_key': 'apiProvPubKey', + 'api_prov_cert': 'apiProvCert' + } + + self._api_prov_pub_key = api_prov_pub_key + self._api_prov_cert = api_prov_cert + + @classmethod + def from_dict(cls, dikt) -> 'RegistrationInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RegistrationInformation of this RegistrationInformation. # noqa: E501 + :rtype: RegistrationInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def api_prov_pub_key(self) -> str: + """Gets the api_prov_pub_key of this RegistrationInformation. + + Public Key of API Provider domain function. # noqa: E501 + + :return: The api_prov_pub_key of this RegistrationInformation. + :rtype: str + """ + return self._api_prov_pub_key + + @api_prov_pub_key.setter + def api_prov_pub_key(self, api_prov_pub_key: str): + """Sets the api_prov_pub_key of this RegistrationInformation. + + Public Key of API Provider domain function. # noqa: E501 + + :param api_prov_pub_key: The api_prov_pub_key of this RegistrationInformation. + :type api_prov_pub_key: str + """ + if api_prov_pub_key is None: + raise ValueError("Invalid value for `api_prov_pub_key`, must not be `None`") # noqa: E501 + + self._api_prov_pub_key = api_prov_pub_key + + @property + def api_prov_cert(self) -> str: + """Gets the api_prov_cert of this RegistrationInformation. + + API provider domain function's client certificate # noqa: E501 + + :return: The api_prov_cert of this RegistrationInformation. + :rtype: str + """ + return self._api_prov_cert + + @api_prov_cert.setter + def api_prov_cert(self, api_prov_cert: str): + """Sets the api_prov_cert of this RegistrationInformation. + + API provider domain function's client certificate # noqa: E501 + + :param api_prov_cert: The api_prov_cert of this RegistrationInformation. + :type api_prov_cert: str + """ + + self._api_prov_cert = api_prov_cert diff --git a/services/helper/helper_service/services/api/models/reporting_information.py b/services/helper/helper_service/services/api/models/reporting_information.py new file mode 100644 index 0000000000000000000000000000000000000000..432bddbb781783f74bc654b5ba37b3bb7b58f689 --- /dev/null +++ b/services/helper/helper_service/services/api/models/reporting_information.py @@ -0,0 +1,295 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.notification_flag import NotificationFlag +from api.models.notification_method import NotificationMethod +from api.models.partitioning_criteria import PartitioningCriteria +from api import util + +from api.models.notification_flag import NotificationFlag # noqa: E501 +from api.models.notification_method import NotificationMethod # noqa: E501 +from api.models.partitioning_criteria import PartitioningCriteria # noqa: E501 + +class ReportingInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, imm_rep=None, notif_method=None, max_report_nbr=None, mon_dur=None, rep_period=None, samp_ratio=None, partition_criteria=None, grp_rep_time=None, notif_flag=None): # noqa: E501 + """ReportingInformation - a model defined in OpenAPI + + :param imm_rep: The imm_rep of this ReportingInformation. # noqa: E501 + :type imm_rep: bool + :param notif_method: The notif_method of this ReportingInformation. # noqa: E501 + :type notif_method: NotificationMethod + :param max_report_nbr: The max_report_nbr of this ReportingInformation. # noqa: E501 + :type max_report_nbr: int + :param mon_dur: The mon_dur of this ReportingInformation. # noqa: E501 + :type mon_dur: datetime + :param rep_period: The rep_period of this ReportingInformation. # noqa: E501 + :type rep_period: int + :param samp_ratio: The samp_ratio of this ReportingInformation. # noqa: E501 + :type samp_ratio: int + :param partition_criteria: The partition_criteria of this ReportingInformation. # noqa: E501 + :type partition_criteria: List[PartitioningCriteria] + :param grp_rep_time: The grp_rep_time of this ReportingInformation. # noqa: E501 + :type grp_rep_time: int + :param notif_flag: The notif_flag of this ReportingInformation. # noqa: E501 + :type notif_flag: NotificationFlag + """ + self.openapi_types = { + 'imm_rep': bool, + 'notif_method': NotificationMethod, + 'max_report_nbr': int, + 'mon_dur': datetime, + 'rep_period': int, + 'samp_ratio': int, + 'partition_criteria': List[PartitioningCriteria], + 'grp_rep_time': int, + 'notif_flag': NotificationFlag + } + + self.attribute_map = { + 'imm_rep': 'immRep', + 'notif_method': 'notifMethod', + 'max_report_nbr': 'maxReportNbr', + 'mon_dur': 'monDur', + 'rep_period': 'repPeriod', + 'samp_ratio': 'sampRatio', + 'partition_criteria': 'partitionCriteria', + 'grp_rep_time': 'grpRepTime', + 'notif_flag': 'notifFlag' + } + + self._imm_rep = imm_rep + self._notif_method = notif_method + self._max_report_nbr = max_report_nbr + self._mon_dur = mon_dur + self._rep_period = rep_period + self._samp_ratio = samp_ratio + self._partition_criteria = partition_criteria + self._grp_rep_time = grp_rep_time + self._notif_flag = notif_flag + + @classmethod + def from_dict(cls, dikt) -> 'ReportingInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ReportingInformation of this ReportingInformation. # noqa: E501 + :rtype: ReportingInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def imm_rep(self) -> bool: + """Gets the imm_rep of this ReportingInformation. + + + :return: The imm_rep of this ReportingInformation. + :rtype: bool + """ + return self._imm_rep + + @imm_rep.setter + def imm_rep(self, imm_rep: bool): + """Sets the imm_rep of this ReportingInformation. + + + :param imm_rep: The imm_rep of this ReportingInformation. + :type imm_rep: bool + """ + + self._imm_rep = imm_rep + + @property + def notif_method(self) -> NotificationMethod: + """Gets the notif_method of this ReportingInformation. + + + :return: The notif_method of this ReportingInformation. + :rtype: NotificationMethod + """ + return self._notif_method + + @notif_method.setter + def notif_method(self, notif_method: NotificationMethod): + """Sets the notif_method of this ReportingInformation. + + + :param notif_method: The notif_method of this ReportingInformation. + :type notif_method: NotificationMethod + """ + + self._notif_method = notif_method + + @property + def max_report_nbr(self) -> int: + """Gets the max_report_nbr of this ReportingInformation. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :return: The max_report_nbr of this ReportingInformation. + :rtype: int + """ + return self._max_report_nbr + + @max_report_nbr.setter + def max_report_nbr(self, max_report_nbr: int): + """Sets the max_report_nbr of this ReportingInformation. + + Unsigned Integer, i.e. only value 0 and integers above 0 are permissible. # noqa: E501 + + :param max_report_nbr: The max_report_nbr of this ReportingInformation. + :type max_report_nbr: int + """ + if max_report_nbr is not None and max_report_nbr < 0: # noqa: E501 + raise ValueError("Invalid value for `max_report_nbr`, must be a value greater than or equal to `0`") # noqa: E501 + + self._max_report_nbr = max_report_nbr + + @property + def mon_dur(self) -> datetime: + """Gets the mon_dur of this ReportingInformation. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :return: The mon_dur of this ReportingInformation. + :rtype: datetime + """ + return self._mon_dur + + @mon_dur.setter + def mon_dur(self, mon_dur: datetime): + """Sets the mon_dur of this ReportingInformation. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :param mon_dur: The mon_dur of this ReportingInformation. + :type mon_dur: datetime + """ + + self._mon_dur = mon_dur + + @property + def rep_period(self) -> int: + """Gets the rep_period of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :return: The rep_period of this ReportingInformation. + :rtype: int + """ + return self._rep_period + + @rep_period.setter + def rep_period(self, rep_period: int): + """Sets the rep_period of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :param rep_period: The rep_period of this ReportingInformation. + :type rep_period: int + """ + + self._rep_period = rep_period + + @property + def samp_ratio(self) -> int: + """Gets the samp_ratio of this ReportingInformation. + + Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent. # noqa: E501 + + :return: The samp_ratio of this ReportingInformation. + :rtype: int + """ + return self._samp_ratio + + @samp_ratio.setter + def samp_ratio(self, samp_ratio: int): + """Sets the samp_ratio of this ReportingInformation. + + Unsigned integer indicating Sampling Ratio (see clauses 4.15.1 of 3GPP TS 23.502), expressed in percent. # noqa: E501 + + :param samp_ratio: The samp_ratio of this ReportingInformation. + :type samp_ratio: int + """ + if samp_ratio is not None and samp_ratio > 100: # noqa: E501 + raise ValueError("Invalid value for `samp_ratio`, must be a value less than or equal to `100`") # noqa: E501 + if samp_ratio is not None and samp_ratio < 1: # noqa: E501 + raise ValueError("Invalid value for `samp_ratio`, must be a value greater than or equal to `1`") # noqa: E501 + + self._samp_ratio = samp_ratio + + @property + def partition_criteria(self) -> List[PartitioningCriteria]: + """Gets the partition_criteria of this ReportingInformation. + + Criteria for partitioning the UEs before applying the sampling ratio. # noqa: E501 + + :return: The partition_criteria of this ReportingInformation. + :rtype: List[PartitioningCriteria] + """ + return self._partition_criteria + + @partition_criteria.setter + def partition_criteria(self, partition_criteria: List[PartitioningCriteria]): + """Sets the partition_criteria of this ReportingInformation. + + Criteria for partitioning the UEs before applying the sampling ratio. # noqa: E501 + + :param partition_criteria: The partition_criteria of this ReportingInformation. + :type partition_criteria: List[PartitioningCriteria] + """ + if partition_criteria is not None and len(partition_criteria) < 1: + raise ValueError("Invalid value for `partition_criteria`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._partition_criteria = partition_criteria + + @property + def grp_rep_time(self) -> int: + """Gets the grp_rep_time of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :return: The grp_rep_time of this ReportingInformation. + :rtype: int + """ + return self._grp_rep_time + + @grp_rep_time.setter + def grp_rep_time(self, grp_rep_time: int): + """Sets the grp_rep_time of this ReportingInformation. + + indicating a time in seconds. # noqa: E501 + + :param grp_rep_time: The grp_rep_time of this ReportingInformation. + :type grp_rep_time: int + """ + + self._grp_rep_time = grp_rep_time + + @property + def notif_flag(self) -> NotificationFlag: + """Gets the notif_flag of this ReportingInformation. + + + :return: The notif_flag of this ReportingInformation. + :rtype: NotificationFlag + """ + return self._notif_flag + + @notif_flag.setter + def notif_flag(self, notif_flag: NotificationFlag): + """Sets the notif_flag of this ReportingInformation. + + + :param notif_flag: The notif_flag of this ReportingInformation. + :type notif_flag: NotificationFlag + """ + + self._notif_flag = notif_flag diff --git a/services/helper/helper_service/services/api/models/resource.py b/services/helper/helper_service/services/api/models/resource.py new file mode 100644 index 0000000000000000000000000000000000000000..c32f79c336ae470229c8c5c7bd3c4cb142e96c9d --- /dev/null +++ b/services/helper/helper_service/services/api/models/resource.py @@ -0,0 +1,213 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.communication_type import CommunicationType +from api.models.operation import Operation +from api import util + +from api.models.communication_type import CommunicationType # noqa: E501 +from api.models.operation import Operation # noqa: E501 + +class Resource(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, resource_name=None, comm_type=None, uri=None, cust_op_name=None, operations=None, description=None): # noqa: E501 + """Resource - a model defined in OpenAPI + + :param resource_name: The resource_name of this Resource. # noqa: E501 + :type resource_name: str + :param comm_type: The comm_type of this Resource. # noqa: E501 + :type comm_type: CommunicationType + :param uri: The uri of this Resource. # noqa: E501 + :type uri: str + :param cust_op_name: The cust_op_name of this Resource. # noqa: E501 + :type cust_op_name: str + :param operations: The operations of this Resource. # noqa: E501 + :type operations: List[Operation] + :param description: The description of this Resource. # noqa: E501 + :type description: str + """ + self.openapi_types = { + 'resource_name': str, + 'comm_type': CommunicationType, + 'uri': str, + 'cust_op_name': str, + 'operations': List[Operation], + 'description': str + } + + self.attribute_map = { + 'resource_name': 'resourceName', + 'comm_type': 'commType', + 'uri': 'uri', + 'cust_op_name': 'custOpName', + 'operations': 'operations', + 'description': 'description' + } + + self._resource_name = resource_name + self._comm_type = comm_type + self._uri = uri + self._cust_op_name = cust_op_name + self._operations = operations + self._description = description + + @classmethod + def from_dict(cls, dikt) -> 'Resource': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Resource of this Resource. # noqa: E501 + :rtype: Resource + """ + return util.deserialize_model(dikt, cls) + + @property + def resource_name(self) -> str: + """Gets the resource_name of this Resource. + + Resource name # noqa: E501 + + :return: The resource_name of this Resource. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name: str): + """Sets the resource_name of this Resource. + + Resource name # noqa: E501 + + :param resource_name: The resource_name of this Resource. + :type resource_name: str + """ + if resource_name is None: + raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501 + + self._resource_name = resource_name + + @property + def comm_type(self) -> CommunicationType: + """Gets the comm_type of this Resource. + + + :return: The comm_type of this Resource. + :rtype: CommunicationType + """ + return self._comm_type + + @comm_type.setter + def comm_type(self, comm_type: CommunicationType): + """Sets the comm_type of this Resource. + + + :param comm_type: The comm_type of this Resource. + :type comm_type: CommunicationType + """ + if comm_type is None: + raise ValueError("Invalid value for `comm_type`, must not be `None`") # noqa: E501 + + self._comm_type = comm_type + + @property + def uri(self) -> str: + """Gets the uri of this Resource. + + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The uri of this Resource. + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri: str): + """Sets the uri of this Resource. + + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param uri: The uri of this Resource. + :type uri: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def cust_op_name(self) -> str: + """Gets the cust_op_name of this Resource. + + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The cust_op_name of this Resource. + :rtype: str + """ + return self._cust_op_name + + @cust_op_name.setter + def cust_op_name(self, cust_op_name: str): + """Sets the cust_op_name of this Resource. + + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param cust_op_name: The cust_op_name of this Resource. + :type cust_op_name: str + """ + + self._cust_op_name = cust_op_name + + @property + def operations(self) -> List[Operation]: + """Gets the operations of this Resource. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :return: The operations of this Resource. + :rtype: List[Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations: List[Operation]): + """Sets the operations of this Resource. + + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. # noqa: E501 + + :param operations: The operations of this Resource. + :type operations: List[Operation] + """ + if operations is not None and len(operations) < 1: + raise ValueError("Invalid value for `operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._operations = operations + + @property + def description(self) -> str: + """Gets the description of this Resource. + + Text description of the API resource # noqa: E501 + + :return: The description of this Resource. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this Resource. + + Text description of the API resource # noqa: E501 + + :param description: The description of this Resource. + :type description: str + """ + + self._description = description diff --git a/services/helper/helper_service/services/api/models/security_information.py b/services/helper/helper_service/services/api/models/security_information.py new file mode 100644 index 0000000000000000000000000000000000000000..49aabfcfad9b0a752df263c81a4a52674fe455bc --- /dev/null +++ b/services/helper/helper_service/services/api/models/security_information.py @@ -0,0 +1,235 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.interface_description import InterfaceDescription +from api.models.security_method import SecurityMethod +from api import util + +from api.models.interface_description import InterfaceDescription # noqa: E501 +from api.models.security_method import SecurityMethod # noqa: E501 + +class SecurityInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, interface_details=None, aef_id=None, api_id=None, pref_security_methods=None, sel_security_method=None, authentication_info=None, authorization_info=None): # noqa: E501 + """SecurityInformation - a model defined in OpenAPI + + :param interface_details: The interface_details of this SecurityInformation. # noqa: E501 + :type interface_details: InterfaceDescription + :param aef_id: The aef_id of this SecurityInformation. # noqa: E501 + :type aef_id: str + :param api_id: The api_id of this SecurityInformation. # noqa: E501 + :type api_id: str + :param pref_security_methods: The pref_security_methods of this SecurityInformation. # noqa: E501 + :type pref_security_methods: List[SecurityMethod] + :param sel_security_method: The sel_security_method of this SecurityInformation. # noqa: E501 + :type sel_security_method: SecurityMethod + :param authentication_info: The authentication_info of this SecurityInformation. # noqa: E501 + :type authentication_info: str + :param authorization_info: The authorization_info of this SecurityInformation. # noqa: E501 + :type authorization_info: str + """ + self.openapi_types = { + 'interface_details': InterfaceDescription, + 'aef_id': str, + 'api_id': str, + 'pref_security_methods': List[SecurityMethod], + 'sel_security_method': SecurityMethod, + 'authentication_info': str, + 'authorization_info': str + } + + self.attribute_map = { + 'interface_details': 'interfaceDetails', + 'aef_id': 'aefId', + 'api_id': 'apiId', + 'pref_security_methods': 'prefSecurityMethods', + 'sel_security_method': 'selSecurityMethod', + 'authentication_info': 'authenticationInfo', + 'authorization_info': 'authorizationInfo' + } + + self._interface_details = interface_details + self._aef_id = aef_id + self._api_id = api_id + self._pref_security_methods = pref_security_methods + self._sel_security_method = sel_security_method + self._authentication_info = authentication_info + self._authorization_info = authorization_info + + @classmethod + def from_dict(cls, dikt) -> 'SecurityInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SecurityInformation of this SecurityInformation. # noqa: E501 + :rtype: SecurityInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def interface_details(self) -> InterfaceDescription: + """Gets the interface_details of this SecurityInformation. + + + :return: The interface_details of this SecurityInformation. + :rtype: InterfaceDescription + """ + return self._interface_details + + @interface_details.setter + def interface_details(self, interface_details: InterfaceDescription): + """Sets the interface_details of this SecurityInformation. + + + :param interface_details: The interface_details of this SecurityInformation. + :type interface_details: InterfaceDescription + """ + + self._interface_details = interface_details + + @property + def aef_id(self) -> str: + """Gets the aef_id of this SecurityInformation. + + Identifier of the API exposing function # noqa: E501 + + :return: The aef_id of this SecurityInformation. + :rtype: str + """ + return self._aef_id + + @aef_id.setter + def aef_id(self, aef_id: str): + """Sets the aef_id of this SecurityInformation. + + Identifier of the API exposing function # noqa: E501 + + :param aef_id: The aef_id of this SecurityInformation. + :type aef_id: str + """ + + self._aef_id = aef_id + + @property + def api_id(self) -> str: + """Gets the api_id of this SecurityInformation. + + API identifier # noqa: E501 + + :return: The api_id of this SecurityInformation. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this SecurityInformation. + + API identifier # noqa: E501 + + :param api_id: The api_id of this SecurityInformation. + :type api_id: str + """ + + self._api_id = api_id + + @property + def pref_security_methods(self) -> List[SecurityMethod]: + """Gets the pref_security_methods of this SecurityInformation. + + Security methods preferred by the API invoker for the API interface. # noqa: E501 + + :return: The pref_security_methods of this SecurityInformation. + :rtype: List[SecurityMethod] + """ + return self._pref_security_methods + + @pref_security_methods.setter + def pref_security_methods(self, pref_security_methods: List[SecurityMethod]): + """Sets the pref_security_methods of this SecurityInformation. + + Security methods preferred by the API invoker for the API interface. # noqa: E501 + + :param pref_security_methods: The pref_security_methods of this SecurityInformation. + :type pref_security_methods: List[SecurityMethod] + """ + if pref_security_methods is None: + raise ValueError("Invalid value for `pref_security_methods`, must not be `None`") # noqa: E501 + if pref_security_methods is not None and len(pref_security_methods) < 1: + raise ValueError("Invalid value for `pref_security_methods`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._pref_security_methods = pref_security_methods + + @property + def sel_security_method(self) -> SecurityMethod: + """Gets the sel_security_method of this SecurityInformation. + + + :return: The sel_security_method of this SecurityInformation. + :rtype: SecurityMethod + """ + return self._sel_security_method + + @sel_security_method.setter + def sel_security_method(self, sel_security_method: SecurityMethod): + """Sets the sel_security_method of this SecurityInformation. + + + :param sel_security_method: The sel_security_method of this SecurityInformation. + :type sel_security_method: SecurityMethod + """ + + self._sel_security_method = sel_security_method + + @property + def authentication_info(self) -> str: + """Gets the authentication_info of this SecurityInformation. + + Authentication related information # noqa: E501 + + :return: The authentication_info of this SecurityInformation. + :rtype: str + """ + return self._authentication_info + + @authentication_info.setter + def authentication_info(self, authentication_info: str): + """Sets the authentication_info of this SecurityInformation. + + Authentication related information # noqa: E501 + + :param authentication_info: The authentication_info of this SecurityInformation. + :type authentication_info: str + """ + + self._authentication_info = authentication_info + + @property + def authorization_info(self) -> str: + """Gets the authorization_info of this SecurityInformation. + + Authorization related information # noqa: E501 + + :return: The authorization_info of this SecurityInformation. + :rtype: str + """ + return self._authorization_info + + @authorization_info.setter + def authorization_info(self, authorization_info: str): + """Sets the authorization_info of this SecurityInformation. + + Authorization related information # noqa: E501 + + :param authorization_info: The authorization_info of this SecurityInformation. + :type authorization_info: str + """ + + self._authorization_info = authorization_info diff --git a/services/helper/helper_service/services/api/models/security_method.py b/services/helper/helper_service/services/api/models/security_method.py new file mode 100644 index 0000000000000000000000000000000000000000..df7d3ecc1b14c82a152e20ac33d5ce146c4cde65 --- /dev/null +++ b/services/helper/helper_service/services/api/models/security_method.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class SecurityMethod(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """SecurityMethod - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'SecurityMethod': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SecurityMethod of this SecurityMethod. # noqa: E501 + :rtype: SecurityMethod + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/service_api_description.py b/services/helper/helper_service/services/api/models/service_api_description.py new file mode 100644 index 0000000000000000000000000000000000000000..a89c801671be6b27ec20992dd84c10e9107ba18d --- /dev/null +++ b/services/helper/helper_service/services/api/models/service_api_description.py @@ -0,0 +1,325 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.aef_profile import AefProfile +from api.models.published_api_path import PublishedApiPath +from api.models.shareable_information import ShareableInformation +import re +from api import util + +from api.models.aef_profile import AefProfile # noqa: E501 +from api.models.published_api_path import PublishedApiPath # noqa: E501 +from api.models.shareable_information import ShareableInformation # noqa: E501 +import re # noqa: E501 + +class ServiceAPIDescription(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_name=None, api_id=None, aef_profiles=None, description=None, supported_features=None, shareable_info=None, service_api_category=None, api_supp_feats=None, pub_api_path=None, ccf_id=None): # noqa: E501 + """ServiceAPIDescription - a model defined in OpenAPI + + :param api_name: The api_name of this ServiceAPIDescription. # noqa: E501 + :type api_name: str + :param api_id: The api_id of this ServiceAPIDescription. # noqa: E501 + :type api_id: str + :param aef_profiles: The aef_profiles of this ServiceAPIDescription. # noqa: E501 + :type aef_profiles: List[AefProfile] + :param description: The description of this ServiceAPIDescription. # noqa: E501 + :type description: str + :param supported_features: The supported_features of this ServiceAPIDescription. # noqa: E501 + :type supported_features: str + :param shareable_info: The shareable_info of this ServiceAPIDescription. # noqa: E501 + :type shareable_info: ShareableInformation + :param service_api_category: The service_api_category of this ServiceAPIDescription. # noqa: E501 + :type service_api_category: str + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescription. # noqa: E501 + :type api_supp_feats: str + :param pub_api_path: The pub_api_path of this ServiceAPIDescription. # noqa: E501 + :type pub_api_path: PublishedApiPath + :param ccf_id: The ccf_id of this ServiceAPIDescription. # noqa: E501 + :type ccf_id: str + """ + self.openapi_types = { + 'api_name': str, + 'api_id': str, + 'aef_profiles': List[AefProfile], + 'description': str, + 'supported_features': str, + 'shareable_info': ShareableInformation, + 'service_api_category': str, + 'api_supp_feats': str, + 'pub_api_path': PublishedApiPath, + 'ccf_id': str + } + + self.attribute_map = { + 'api_name': 'apiName', + 'api_id': 'apiId', + 'aef_profiles': 'aefProfiles', + 'description': 'description', + 'supported_features': 'supportedFeatures', + 'shareable_info': 'shareableInfo', + 'service_api_category': 'serviceAPICategory', + 'api_supp_feats': 'apiSuppFeats', + 'pub_api_path': 'pubApiPath', + 'ccf_id': 'ccfId' + } + + self._api_name = api_name + self._api_id = api_id + self._aef_profiles = aef_profiles + self._description = description + self._supported_features = supported_features + self._shareable_info = shareable_info + self._service_api_category = service_api_category + self._api_supp_feats = api_supp_feats + self._pub_api_path = pub_api_path + self._ccf_id = ccf_id + + @classmethod + def from_dict(cls, dikt) -> 'ServiceAPIDescription': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceAPIDescription of this ServiceAPIDescription. # noqa: E501 + :rtype: ServiceAPIDescription + """ + return util.deserialize_model(dikt, cls) + + @property + def api_name(self) -> str: + """Gets the api_name of this ServiceAPIDescription. + + API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :return: The api_name of this ServiceAPIDescription. + :rtype: str + """ + return self._api_name + + @api_name.setter + def api_name(self, api_name: str): + """Sets the api_name of this ServiceAPIDescription. + + API name, it is set as {apiName} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. # noqa: E501 + + :param api_name: The api_name of this ServiceAPIDescription. + :type api_name: str + """ + if api_name is None: + raise ValueError("Invalid value for `api_name`, must not be `None`") # noqa: E501 + + self._api_name = api_name + + @property + def api_id(self) -> str: + """Gets the api_id of this ServiceAPIDescription. + + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). # noqa: E501 + + :return: The api_id of this ServiceAPIDescription. + :rtype: str + """ + return self._api_id + + @api_id.setter + def api_id(self, api_id: str): + """Sets the api_id of this ServiceAPIDescription. + + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). # noqa: E501 + + :param api_id: The api_id of this ServiceAPIDescription. + :type api_id: str + """ + + self._api_id = api_id + + @property + def aef_profiles(self) -> List[AefProfile]: + """Gets the aef_profiles of this ServiceAPIDescription. + + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + + :return: The aef_profiles of this ServiceAPIDescription. + :rtype: List[AefProfile] + """ + return self._aef_profiles + + @aef_profiles.setter + def aef_profiles(self, aef_profiles: List[AefProfile]): + """Sets the aef_profiles of this ServiceAPIDescription. + + AEF profile information, which includes the exposed API details (e.g. protocol). # noqa: E501 + + :param aef_profiles: The aef_profiles of this ServiceAPIDescription. + :type aef_profiles: List[AefProfile] + """ + if aef_profiles is not None and len(aef_profiles) < 1: + raise ValueError("Invalid value for `aef_profiles`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._aef_profiles = aef_profiles + + @property + def description(self) -> str: + """Gets the description of this ServiceAPIDescription. + + Text description of the API # noqa: E501 + + :return: The description of this ServiceAPIDescription. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description: str): + """Sets the description of this ServiceAPIDescription. + + Text description of the API # noqa: E501 + + :param description: The description of this ServiceAPIDescription. + :type description: str + """ + + self._description = description + + @property + def supported_features(self) -> str: + """Gets the supported_features of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this ServiceAPIDescription. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this ServiceAPIDescription. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features + + @property + def shareable_info(self) -> ShareableInformation: + """Gets the shareable_info of this ServiceAPIDescription. + + + :return: The shareable_info of this ServiceAPIDescription. + :rtype: ShareableInformation + """ + return self._shareable_info + + @shareable_info.setter + def shareable_info(self, shareable_info: ShareableInformation): + """Sets the shareable_info of this ServiceAPIDescription. + + + :param shareable_info: The shareable_info of this ServiceAPIDescription. + :type shareable_info: ShareableInformation + """ + + self._shareable_info = shareable_info + + @property + def service_api_category(self) -> str: + """Gets the service_api_category of this ServiceAPIDescription. + + + :return: The service_api_category of this ServiceAPIDescription. + :rtype: str + """ + return self._service_api_category + + @service_api_category.setter + def service_api_category(self, service_api_category: str): + """Sets the service_api_category of this ServiceAPIDescription. + + + :param service_api_category: The service_api_category of this ServiceAPIDescription. + :type service_api_category: str + """ + + self._service_api_category = service_api_category + + @property + def api_supp_feats(self) -> str: + """Gets the api_supp_feats of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The api_supp_feats of this ServiceAPIDescription. + :rtype: str + """ + return self._api_supp_feats + + @api_supp_feats.setter + def api_supp_feats(self, api_supp_feats: str): + """Sets the api_supp_feats of this ServiceAPIDescription. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param api_supp_feats: The api_supp_feats of this ServiceAPIDescription. + :type api_supp_feats: str + """ + if api_supp_feats is not None and not re.search(r'^[A-Fa-f0-9]*$', api_supp_feats): # noqa: E501 + raise ValueError(r"Invalid value for `api_supp_feats`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._api_supp_feats = api_supp_feats + + @property + def pub_api_path(self) -> PublishedApiPath: + """Gets the pub_api_path of this ServiceAPIDescription. + + + :return: The pub_api_path of this ServiceAPIDescription. + :rtype: PublishedApiPath + """ + return self._pub_api_path + + @pub_api_path.setter + def pub_api_path(self, pub_api_path: PublishedApiPath): + """Sets the pub_api_path of this ServiceAPIDescription. + + + :param pub_api_path: The pub_api_path of this ServiceAPIDescription. + :type pub_api_path: PublishedApiPath + """ + + self._pub_api_path = pub_api_path + + @property + def ccf_id(self) -> str: + """Gets the ccf_id of this ServiceAPIDescription. + + CAPIF core function identifier. # noqa: E501 + + :return: The ccf_id of this ServiceAPIDescription. + :rtype: str + """ + return self._ccf_id + + @ccf_id.setter + def ccf_id(self, ccf_id: str): + """Sets the ccf_id of this ServiceAPIDescription. + + CAPIF core function identifier. # noqa: E501 + + :param ccf_id: The ccf_id of this ServiceAPIDescription. + :type ccf_id: str + """ + + self._ccf_id = ccf_id diff --git a/services/helper/helper_service/services/api/models/service_security.py b/services/helper/helper_service/services/api/models/service_security.py new file mode 100644 index 0000000000000000000000000000000000000000..ad66ad20649470196ef29c2a6d456687c7a86af8 --- /dev/null +++ b/services/helper/helper_service/services/api/models/service_security.py @@ -0,0 +1,211 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.security_information import SecurityInformation +from api.models.websock_notif_config import WebsockNotifConfig +import re +from api import util + +from api.models.security_information import SecurityInformation # noqa: E501 +from api.models.websock_notif_config import WebsockNotifConfig # noqa: E501 +import re # noqa: E501 + +class ServiceSecurity(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_invoker_id=None, security_info=None, notification_destination=None, request_test_notification=None, websock_notif_config=None, supported_features=None): # noqa: E501 + """ServiceSecurity - a model defined in OpenAPI + + :param api_invoker_id: The api_invoker_id of this ServiceSecurity. # noqa: E501 + :type api_invoker_id: str + :param security_info: The security_info of this ServiceSecurity. # noqa: E501 + :type security_info: List[SecurityInformation] + :param notification_destination: The notification_destination of this ServiceSecurity. # noqa: E501 + :type notification_destination: str + :param request_test_notification: The request_test_notification of this ServiceSecurity. # noqa: E501 + :type request_test_notification: bool + :param websock_notif_config: The websock_notif_config of this ServiceSecurity. # noqa: E501 + :type websock_notif_config: WebsockNotifConfig + :param supported_features: The supported_features of this ServiceSecurity. # noqa: E501 + :type supported_features: str + """ + self.openapi_types = { + 'api_invoker_id': str, + 'security_info': List[SecurityInformation], + 'notification_destination': str, + 'request_test_notification': bool, + 'websock_notif_config': WebsockNotifConfig, + 'supported_features': str + } + + self.attribute_map = { + 'api_invoker_id': 'api_invoker_id', + 'security_info': 'securityInfo', + 'notification_destination': 'notificationDestination', + 'request_test_notification': 'requestTestNotification', + 'websock_notif_config': 'websockNotifConfig', + 'supported_features': 'supportedFeatures' + } + + self._api_invoker_id = api_invoker_id + self._security_info = security_info + self._notification_destination = notification_destination + self._request_test_notification = request_test_notification + self._websock_notif_config = websock_notif_config + self._supported_features = supported_features + + @classmethod + def from_dict(cls, dikt) -> 'ServiceSecurity': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ServiceSecurity of this ServiceSecurity. # noqa: E501 + :rtype: ServiceSecurity + """ + return util.deserialize_model(dikt, cls) + + @property + def api_invoker_id(self) -> str: + """Gets the api_invoker_id of this ServiceSecurity. + + Id of the invoker of this security context. # noqa: E501 + + :return: The api_invoker_id of this ServiceSecurity. + :rtype: str + """ + return self._api_invoker_id + + @api_invoker_id.setter + def api_invoker_id(self, api_invoker_id: str): + """Sets the api_invoker_id of this ServiceSecurity. + + Id of the invoker of this security context. # noqa: E501 + + :param api_invoker_id: The api_invoker_id of this ServiceSecurity. + :type api_invoker_id: str + """ + + self._api_invoker_id = api_invoker_id + + @property + def security_info(self) -> List[SecurityInformation]: + """Gets the security_info of this ServiceSecurity. + + + :return: The security_info of this ServiceSecurity. + :rtype: List[SecurityInformation] + """ + return self._security_info + + @security_info.setter + def security_info(self, security_info: List[SecurityInformation]): + """Sets the security_info of this ServiceSecurity. + + + :param security_info: The security_info of this ServiceSecurity. + :type security_info: List[SecurityInformation] + """ + if security_info is None: + raise ValueError("Invalid value for `security_info`, must not be `None`") # noqa: E501 + + self._security_info = security_info + + @property + def notification_destination(self) -> str: + """Gets the notification_destination of this ServiceSecurity. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :return: The notification_destination of this ServiceSecurity. + :rtype: str + """ + return self._notification_destination + + @notification_destination.setter + def notification_destination(self, notification_destination: str): + """Sets the notification_destination of this ServiceSecurity. + + string providing an URI formatted according to IETF RFC 3986. # noqa: E501 + + :param notification_destination: The notification_destination of this ServiceSecurity. + :type notification_destination: str + """ + if notification_destination is None: + raise ValueError("Invalid value for `notification_destination`, must not be `None`") # noqa: E501 + + self._notification_destination = notification_destination + + @property + def request_test_notification(self) -> bool: + """Gets the request_test_notification of this ServiceSecurity. + + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :return: The request_test_notification of this ServiceSecurity. + :rtype: bool + """ + return self._request_test_notification + + @request_test_notification.setter + def request_test_notification(self, request_test_notification: bool): + """Sets the request_test_notification of this ServiceSecurity. + + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. # noqa: E501 + + :param request_test_notification: The request_test_notification of this ServiceSecurity. + :type request_test_notification: bool + """ + + self._request_test_notification = request_test_notification + + @property + def websock_notif_config(self) -> WebsockNotifConfig: + """Gets the websock_notif_config of this ServiceSecurity. + + + :return: The websock_notif_config of this ServiceSecurity. + :rtype: WebsockNotifConfig + """ + return self._websock_notif_config + + @websock_notif_config.setter + def websock_notif_config(self, websock_notif_config: WebsockNotifConfig): + """Sets the websock_notif_config of this ServiceSecurity. + + + :param websock_notif_config: The websock_notif_config of this ServiceSecurity. + :type websock_notif_config: WebsockNotifConfig + """ + + self._websock_notif_config = websock_notif_config + + @property + def supported_features(self) -> str: + """Gets the supported_features of this ServiceSecurity. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :return: The supported_features of this ServiceSecurity. + :rtype: str + """ + return self._supported_features + + @supported_features.setter + def supported_features(self, supported_features: str): + """Sets the supported_features of this ServiceSecurity. + + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of \"0\" to \"9\", \"a\" to \"f\" or \"A\" to \"F\" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. # noqa: E501 + + :param supported_features: The supported_features of this ServiceSecurity. + :type supported_features: str + """ + if supported_features is not None and not re.search(r'^[A-Fa-f0-9]*$', supported_features): # noqa: E501 + raise ValueError(r"Invalid value for `supported_features`, must be a follow pattern or equal to `/^[A-Fa-f0-9]*$/`") # noqa: E501 + + self._supported_features = supported_features diff --git a/services/helper/helper_service/services/api/models/shareable_information.py b/services/helper/helper_service/services/api/models/shareable_information.py new file mode 100644 index 0000000000000000000000000000000000000000..4be3ded40482202e9af94d7935b23a0f6d277276 --- /dev/null +++ b/services/helper/helper_service/services/api/models/shareable_information.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class ShareableInformation(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, is_shareable=None, capif_prov_doms=None): # noqa: E501 + """ShareableInformation - a model defined in OpenAPI + + :param is_shareable: The is_shareable of this ShareableInformation. # noqa: E501 + :type is_shareable: bool + :param capif_prov_doms: The capif_prov_doms of this ShareableInformation. # noqa: E501 + :type capif_prov_doms: List[str] + """ + self.openapi_types = { + 'is_shareable': bool, + 'capif_prov_doms': List[str] + } + + self.attribute_map = { + 'is_shareable': 'isShareable', + 'capif_prov_doms': 'capifProvDoms' + } + + self._is_shareable = is_shareable + self._capif_prov_doms = capif_prov_doms + + @classmethod + def from_dict(cls, dikt) -> 'ShareableInformation': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ShareableInformation of this ShareableInformation. # noqa: E501 + :rtype: ShareableInformation + """ + return util.deserialize_model(dikt, cls) + + @property + def is_shareable(self) -> bool: + """Gets the is_shareable of this ShareableInformation. + + Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + + :return: The is_shareable of this ShareableInformation. + :rtype: bool + """ + return self._is_shareable + + @is_shareable.setter + def is_shareable(self, is_shareable: bool): + """Sets the is_shareable of this ShareableInformation. + + Set to \"true\" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to \"false\". # noqa: E501 + + :param is_shareable: The is_shareable of this ShareableInformation. + :type is_shareable: bool + """ + if is_shareable is None: + raise ValueError("Invalid value for `is_shareable`, must not be `None`") # noqa: E501 + + self._is_shareable = is_shareable + + @property + def capif_prov_doms(self) -> List[str]: + """Gets the capif_prov_doms of this ShareableInformation. + + List of CAPIF provider domains to which the service API information to be shared. # noqa: E501 + + :return: The capif_prov_doms of this ShareableInformation. + :rtype: List[str] + """ + return self._capif_prov_doms + + @capif_prov_doms.setter + def capif_prov_doms(self, capif_prov_doms: List[str]): + """Sets the capif_prov_doms of this ShareableInformation. + + List of CAPIF provider domains to which the service API information to be shared. # noqa: E501 + + :param capif_prov_doms: The capif_prov_doms of this ShareableInformation. + :type capif_prov_doms: List[str] + """ + if capif_prov_doms is not None and len(capif_prov_doms) < 1: + raise ValueError("Invalid value for `capif_prov_doms`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._capif_prov_doms = capif_prov_doms diff --git a/services/helper/helper_service/services/api/models/supported_gad_shapes.py b/services/helper/helper_service/services/api/models/supported_gad_shapes.py new file mode 100644 index 0000000000000000000000000000000000000000..81ef146f8d69ce347047a7b9d78c6c5d7d477e8b --- /dev/null +++ b/services/helper/helper_service/services/api/models/supported_gad_shapes.py @@ -0,0 +1,34 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class SupportedGADShapes(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self): # noqa: E501 + """SupportedGADShapes - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'SupportedGADShapes': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SupportedGADShapes of this SupportedGADShapes. # noqa: E501 + :rtype: SupportedGADShapes + """ + return util.deserialize_model(dikt, cls) diff --git a/services/helper/helper_service/services/api/models/uncertainty_ellipse.py b/services/helper/helper_service/services/api/models/uncertainty_ellipse.py new file mode 100644 index 0000000000000000000000000000000000000000..b93bc86a9f21076126e85caf08abc15c97309178 --- /dev/null +++ b/services/helper/helper_service/services/api/models/uncertainty_ellipse.py @@ -0,0 +1,133 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class UncertaintyEllipse(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, semi_major=None, semi_minor=None, orientation_major=None): # noqa: E501 + """UncertaintyEllipse - a model defined in OpenAPI + + :param semi_major: The semi_major of this UncertaintyEllipse. # noqa: E501 + :type semi_major: float + :param semi_minor: The semi_minor of this UncertaintyEllipse. # noqa: E501 + :type semi_minor: float + :param orientation_major: The orientation_major of this UncertaintyEllipse. # noqa: E501 + :type orientation_major: int + """ + self.openapi_types = { + 'semi_major': float, + 'semi_minor': float, + 'orientation_major': int + } + + self.attribute_map = { + 'semi_major': 'semiMajor', + 'semi_minor': 'semiMinor', + 'orientation_major': 'orientationMajor' + } + + self._semi_major = semi_major + self._semi_minor = semi_minor + self._orientation_major = orientation_major + + @classmethod + def from_dict(cls, dikt) -> 'UncertaintyEllipse': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The UncertaintyEllipse of this UncertaintyEllipse. # noqa: E501 + :rtype: UncertaintyEllipse + """ + return util.deserialize_model(dikt, cls) + + @property + def semi_major(self) -> float: + """Gets the semi_major of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_major of this UncertaintyEllipse. + :rtype: float + """ + return self._semi_major + + @semi_major.setter + def semi_major(self, semi_major: float): + """Sets the semi_major of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_major: The semi_major of this UncertaintyEllipse. + :type semi_major: float + """ + if semi_major is None: + raise ValueError("Invalid value for `semi_major`, must not be `None`") # noqa: E501 + if semi_major is not None and semi_major < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_major = semi_major + + @property + def semi_minor(self) -> float: + """Gets the semi_minor of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :return: The semi_minor of this UncertaintyEllipse. + :rtype: float + """ + return self._semi_minor + + @semi_minor.setter + def semi_minor(self, semi_minor: float): + """Sets the semi_minor of this UncertaintyEllipse. + + Indicates value of uncertainty. # noqa: E501 + + :param semi_minor: The semi_minor of this UncertaintyEllipse. + :type semi_minor: float + """ + if semi_minor is None: + raise ValueError("Invalid value for `semi_minor`, must not be `None`") # noqa: E501 + if semi_minor is not None and semi_minor < 0: # noqa: E501 + raise ValueError("Invalid value for `semi_minor`, must be a value greater than or equal to `0`") # noqa: E501 + + self._semi_minor = semi_minor + + @property + def orientation_major(self) -> int: + """Gets the orientation_major of this UncertaintyEllipse. + + Indicates value of orientation angle. # noqa: E501 + + :return: The orientation_major of this UncertaintyEllipse. + :rtype: int + """ + return self._orientation_major + + @orientation_major.setter + def orientation_major(self, orientation_major: int): + """Sets the orientation_major of this UncertaintyEllipse. + + Indicates value of orientation angle. # noqa: E501 + + :param orientation_major: The orientation_major of this UncertaintyEllipse. + :type orientation_major: int + """ + if orientation_major is None: + raise ValueError("Invalid value for `orientation_major`, must not be `None`") # noqa: E501 + if orientation_major is not None and orientation_major > 180: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value less than or equal to `180`") # noqa: E501 + if orientation_major is not None and orientation_major < 0: # noqa: E501 + raise ValueError("Invalid value for `orientation_major`, must be a value greater than or equal to `0`") # noqa: E501 + + self._orientation_major = orientation_major diff --git a/services/helper/helper_service/services/api/models/version.py b/services/helper/helper_service/services/api/models/version.py new file mode 100644 index 0000000000000000000000000000000000000000..79ccbdf9ceec2782838b57a7eb08568d0dc5aabc --- /dev/null +++ b/services/helper/helper_service/services/api/models/version.py @@ -0,0 +1,157 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api.models.custom_operation import CustomOperation +from api.models.resource import Resource +from api import util + +from api.models.custom_operation import CustomOperation # noqa: E501 +from api.models.resource import Resource # noqa: E501 + +class Version(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, api_version=None, expiry=None, resources=None, cust_operations=None): # noqa: E501 + """Version - a model defined in OpenAPI + + :param api_version: The api_version of this Version. # noqa: E501 + :type api_version: str + :param expiry: The expiry of this Version. # noqa: E501 + :type expiry: datetime + :param resources: The resources of this Version. # noqa: E501 + :type resources: List[Resource] + :param cust_operations: The cust_operations of this Version. # noqa: E501 + :type cust_operations: List[CustomOperation] + """ + self.openapi_types = { + 'api_version': str, + 'expiry': datetime, + 'resources': List[Resource], + 'cust_operations': List[CustomOperation] + } + + self.attribute_map = { + 'api_version': 'apiVersion', + 'expiry': 'expiry', + 'resources': 'resources', + 'cust_operations': 'custOperations' + } + + self._api_version = api_version + self._expiry = expiry + self._resources = resources + self._cust_operations = cust_operations + + @classmethod + def from_dict(cls, dikt) -> 'Version': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Version of this Version. # noqa: E501 + :rtype: Version + """ + return util.deserialize_model(dikt, cls) + + @property + def api_version(self) -> str: + """Gets the api_version of this Version. + + API major version in URI (e.g. v1) # noqa: E501 + + :return: The api_version of this Version. + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version: str): + """Sets the api_version of this Version. + + API major version in URI (e.g. v1) # noqa: E501 + + :param api_version: The api_version of this Version. + :type api_version: str + """ + if api_version is None: + raise ValueError("Invalid value for `api_version`, must not be `None`") # noqa: E501 + + self._api_version = api_version + + @property + def expiry(self) -> datetime: + """Gets the expiry of this Version. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :return: The expiry of this Version. + :rtype: datetime + """ + return self._expiry + + @expiry.setter + def expiry(self, expiry: datetime): + """Sets the expiry of this Version. + + string with format \"date-time\" as defined in OpenAPI. # noqa: E501 + + :param expiry: The expiry of this Version. + :type expiry: datetime + """ + + self._expiry = expiry + + @property + def resources(self) -> List[Resource]: + """Gets the resources of this Version. + + Resources supported by the API. # noqa: E501 + + :return: The resources of this Version. + :rtype: List[Resource] + """ + return self._resources + + @resources.setter + def resources(self, resources: List[Resource]): + """Sets the resources of this Version. + + Resources supported by the API. # noqa: E501 + + :param resources: The resources of this Version. + :type resources: List[Resource] + """ + if resources is not None and len(resources) < 1: + raise ValueError("Invalid value for `resources`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._resources = resources + + @property + def cust_operations(self) -> List[CustomOperation]: + """Gets the cust_operations of this Version. + + Custom operations without resource association. # noqa: E501 + + :return: The cust_operations of this Version. + :rtype: List[CustomOperation] + """ + return self._cust_operations + + @cust_operations.setter + def cust_operations(self, cust_operations: List[CustomOperation]): + """Sets the cust_operations of this Version. + + Custom operations without resource association. # noqa: E501 + + :param cust_operations: The cust_operations of this Version. + :type cust_operations: List[CustomOperation] + """ + if cust_operations is not None and len(cust_operations) < 1: + raise ValueError("Invalid value for `cust_operations`, number of items must be greater than or equal to `1`") # noqa: E501 + + self._cust_operations = cust_operations diff --git a/services/helper/helper_service/services/api/models/websock_notif_config.py b/services/helper/helper_service/services/api/models/websock_notif_config.py new file mode 100644 index 0000000000000000000000000000000000000000..3c05d3988ecdf04a78f75e971db0cca803f5468a --- /dev/null +++ b/services/helper/helper_service/services/api/models/websock_notif_config.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from api.models.base_model import Model +from api import util + + +class WebsockNotifConfig(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, websocket_uri=None, request_websocket_uri=None): # noqa: E501 + """WebsockNotifConfig - a model defined in OpenAPI + + :param websocket_uri: The websocket_uri of this WebsockNotifConfig. # noqa: E501 + :type websocket_uri: str + :param request_websocket_uri: The request_websocket_uri of this WebsockNotifConfig. # noqa: E501 + :type request_websocket_uri: bool + """ + self.openapi_types = { + 'websocket_uri': str, + 'request_websocket_uri': bool + } + + self.attribute_map = { + 'websocket_uri': 'websocketUri', + 'request_websocket_uri': 'requestWebsocketUri' + } + + self._websocket_uri = websocket_uri + self._request_websocket_uri = request_websocket_uri + + @classmethod + def from_dict(cls, dikt) -> 'WebsockNotifConfig': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The WebsockNotifConfig of this WebsockNotifConfig. # noqa: E501 + :rtype: WebsockNotifConfig + """ + return util.deserialize_model(dikt, cls) + + @property + def websocket_uri(self) -> str: + """Gets the websocket_uri of this WebsockNotifConfig. + + string formatted according to IETF RFC 3986 identifying a referenced resource. # noqa: E501 + + :return: The websocket_uri of this WebsockNotifConfig. + :rtype: str + """ + return self._websocket_uri + + @websocket_uri.setter + def websocket_uri(self, websocket_uri: str): + """Sets the websocket_uri of this WebsockNotifConfig. + + string formatted according to IETF RFC 3986 identifying a referenced resource. # noqa: E501 + + :param websocket_uri: The websocket_uri of this WebsockNotifConfig. + :type websocket_uri: str + """ + + self._websocket_uri = websocket_uri + + @property + def request_websocket_uri(self) -> bool: + """Gets the request_websocket_uri of this WebsockNotifConfig. + + Set by the SCS/AS to indicate that the Websocket delivery is requested. # noqa: E501 + + :return: The request_websocket_uri of this WebsockNotifConfig. + :rtype: bool + """ + return self._request_websocket_uri + + @request_websocket_uri.setter + def request_websocket_uri(self, request_websocket_uri: bool): + """Sets the request_websocket_uri of this WebsockNotifConfig. + + Set by the SCS/AS to indicate that the Websocket delivery is requested. # noqa: E501 + + :param request_websocket_uri: The request_websocket_uri of this WebsockNotifConfig. + :type request_websocket_uri: bool + """ + + self._request_websocket_uri = request_websocket_uri diff --git a/services/helper/helper_service/services/api/openapi/openapi.yaml b/services/helper/helper_service/services/api/openapi/openapi.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9853138be497da7e36464cf78080d8e2c85dda93 --- /dev/null +++ b/services/helper/helper_service/services/api/openapi/openapi.yaml @@ -0,0 +1,5521 @@ +openapi: 3.0.1 +info: + description: | + CAPIF Helper API for browsing CAPIF runtime data: invokers, providers, services, + security bindings, and subscriptions/events. This is an internal helper interface. + title: Helper API + version: 1.0.0 +servers: +- url: "{apiRoot}/api" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /deleteEntities/{uuid}: + delete: + description: "Deletes all CAPIF entities (invokers, providers, services, security\ + \ contexts, events) associated with the given UUID." + operationId: helper_controller_delete_entities + parameters: + - description: UUID of the user whose entities are to be deleted. + explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "200": + description: Entities deleted successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Delete entities by UUID + x-openapi-router-controller: api.controllers.default_controller + /getCcfId: + get: + description: Retrieves the CCF ID of the CAPIF Core Function. + operationId: helper_controller_get_ccf_id + responses: + "200": + description: CCF ID retrieved successfully. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Get CCF ID + x-openapi-router-controller: api.controllers.default_controller + /getEvents: + get: + description: Returns CAPIF event subscriptions or delivered events. + operationId: helper_controller_get_events + parameters: + - description: Filter by subscriber identifier. + explode: true + in: query + name: subscriber_id + required: false + schema: + type: string + style: form + - description: Filter by subscription identifier. + explode: true + in: query + name: subscription_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseEvent' + description: Paged list of events. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve CAPIF events + x-openapi-router-controller: api.controllers.default_controller + /getInvokers: + get: + description: Returns invoker entries with pagination and optional filters. + operationId: helper_controller_get_invokers + parameters: + - description: Filter by invoker UUID. + explode: true + in: query + name: uuid + required: false + schema: + type: string + style: form + - description: Filter by CAPIF `apiInvokerId`. + explode: true + in: query + name: api_invoker_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: Sort direction. + explode: true + in: query + name: sort_order + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseInvoker' + description: Paged list of invokers. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve API invokers + x-openapi-router-controller: api.controllers.default_controller + /getProviders: + get: + description: Returns provider domains (CAPIF provider domains / AEF providers) + with pagination. + operationId: helper_controller_get_providers + parameters: + - description: Filter by provider UUID. + explode: true + in: query + name: uuid + required: false + schema: + type: string + style: form + - description: Filter by provider domain ID. + explode: true + in: query + name: api_prov_dom_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: Sort direction. + explode: true + in: query + name: sort_order + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseProvider' + description: Paged list of providers. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve providers + x-openapi-router-controller: api.controllers.default_controller + /getSecurity: + get: + description: Returns security credentials/bindings for a given invoker. + operationId: helper_controller_get_security + parameters: + - description: Filter by invoker identifier. + explode: true + in: query + name: invoker_id + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseSecurity' + description: Paged list of security entries. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve security associations + x-openapi-router-controller: api.controllers.default_controller + /getServices: + get: + description: Returns published APIs/services exposed by providers. + operationId: helper_controller_get_services + parameters: + - description: Filter by service identifier. + explode: true + in: query + name: service_id + required: false + schema: + type: string + style: form + - description: Filter by APF identifier. + explode: true + in: query + name: apf_id + required: false + schema: + type: string + style: form + - description: Filter by API name. + explode: true + in: query + name: api_name + required: false + schema: + type: string + style: form + - description: Page size. + explode: true + in: query + name: page_size + required: false + schema: + default: 20 + minimum: 1 + type: integer + style: form + - description: Page index (0-based). + explode: true + in: query + name: page + required: false + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: Sort direction. + explode: true + in: query + name: sort_order + required: false + schema: + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedResponseService' + description: Paged list of services. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + summary: Retrieve services + x-openapi-router-controller: api.controllers.default_controller +components: + responses: + BadRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request. + InternalError: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error. + GenericError: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Generic error response. + schemas: + ErrorResponse: + description: Generic error payload. + example: + details: details + message: message + properties: + message: + title: message + type: string + details: + title: details + type: string + title: ErrorResponse + type: object + PaginatedResponseBase: + description: Common pagination envelope. + properties: + total: + description: Total number of resources in CAPIF. + example: 42 + title: total + type: integer + long: + description: Total number of resources that match the given parameters + example: 0 + title: long + type: integer + totalPages: + description: Total number of pages given page size. + example: 20 + title: totalPages + type: integer + sort_order: + description: Sorting by creation date of the resources (ascending or descending). + enum: + - asc + - desc + example: asc + title: sort_order + type: string + title: PaginatedResponseBase + type: object + PaginatedResponseInvoker: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + invokers: + description: CAPIF invokers list + items: + $ref: '#/components/schemas/APIInvokerEnrolmentDetails' + type: array + type: object + example: + total: 42 + totalPages: 20 + invokers: + - notificationDestination: notificationDestination + supportedFeatures: supportedFeatures + apiInvokerId: apiInvokerId + apiInvokerInformation: apiInvokerInformation + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + onboardingInformation: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + onboarding_date: 2000-01-23T04:56:07.000+00:00 + requestTestNotification: true + username: username + apiList: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - notificationDestination: notificationDestination + supportedFeatures: supportedFeatures + apiInvokerId: apiInvokerId + apiInvokerInformation: apiInvokerInformation + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + onboardingInformation: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + onboarding_date: 2000-01-23T04:56:07.000+00:00 + requestTestNotification: true + username: username + apiList: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + sort_order: asc + long: 0 + title: PaginatedResponseInvoker + PaginatedResponseProvider: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + providers: + description: CAPIF providers list + items: + $ref: '#/components/schemas/APIProviderEnrolmentDetails' + type: array + type: object + example: + total: 42 + totalPages: 20 + sort_order: asc + long: 0 + providers: + - regSec: regSec + apiProvFuncs: + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + failReason: failReason + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + apiProvDomId: apiProvDomId + apiProvDomInfo: apiProvDomInfo + onboarding_date: 2000-01-23T04:56:07.000+00:00 + suppFeat: suppFeat + username: username + - regSec: regSec + apiProvFuncs: + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + failReason: failReason + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + apiProvDomId: apiProvDomId + apiProvDomInfo: apiProvDomInfo + onboarding_date: 2000-01-23T04:56:07.000+00:00 + suppFeat: suppFeat + username: username + title: PaginatedResponseProvider + PaginatedResponseService: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + services: + description: CAPIF services list. + items: + $ref: '#/components/schemas/ServiceAPIDescription' + type: array + type: object + example: + total: 42 + totalPages: 20 + services: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + sort_order: asc + long: 0 + title: PaginatedResponseService + PaginatedResponseSecurity: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + security: + description: CAPIF security context list. + items: + $ref: '#/components/schemas/ServiceSecurity' + type: array + type: object + example: + total: 42 + security: + - notificationDestination: notificationDestination + api_invoker_id: api_invoker_id + supportedFeatures: supportedFeatures + securityInfo: + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + requestTestNotification: true + - notificationDestination: notificationDestination + api_invoker_id: api_invoker_id + supportedFeatures: supportedFeatures + securityInfo: + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + requestTestNotification: true + totalPages: 20 + sort_order: asc + long: 0 + title: PaginatedResponseSecurity + PaginatedResponseEvent: + allOf: + - $ref: '#/components/schemas/PaginatedResponseBase' + - properties: + events: + description: CAPIF events list. + items: + $ref: '#/components/schemas/EventSubscription' + type: array + type: object + example: + total: 42 + totalPages: 20 + sort_order: asc + long: 0 + events: + - notificationDestination: notificationDestination + eventFilters: + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + supportedFeatures: supportedFeatures + eventReq: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + - notificationDestination: notificationDestination + eventFilters: + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + supportedFeatures: supportedFeatures + eventReq: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + title: PaginatedResponseEvent + APIInvokerEnrolmentDetails: + description: Information about the API Invoker that requested to onboard + example: + notificationDestination: notificationDestination + supportedFeatures: supportedFeatures + apiInvokerId: apiInvokerId + apiInvokerInformation: apiInvokerInformation + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + onboardingInformation: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + onboarding_date: 2000-01-23T04:56:07.000+00:00 + requestTestNotification: true + username: username + apiList: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + onboarding_date: + description: Invoker onboarding date + format: date-time + title: onboarding_date + type: string + username: + description: User who registered the invoker + title: username + type: string + uuid: + description: uuid of the user who registered the invoker + format: uuid + title: uuid + type: string + apiInvokerId: + description: | + API invoker ID assigned by the CAPIF core function to the API invoker while on-boarding the API invoker. Shall not be present in the HTTP POST request from the API invoker to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + title: apiInvokerId + type: string + onboardingInformation: + $ref: '#/components/schemas/OnboardingInformation' + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + requestTestNotification: + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + title: requestTestNotification + type: boolean + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + apiList: + $ref: '#/components/schemas/APIList' + apiInvokerInformation: + description: | + Generic information related to the API invoker such as details of the device or the application. + title: apiInvokerInformation + type: string + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - notificationDestination + - onboardingInformation + title: APIInvokerEnrolmentDetails + type: object + APIProviderEnrolmentDetails: + description: Represents an API provider domain's enrolment details. + example: + regSec: regSec + apiProvFuncs: + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + - apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + failReason: failReason + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + apiProvDomId: apiProvDomId + apiProvDomInfo: apiProvDomInfo + onboarding_date: 2000-01-23T04:56:07.000+00:00 + suppFeat: suppFeat + username: username + properties: + onboarding_date: + description: Provider onboarding date + format: date-time + title: onboarding_date + type: string + username: + description: User who registered the provider + title: username + type: string + uuid: + description: uuid of the user who registered the provider + format: uuid + title: uuid + type: string + apiProvDomId: + description: | + API provider domain ID assigned by the CAPIF core function to the API management function while registering the API provider domain. Shall not be present in the HTTP POST request from the API Management function to the CAPIF core function, to on-board itself. Shall be present in all other HTTP requests and responses. + readOnly: true + title: apiProvDomId + type: string + regSec: + description: | + Security information necessary for the CAPIF core function to validate the registration of the API provider domain. Shall be present in HTTP POST request from API management function to CAPIF core function for API provider domain registration. + title: regSec + type: string + apiProvFuncs: + description: | + A list of individual API provider domain functions details. When included by the API management function in the HTTP request message, it lists the API provider domain functions that the API management function intends to register/update in registration or update registration procedure. When included by the CAPIF core function in the HTTP response message, it lists the API domain functions details that are registered or updated successfully. + items: + $ref: '#/components/schemas/APIProviderFunctionDetails' + minItems: 1 + title: apiProvFuncs + type: array + apiProvDomInfo: + description: | + Generic information related to the API provider domain such as details of the API provider applications. + title: apiProvDomInfo + type: string + suppFeat: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + failReason: + description: | + Registration or update specific failure information of failed API provider domain function registrations.Shall be present in the HTTP response body if atleast one of the API provider domain function registration or update registration fails. + title: failReason + type: string + required: + - regSec + title: APIProviderEnrolmentDetails + type: object + ServiceSecurity: + description: | + Represents the details of the security method for each service API interface. When included by the API invoker, it indicates the preferred method of security. When included by the CAPIF core function, it indicates the security method to be used for the service API interface. + example: + notificationDestination: notificationDestination + api_invoker_id: api_invoker_id + supportedFeatures: supportedFeatures + securityInfo: + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + - selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + requestTestNotification: true + properties: + api_invoker_id: + description: Id of the invoker of this security context. + title: api_invoker_id + type: string + securityInfo: + items: + $ref: '#/components/schemas/SecurityInformation' + minimum: 1 + title: securityInfo + type: array + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + requestTestNotification: + description: | + Set to true by API invoker to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + title: requestTestNotification + type: boolean + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - notificationDestination + - securityInfo + title: ServiceSecurity + type: object + SecurityInformation: + description: Represents the interface details and the security method. + example: + selSecurityMethod: null + authenticationInfo: authenticationInfo + authorizationInfo: authorizationInfo + interfaceDetails: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + prefSecurityMethods: + - PSK + - PSK + aefId: aefId + apiId: apiId + nullable: true + oneOf: [] + properties: + interfaceDetails: + $ref: '#/components/schemas/InterfaceDescription' + aefId: + description: Identifier of the API exposing function + title: aefId + type: string + apiId: + description: API identifier + title: apiId + type: string + prefSecurityMethods: + description: Security methods preferred by the API invoker for the API interface. + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: prefSecurityMethods + type: array + selSecurityMethod: + $ref: '#/components/schemas/SecurityMethod' + authenticationInfo: + description: Authentication related information + title: authenticationInfo + type: string + authorizationInfo: + description: Authorization related information + title: authorizationInfo + type: string + required: + - prefSecurityMethods + title: SecurityInformation + type: object + EventSubscription: + description: Represents an individual CAPIF Event Subscription resource. + example: + notificationDestination: notificationDestination + eventFilters: + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + - aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + supportedFeatures: supportedFeatures + eventReq: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + websockNotifConfig: + requestWebsocketUri: true + websocketUri: websocketUri + events: + - SERVICE_API_AVAILABLE + - SERVICE_API_AVAILABLE + requestTestNotification: true + properties: + events: + description: Subscribed events + items: + $ref: '#/components/schemas/CAPIFEvent' + minItems: 1 + title: events + type: array + eventFilters: + description: Subscribed event filters + items: + $ref: '#/components/schemas/CAPIFEventFilter' + minItems: 1 + title: eventFilters + type: array + eventReq: + $ref: '#/components/schemas/ReportingInformation' + notificationDestination: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + requestTestNotification: + description: | + Set to true by Subscriber to request the CAPIF core function to send a test notification as defined in in clause 7.6. Set to false or omitted otherwise. + title: requestTestNotification + type: boolean + websockNotifConfig: + $ref: '#/components/schemas/WebsockNotifConfig' + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + required: + - events + - notificationDestination + title: EventSubscription + type: object + OnboardingInformation: + description: Represents on-boarding information of the API invoker. + example: + apiInvokerPublicKey: apiInvokerPublicKey + onboardingSecret: onboardingSecret + apiInvokerCertificate: apiInvokerCertificate + properties: + apiInvokerPublicKey: + description: The API Invoker's public key + title: apiInvokerPublicKey + type: string + apiInvokerCertificate: + description: | + The API Invoker's generic client certificate, provided by the CAPIF core function. + title: apiInvokerCertificate + type: string + onboardingSecret: + description: | + The API Invoker's onboarding secret, provided by the CAPIF core function. + title: onboardingSecret + type: string + required: + - apiInvokerPublicKey + title: OnboardingInformation + type: object + APIProviderFunctionDetails: + description: Represents API provider domain function's details. + example: + apiProvFuncId: apiProvFuncId + apiProvFuncInfo: apiProvFuncInfo + regInfo: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + apiProvFuncRole: AEF + properties: + apiProvFuncId: + description: | + API provider domain functionID assigned by the CAPIF core function to the API provider domain function while registering/updating the API provider domain. Shall not be present in the HTTP POST request from the API management function to the CAPIF core function, to register itself. Shall be present in all other HTTP requests and responses. + title: apiProvFuncId + type: string + regInfo: + $ref: '#/components/schemas/RegistrationInformation' + apiProvFuncRole: + $ref: '#/components/schemas/ApiProviderFuncRole' + apiProvFuncInfo: + description: | + Generic information related to the API provider domain function such as details of the API provider applications. + title: apiProvFuncInfo + type: string + required: + - apiProvFuncRole + - regInfo + title: APIProviderFunctionDetails + type: object + ApiProviderFuncRole: + anyOf: + - enum: + - AEF + - APF + - AMF + type: string + - description: | + This string provides forward-compatiblity with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - AEF: API provider function is API Exposing Function. + - APF: API provider function is API Publishing Function. + - AMF: API Provider function is API Management Function. + title: ApiProviderFuncRole + RegistrationInformation: + description: | + Represents registration information of an individual API provider domain function. + example: + apiProvCert: apiProvCert + apiProvPubKey: apiProvPubKey + properties: + apiProvPubKey: + description: Public Key of API Provider domain function. + title: apiProvPubKey + type: string + apiProvCert: + description: API provider domain function's client certificate + title: apiProvCert + type: string + required: + - apiProvPubKey + title: RegistrationInformation + type: object + APIList: + description: Represents a list of APIs. + example: + serviceAPIDescriptions: + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + - serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + serviceAPIDescriptions: + description: The list of service APIs that the API Invoker is allowed to + invoke. + items: + $ref: '#/components/schemas/ServiceAPIDescription' + minItems: 1 + title: serviceAPIDescriptions + type: array + title: APIList + type: object + Uri: + description: string providing an URI formatted according to IETF RFC 3986. + title: Uri + type: string + WebsockNotifConfig: + description: Represents the configuration information for the delivery of notifications + over Websockets. + example: + requestWebsocketUri: true + websocketUri: websocketUri + properties: + websocketUri: + description: string formatted according to IETF RFC 3986 identifying a referenced + resource. + title: Link + type: string + requestWebsocketUri: + description: Set by the SCS/AS to indicate that the Websocket delivery is + requested. + title: requestWebsocketUri + type: boolean + title: WebsockNotifConfig + type: object + Link: + description: string formatted according to IETF RFC 3986 identifying a referenced + resource. + title: Link + type: string + SupportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + ServiceAPIDescription: + description: Represents the description of a service API as published by the + APF. + example: + serviceAPICategory: serviceAPICategory + ccfId: ccfId + apiName: apiName + shareableInfo: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + supportedFeatures: supportedFeatures + description: description + apiSuppFeats: apiSuppFeats + apiId: apiId + aefProfiles: + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + pubApiPath: + ccfIds: + - ccfIds + - ccfIds + properties: + apiName: + description: "API name, it is set as {apiName} part of the URI structure\ + \ as defined in clause 5.2.4 of 3GPP TS 29.122." + title: apiName + type: string + apiId: + description: | + API identifier assigned by the CAPIF core function to the published service API. Shall not be present in the HTTP POST request from the API publishing function to the CAPIF core function. Shall be present in the HTTP POST response from the CAPIF core function to the API publishing function and in the HTTP GET response from the CAPIF core function to the API invoker (discovery API). + title: apiId + type: string + aefProfiles: + description: | + AEF profile information, which includes the exposed API details (e.g. protocol). + items: + $ref: '#/components/schemas/AefProfile' + minItems: 1 + title: aefProfiles + type: array + description: + description: Text description of the API + title: description + type: string + supportedFeatures: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + shareableInfo: + $ref: '#/components/schemas/ShareableInformation' + serviceAPICategory: + title: serviceAPICategory + type: string + apiSuppFeats: + description: | + A string used to indicate the features supported by an API that is used as defined in clause 6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in table 5.2.2-3. The most significant character representing the highest-numbered features shall appear first in the string, and the character representing features 1 to 4 shall appear last in the string. The list of features and their numbering (starting with 1) are defined separately for each API. If the string contains a lower number of characters than there are defined features for an API, all features that would be represented by characters that are not present in the string are not supported. + pattern: "^[A-Fa-f0-9]*$" + title: SupportedFeatures + type: string + pubApiPath: + $ref: '#/components/schemas/PublishedApiPath' + ccfId: + description: CAPIF core function identifier. + title: ccfId + type: string + required: + - apiName + title: ServiceAPIDescription + type: object + AefProfile: + description: Represents the AEF profile data. + example: + protocol: HTTP_1_1 + securityMethods: + - PSK + - PSK + versions: + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + - apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + dataFormat: JSON + domainName: domainName + aefLocation: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + aefId: aefId + interfaceDescriptions: + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + - ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + nullable: true + oneOf: [] + properties: + aefId: + description: Identifier of the API exposing function + title: aefId + type: string + versions: + description: API version + items: + $ref: '#/components/schemas/Version' + minItems: 1 + title: versions + type: array + protocol: + $ref: '#/components/schemas/Protocol' + dataFormat: + $ref: '#/components/schemas/DataFormat' + securityMethods: + description: Security methods supported by the AEF + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: securityMethods + type: array + domainName: + description: Domain to which API belongs to + title: domainName + type: string + interfaceDescriptions: + description: Interface details + items: + $ref: '#/components/schemas/InterfaceDescription' + minItems: 1 + title: interfaceDescriptions + type: array + aefLocation: + $ref: '#/components/schemas/AefLocation' + required: + - aefId + - versions + title: AefProfile + type: object + ShareableInformation: + description: | + Indicates whether the service API and/or the service API category can be shared to the list of CAPIF provider domains. + example: + capifProvDoms: + - capifProvDoms + - capifProvDoms + isShareable: true + properties: + isShareable: + description: | + Set to "true" indicates that the service API and/or the service API category can be shared to the list of CAPIF provider domain information. Otherwise set to "false". + title: isShareable + type: boolean + capifProvDoms: + description: | + List of CAPIF provider domains to which the service API information to be shared. + items: + type: string + minItems: 1 + title: capifProvDoms + type: array + required: + - isShareable + title: ShareableInformation + type: object + PublishedApiPath: + description: Represents the published API path within the same CAPIF provider + domain. + example: + ccfIds: + - ccfIds + - ccfIds + properties: + ccfIds: + description: A list of CCF identifiers where the service API is already + published. + items: + type: string + minItems: 1 + title: ccfIds + type: array + title: PublishedApiPath + type: object + Version: + description: Represents the API version information. + example: + apiVersion: apiVersion + resources: + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + - operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + custOperations: + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + - operations: + - null + - null + commType: null + description: description + custOpName: custOpName + expiry: 2000-01-23T04:56:07.000+00:00 + properties: + apiVersion: + description: API major version in URI (e.g. v1) + title: apiVersion + type: string + expiry: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + resources: + description: Resources supported by the API. + items: + $ref: '#/components/schemas/Resource' + minItems: 1 + title: resources + type: array + custOperations: + description: Custom operations without resource association. + items: + $ref: '#/components/schemas/CustomOperation' + minItems: 1 + title: custOperations + type: array + required: + - apiVersion + title: Version + type: object + Protocol: + anyOf: + - enum: + - HTTP_1_1 + - HTTP_2 + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - HTTP_1_1: HTTP version 1.1 + - HTTP_2: HTTP version 2 + title: Protocol + DataFormat: + anyOf: + - enum: + - JSON + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - JSON: JavaScript Object Notation + title: DataFormat + SecurityMethod: + anyOf: + - enum: + - PSK + - PKI + - OAUTH + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - PSK: Security method 1 (Using TLS-PSK) as described in 3GPP TS 33.122 + - PKI: Security method 2 (Using PKI) as described in 3GPP TS 33.122 + - OAUTH: Security method 3 (TLS with OAuth token) as described in 3GPP TS 33.122 + title: SecurityMethod + Resource: + description: Represents the API resource data. + example: + operations: + - GET + - GET + commType: REQUEST_RESPONSE + description: description + resourceName: resourceName + custOpName: custOpName + uri: uri + properties: + resourceName: + description: Resource name + title: resourceName + type: string + commType: + $ref: '#/components/schemas/CommunicationType' + uri: + description: | + Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122. + title: uri + type: string + custOpName: + description: | + it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122. + title: custOpName + type: string + operations: + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + description: + description: Text description of the API resource + title: description + type: string + required: + - commType + - resourceName + - uri + title: Resource + type: object + CustomOperation: + description: Represents the description of a custom operation. + example: + operations: + - null + - null + commType: null + description: description + custOpName: custOpName + properties: + commType: + $ref: '#/components/schemas/CommunicationType' + custOpName: + description: | + it is set as {custOpName} part of the URI structure for a custom operation without resource association as defined in clause 5.2.4 of 3GPP TS 29.122. + title: custOpName + type: string + operations: + description: | + Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP. + items: + $ref: '#/components/schemas/Operation' + minItems: 1 + title: operations + type: array + description: + description: Text description of the custom operation + title: description + type: string + required: + - commType + - custOpName + title: CustomOperation + type: object + CommunicationType: + anyOf: + - enum: + - REQUEST_RESPONSE + - SUBSCRIBE_NOTIFY + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - REQUEST_RESPONSE: The communication is of the type request-response + - SUBSCRIBE_NOTIFY: The communication is of the type subscribe-notify + title: CommunicationType + Operation: + anyOf: + - enum: + - GET + - POST + - PUT + - PATCH + - DELETE + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - GET: HTTP GET method + - POST: HTTP POST method + - PUT: HTTP PUT method + - PATCH: HTTP PATCH method + - DELETE: HTTP DELETE method + title: Operation + InterfaceDescription: + description: Represents the description of an API's interface. + example: + ipv6Addr: ipv6Addr + securityMethods: + - null + - null + port: 5248 + ipv4Addr: ipv4Addr + nullable: true + oneOf: [] + properties: + ipv4Addr: + description: string identifying a Ipv4 address formatted in the "dotted + decimal" notation as defined in IETF RFC 1166. + title: Ipv4Addr + type: string + ipv6Addr: + description: string identifying a Ipv6 address formatted according to clause + 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 + of IETF RFC 5952 shall not be used. + title: Ipv6Addr + type: string + port: + description: Unsigned integer with valid values between 0 and 65535. + maximum: 65535 + minimum: 0 + title: Port + type: integer + securityMethods: + description: | + Security methods supported by the interface, it take precedence over the security methods provided in AefProfile, for this specific interface. + items: + $ref: '#/components/schemas/SecurityMethod' + minItems: 1 + title: securityMethods + type: array + title: InterfaceDescription + type: object + Ipv4Addr: + description: string identifying a Ipv4 address formatted in the "dotted decimal" + notation as defined in IETF RFC 1166. + title: Ipv4Addr + type: string + Ipv6Addr: + description: string identifying a Ipv6 address formatted according to clause + 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of + IETF RFC 5952 shall not be used. + title: Ipv6Addr + type: string + Port: + description: Unsigned integer with valid values between 0 and 65535. + maximum: 65535 + minimum: 0 + title: Port + type: integer + AefLocation: + description: | + The location information (e.g. civic address, GPS coordinates, data center ID) where the AEF providing the service API is located. + example: + dcId: dcId + geoArea: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + civicAddr: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + properties: + civicAddr: + $ref: '#/components/schemas/CivicAddress' + geoArea: + $ref: '#/components/schemas/GeographicArea' + dcId: + description: | + Identifies the data center where the AEF providing the service API is located. + title: dcId + type: string + title: AefLocation + type: object + DateTime: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + CivicAddress: + description: Indicates a Civic address. + example: + POBOX: POBOX + usageRules: usageRules + country: country + PRD: PRD + PLC: PLC + HNO: HNO + PRM: PRM + HNS: HNS + FLR: FLR + A1: A1 + A2: A2 + A3: A3 + A4: A4 + STS: STS + A5: A5 + A6: A6 + RDSEC: RDSEC + providedBy: providedBy + LOC: LOC + UNIT: UNIT + SEAT: SEAT + POD: POD + RDBR: RDBR + method: method + LMK: LMK + POM: POM + ADDCODE: ADDCODE + RD: RD + PC: PC + PCN: PCN + NAM: NAM + BLD: BLD + ROOM: ROOM + RDSUBBR: RDSUBBR + properties: + country: + title: country + type: string + A1: + title: A1 + type: string + A2: + title: A2 + type: string + A3: + title: A3 + type: string + A4: + title: A4 + type: string + A5: + title: A5 + type: string + A6: + title: A6 + type: string + PRD: + title: PRD + type: string + POD: + title: POD + type: string + STS: + title: STS + type: string + HNO: + title: HNO + type: string + HNS: + title: HNS + type: string + LMK: + title: LMK + type: string + LOC: + title: LOC + type: string + NAM: + title: NAM + type: string + PC: + title: PC + type: string + BLD: + title: BLD + type: string + UNIT: + title: UNIT + type: string + FLR: + title: FLR + type: string + ROOM: + title: ROOM + type: string + PLC: + title: PLC + type: string + PCN: + title: PCN + type: string + POBOX: + title: POBOX + type: string + ADDCODE: + title: ADDCODE + type: string + SEAT: + title: SEAT + type: string + RD: + title: RD + type: string + RDSEC: + title: RDSEC + type: string + RDBR: + title: RDBR + type: string + RDSUBBR: + title: RDSUBBR + type: string + PRM: + title: PRM + type: string + POM: + title: POM + type: string + usageRules: + title: usageRules + type: string + method: + title: method + type: string + providedBy: + title: providedBy + type: string + title: CivicAddress + type: object + GeographicArea: + anyOf: + - $ref: '#/components/schemas/Point' + - $ref: '#/components/schemas/PointUncertaintyCircle' + - $ref: '#/components/schemas/PointUncertaintyEllipse' + - $ref: '#/components/schemas/Polygon' + - $ref: '#/components/schemas/PointAltitude' + - $ref: '#/components/schemas/PointAltitudeUncertainty' + - $ref: '#/components/schemas/EllipsoidArc' + description: Geographic area specified by different shape. + title: GeographicArea + Point: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + required: + - point + type: object + description: Ellipsoid Point. + example: + shape: POINT + point: + lon: 36.988422590534526 + lat: -63.615366350946985 + title: Point + GADShape: + description: Common base type for GAD shapes. + discriminator: + mapping: + POINT: '#/components/schemas/Point' + POINT_UNCERTAINTY_CIRCLE: '#/components/schemas/PointUncertaintyCircle' + POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/PointUncertaintyEllipse' + POLYGON: '#/components/schemas/Polygon' + POINT_ALTITUDE: '#/components/schemas/PointAltitude' + POINT_ALTITUDE_UNCERTAINTY: '#/components/schemas/PointAltitudeUncertainty' + ELLIPSOID_ARC: '#/components/schemas/EllipsoidArc' + LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE: '#/components/schemas/Local2dPointUncertaintyEllipse' + LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID: '#/components/schemas/Local3dPointUncertaintyEllipsoid' + propertyName: shape + properties: + shape: + $ref: '#/components/schemas/SupportedGADShapes' + required: + - shape + title: GADShape + type: object + GeographicalCoordinates: + description: Geographical coordinates. + example: + lon: 36.988422590534526 + lat: -63.615366350946985 + properties: + lon: + format: double + maximum: 180 + minimum: -180 + title: lon + type: number + lat: + format: double + maximum: 90 + minimum: -90 + title: lat + type: number + required: + - lat + - lon + title: GeographicalCoordinates + type: object + SupportedGADShapes: + anyOf: + - enum: + - POINT + - POINT_UNCERTAINTY_CIRCLE + - POINT_UNCERTAINTY_ELLIPSE + - POLYGON + - POINT_ALTITUDE + - POINT_ALTITUDE_UNCERTAINTY + - ELLIPSOID_ARC + - LOCAL_2D_POINT_UNCERTAINTY_ELLIPSE + - LOCAL_3D_POINT_UNCERTAINTY_ELLIPSOID + type: string + - type: string + description: Indicates supported GAD shapes. + title: SupportedGADShapes + PointUncertaintyCircle: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertainty: + $ref: '#/components/schemas/Uncertainty' + required: + - point + - uncertainty + type: object + description: Ellipsoid point with uncertainty circle. + title: PointUncertaintyCircle + Uncertainty: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + PointUncertaintyEllipse: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - point + - uncertaintyEllipse + type: object + description: Ellipsoid point with uncertainty ellipse. + title: PointUncertaintyEllipse + UncertaintyEllipse: + description: Ellipse with uncertainty. + properties: + semiMajor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + semiMinor: + description: Indicates value of uncertainty. + format: float + minimum: 0 + title: Uncertainty + type: number + orientationMajor: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + required: + - orientationMajor + - semiMajor + - semiMinor + title: UncertaintyEllipse + type: object + Confidence: + description: Indicates value of confidence. + maximum: 100 + minimum: 0 + type: integer + Orientation: + description: Indicates value of orientation angle. + maximum: 180 + minimum: 0 + title: Orientation + type: integer + Polygon: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + pointList: + $ref: '#/components/schemas/PointList' + required: + - pointList + type: object + description: Polygon. + title: Polygon + PointList: + description: List of points. + items: + $ref: '#/components/schemas/GeographicalCoordinates' + maxItems: 15 + minItems: 3 + type: array + PointAltitude: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + required: + - altitude + - point + type: object + description: Ellipsoid point with altitude. + title: PointAltitude + Altitude: + description: Indicates value of altitude. + format: double + maximum: 32767 + minimum: -32767 + type: number + PointAltitudeUncertainty: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + altitude: + $ref: '#/components/schemas/Altitude' + uncertaintyEllipse: + $ref: '#/components/schemas/UncertaintyEllipse' + uncertaintyAltitude: + $ref: '#/components/schemas/Uncertainty' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - altitude + - confidence + - point + - uncertaintyAltitude + - uncertaintyEllipse + type: object + description: Ellipsoid point with altitude and uncertainty ellipsoid. + title: PointAltitudeUncertainty + EllipsoidArc: + allOf: + - $ref: '#/components/schemas/GADShape' + - properties: + point: + $ref: '#/components/schemas/GeographicalCoordinates' + innerRadius: + $ref: '#/components/schemas/InnerRadius' + uncertaintyRadius: + $ref: '#/components/schemas/Uncertainty' + offsetAngle: + $ref: '#/components/schemas/Angle' + includedAngle: + $ref: '#/components/schemas/Angle' + confidence: + $ref: '#/components/schemas/Confidence' + required: + - confidence + - includedAngle + - innerRadius + - offsetAngle + - point + - uncertaintyRadius + type: object + description: Ellipsoid Arc. + title: EllipsoidArc + InnerRadius: + description: Indicates value of the inner radius. + format: int32 + maximum: 327675 + minimum: 0 + type: integer + Angle: + description: Indicates value of angle. + maximum: 360 + minimum: 0 + type: integer + CAPIFEvent: + anyOf: + - enum: + - SERVICE_API_AVAILABLE + - SERVICE_API_UNAVAILABLE + - SERVICE_API_UPDATE + - API_INVOKER_ONBOARDED + - API_INVOKER_OFFBOARDED + - SERVICE_API_INVOCATION_SUCCESS + - SERVICE_API_INVOCATION_FAILURE + - ACCESS_CONTROL_POLICY_UPDATE + - ACCESS_CONTROL_POLICY_UNAVAILABLE + - API_INVOKER_AUTHORIZATION_REVOKED + - API_INVOKER_UPDATED + - API_TOPOLOGY_HIDING_CREATED + - API_TOPOLOGY_HIDING_REVOKED + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - SERVICE_API_AVAILABLE: Events related to the availability of service APIs after the service APIs are published. + - SERVICE_API_UNAVAILABLE: Events related to the unavailability of service APIs after the service APIs are unpublished. + - SERVICE_API_UPDATE: Events related to change in service API information. + - API_INVOKER_ONBOARDED: Events related to API invoker onboarded to CAPIF. + - API_INVOKER_OFFBOARDED: Events related to API invoker offboarded from CAPIF. + - SERVICE_API_INVOCATION_SUCCESS: Events related to the successful invocation of service APIs. + - SERVICE_API_INVOCATION_FAILURE: Events related to the failed invocation of service APIs. + - ACCESS_CONTROL_POLICY_UPDATE: Events related to the update for the access control policy related to the service APIs. + - ACCESS_CONTROL_POLICY_UNAVAILABLE: Events related to the unavailability of the access control policy related to the service APIs. + - API_INVOKER_AUTHORIZATION_REVOKED: Events related to the revocation of the authorization of API invokers to access the service APIs. + - API_INVOKER_UPDATED: Events related to API invoker profile updated to CAPIF. + - API_TOPOLOGY_HIDING_CREATED: Events related to the creation or update of the API topology hiding information of the service APIs after the service APIs are published. + - API_TOPOLOGY_HIDING_REVOKED: Events related to the revocation of the API topology hiding information of the service APIs after the service APIs are unpublished. + title: CAPIFEvent + CAPIFEventFilter: + description: Represents a CAPIF event filter. + example: + aefIds: + - aefIds + - aefIds + apiInvokerIds: + - apiInvokerIds + - apiInvokerIds + apiIds: + - apiIds + - apiIds + properties: + apiIds: + description: Identifier of the service API + items: + type: string + minItems: 1 + title: apiIds + type: array + apiInvokerIds: + description: Identity of the API invoker + items: + type: string + minItems: 1 + title: apiInvokerIds + type: array + aefIds: + description: Identifier of the API exposing function + items: + type: string + minItems: 1 + title: aefIds + type: array + title: CAPIFEventFilter + type: object + ReportingInformation: + description: Represents the type of reporting that the subscription requires. + example: + notifMethod: PERIODIC + partitionCriteria: + - TAC + - TAC + grpRepTime: 5 + notifFlag: ACTIVATE + monDur: 2000-01-23T04:56:07.000+00:00 + immRep: true + maxReportNbr: 0 + repPeriod: 6 + sampRatio: 15 + properties: + immRep: + title: immRep + type: boolean + notifMethod: + $ref: '#/components/schemas/NotificationMethod' + maxReportNbr: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are\ + \ permissible." + minimum: 0 + title: Uinteger + type: integer + monDur: + description: string with format "date-time" as defined in OpenAPI. + format: date-time + title: DateTime + type: string + repPeriod: + description: indicating a time in seconds. + title: DurationSec + type: integer + sampRatio: + description: "Unsigned integer indicating Sampling Ratio (see clauses 4.15.1\ + \ of 3GPP TS 23.502), expressed in percent. \n" + maximum: 100 + minimum: 1 + title: SamplingRatio + type: integer + partitionCriteria: + description: Criteria for partitioning the UEs before applying the sampling + ratio. + items: + $ref: '#/components/schemas/PartitioningCriteria' + minItems: 1 + title: partitionCriteria + type: array + grpRepTime: + description: indicating a time in seconds. + title: DurationSec + type: integer + notifFlag: + $ref: '#/components/schemas/NotificationFlag' + title: ReportingInformation + type: object + NotificationMethod: + anyOf: + - enum: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - PERIODIC + - ONE_TIME + - ON_EVENT_DETECTION + title: NotificationMethod + Uinteger: + description: "Unsigned Integer, i.e. only value 0 and integers above 0 are permissible." + minimum: 0 + title: Uinteger + type: integer + DurationSec: + description: indicating a time in seconds. + title: DurationSec + type: integer + SamplingRatio: + description: "Unsigned integer indicating Sampling Ratio (see clauses 4.15.1\ + \ of 3GPP TS 23.502), expressed in percent. \n" + maximum: 100 + minimum: 1 + title: SamplingRatio + type: integer + PartitioningCriteria: + anyOf: + - enum: + - TAC + - SUBPLMN + - GEOAREA + - SNSSAI + - DNN + type: string + - description: | + This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API. + type: string + description: | + Possible values are: + - "TAC": Type Allocation Code + - "SUBPLMN": Subscriber PLMN ID + - "GEOAREA": Geographical area, i.e. list(s) of TAI(s) + - "SNSSAI": S-NSSAI + - "DNN": DNN + title: PartitioningCriteria + NotificationFlag: + anyOf: + - enum: + - ACTIVATE + - DEACTIVATE + - RETRIEVAL + type: string + - description: "This string provides forward-compatibility with future extensions\ + \ to the enumeration but is not used to encode content defined in the present\ + \ version of this API. \n" + type: string + description: |- + Possible values are: + - ACTIVATE: The event notification is activated. + - DEACTIVATE: The event notification is deactivated and shall be muted. The available + event(s) shall be stored. + - RETRIEVAL: The event notification shall be sent to the NF service consumer(s), + after that, is muted again. + title: NotificationFlag diff --git a/services/helper/helper_service/services/api/typing_utils.py b/services/helper/helper_service/services/api/typing_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..74e3c913a7db6246bc765f147ca872996112c6bb --- /dev/null +++ b/services/helper/helper_service/services/api/typing_utils.py @@ -0,0 +1,30 @@ +import sys + +if sys.version_info < (3, 7): + import typing + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return type(klass) == typing.GenericMeta + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__extra__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__extra__ == list + +else: + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return hasattr(klass, '__origin__') + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__origin__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__origin__ == list diff --git a/services/helper/helper_service/services/api/util.py b/services/helper/helper_service/services/api/util.py new file mode 100644 index 0000000000000000000000000000000000000000..c05d0ed0cc8d345e18f7ee14c22b116a074dd1b5 --- /dev/null +++ b/services/helper/helper_service/services/api/util.py @@ -0,0 +1,147 @@ +import datetime + +import typing +from api import typing_utils + + +def _deserialize(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 klass in (int, float, str, bool, bytearray): + return _deserialize_primitive(data, klass) + elif klass == object: + return _deserialize_object(data) + elif klass == datetime.date: + return deserialize_date(data) + elif klass == datetime.datetime: + return deserialize_datetime(data) + elif typing_utils.is_generic(klass): + if typing_utils.is_list(klass): + return _deserialize_list(data, klass.__args__[0]) + if typing_utils.is_dict(klass): + return _deserialize_dict(data, klass.__args__[1]) + else: + return deserialize_model(data, klass) + + +def _deserialize_primitive(data, klass): + """Deserializes to primitive type. + + :param data: data to deserialize. + :param klass: class literal. + + :return: int, long, float, str, bool. + :rtype: int | long | float | str | bool + """ + try: + value = klass(data) + except UnicodeEncodeError: + value = data + except TypeError: + value = data + return value + + +def _deserialize_object(value): + """Return an original value. + + :return: object. + """ + return value + + +def deserialize_date(string): + """Deserializes string to date. + + :param string: str. + :type string: str + :return: date. + :rtype: date + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + + +def deserialize_datetime(string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :type string: str + :return: datetime. + :rtype: datetime + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + + +def deserialize_model(data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :type data: dict | list + :param klass: class literal. + :return: model object. + """ + instance = klass() + + if not instance.openapi_types: + return data + + for attr, attr_type in instance.openapi_types.items(): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, _deserialize(value, attr_type)) + + return instance + + +def _deserialize_list(data, boxed_type): + """Deserializes a list and its elements. + + :param data: list to deserialize. + :type data: list + :param boxed_type: class literal. + + :return: deserialized list. + :rtype: list + """ + return [_deserialize(sub_data, boxed_type) + for sub_data in data] + + +def _deserialize_dict(data, boxed_type): + """Deserializes a dict and its elements. + + :param data: dict to deserialize. + :type data: dict + :param boxed_type: class literal. + + :return: deserialized dict. + :rtype: dict + """ + return {k: _deserialize(v, boxed_type) + for k, v in data.items() } diff --git a/services/helper/helper_service/services/configuration/__init__.py b/services/helper/helper_service/services/configuration/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/helper/helper_service/services/configuration/__main__.py b/services/helper/helper_service/services/configuration/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..30956708391aac8de2597d43283a63185baa8ed6 --- /dev/null +++ b/services/helper/helper_service/services/configuration/__main__.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import connexion + +from configuration import encoder + + +def main(): + app = connexion.App(__name__, specification_dir='./openapi/') + app.app.json_encoder = encoder.JSONEncoder + app.add_api('openapi.yaml', + arguments={'title': 'Helper Configuration API'}, + pythonic_params=True) + + app.run(port=8080) + + +if __name__ == '__main__': + main() diff --git a/services/helper/helper_service/services/configuration/controllers/__init__.py b/services/helper/helper_service/services/configuration/controllers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/services/helper/helper_service/services/configuration/controllers/default_controller.py b/services/helper/helper_service/services/configuration/controllers/default_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..100bedac8d3300daa4dce46c0b8b92e3f0a7a8d0 --- /dev/null +++ b/services/helper/helper_service/services/configuration/controllers/default_controller.py @@ -0,0 +1,123 @@ +import connexion +from typing import Dict +from typing import Tuple +from typing import Union + +from configuration.models.capif_configuration import CapifConfiguration # noqa: E501 +from configuration.models.config_category_create_request import ConfigCategoryCreateRequest # noqa: E501 +from configuration.models.config_param_update_request import ConfigParamUpdateRequest # noqa: E501 +from configuration.models.generic_error import GenericError # noqa: E501 +from configuration import util + +from ..core.configuration_operations import ConfigurationOperations + +config_operations = ConfigurationOperations() + +def configuration_controller_get_configuration(): # noqa: E501 + """Read full configuration + + Returns the entire CAPIF configuration document. # noqa: E501 + + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + return config_operations.get_configuration() + + +def dynamic_config_controller_add_new_config_setting(body): # noqa: E501 + """Add new config setting at path + + Adds a new key/value inside an existing category using \"param_path\" and \"new_value\". # noqa: E501 + + :param config_param_update_request: + :type config_param_update_request: dict | bytes + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + config_param_update_request = body + if connexion.request.is_json: + config_param_update_request = ConfigParamUpdateRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return config_operations.add_new_config_setting( + config_param_update_request.param_path, + config_param_update_request.new_value + ) + + +def dynamic_config_controller_add_new_configuration(body): # noqa: E501 + """Add new configuration category + + Adds a brand new top-level category. # noqa: E501 + + :param config_category_create_request: + :type config_category_create_request: dict | bytes + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + config_category_create_request = body + if connexion.request.is_json: + config_category_create_request = ConfigCategoryCreateRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return config_operations.add_new_configuration( + config_category_create_request.category_name, + config_category_create_request.category_values + ) + + +def dynamic_config_controller_remove_config_category(config_path): # noqa: E501 + """Remove configuration category + + Deletes an entire top-level category by name. # noqa: E501 + + :param config_path: Configuration path to remove + :type config_path: str + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + return config_operations.remove_config_category(config_path) + + +def dynamic_config_controller_remove_config_param(param_path): # noqa: E501 + """Remove config parameter + + Deletes a leaf parameter by dotted path. # noqa: E501 + + :param param_path: Parameter path to remove + :type param_path: str + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + return config_operations.remove_config_param(param_path) + + +def dynamic_config_controller_replace_configuration(body): # noqa: E501 + """Replace entire configuration + + Replaces the configuration document with a new one. # noqa: E501 + + :param capif_configuration: + :type capif_configuration: dict | bytes + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + capif_configuration = body + if connexion.request.is_json: + capif_configuration = CapifConfiguration.from_dict(connexion.request.get_json()) # noqa: E501 + return config_operations.replace_configuration(capif_configuration.to_dict()) + + +def dynamic_config_controller_update_config_param(body): # noqa: E501 + """Update single config parameter + + Updates a single setting inside the configuration using a dotted path selector. # noqa: E501 + + :param config_param_update_request: + :type config_param_update_request: dict | bytes + + :rtype: Union[CapifConfiguration, Tuple[CapifConfiguration, int], Tuple[CapifConfiguration, int, Dict[str, str]] + """ + config_param_update_request = body + if connexion.request.is_json: + config_param_update_request = ConfigParamUpdateRequest.from_dict(connexion.request.get_json()) # noqa: E501 + return config_operations.update_config_param( + config_param_update_request.param_path, + config_param_update_request.new_value + ) diff --git a/services/helper/helper_service/services/configuration/controllers/security_controller.py b/services/helper/helper_service/services/configuration/controllers/security_controller.py new file mode 100644 index 0000000000000000000000000000000000000000..6d294ffd6df1a26a469dbb4e72533b01503468dd --- /dev/null +++ b/services/helper/helper_service/services/configuration/controllers/security_controller.py @@ -0,0 +1,2 @@ +from typing import List + diff --git a/services/helper/helper_service/services/configuration/core/configuration_operations.py b/services/helper/helper_service/services/configuration/core/configuration_operations.py new file mode 100644 index 0000000000000000000000000000000000000000..49a3e4abdcf13736851c535773f57719c3b31d6c --- /dev/null +++ b/services/helper/helper_service/services/configuration/core/configuration_operations.py @@ -0,0 +1,181 @@ +import os + +import pymongo +import requests +from config import Config +from db.db import get_mongo +from flask import current_app, jsonify +from utils.utils import ( + convert_dict_keys_to_snake_case, + convert_nested_values, + convert_value_to_original_type, + get_nested_value, + to_snake_case, + validate_snake_case_keys +) + +class ConfigurationOperations: + + PROTECTED_FIELDS = ["ccf_id"] + + def __init__(self): + self.db = get_mongo() + self.mimetype = 'application/json' + self.config = Config().get_config() + + def get_configuration(self): + """Get all current settings.""" + current_app.logger.debug("Retrieving current CAPIF configuration") + config_col = self.db.get_col_by_name(self.db.capif_configuration) + config = config_col.find_one({}, {"_id": 0}) + + if not config: + return jsonify(message="No CAPIF configuration found"), 404 + + return jsonify(config), 200 + + def update_config_param(self, param_path, new_value): + """ + Updates a single parameter in the configuration. + param_path: Path of the parameter (e.g., settings.acl_policy_settings.allowed_total_invocations) + """ + current_app.logger.debug(f"Updating configuration parameter: {param_path} with value: {new_value}") + + # Protect immutable fields + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be modified"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + existing_config = config_col.find_one({}, {"_id": 0}) + current_value = get_nested_value(existing_config, param_path) + + if current_value is None: + return jsonify(message=f"The parameter '{param_path}' does not exist in the configuration"), 404 + + converted_value = convert_value_to_original_type(new_value, current_value) + + if isinstance(converted_value, tuple): + return converted_value + + update_query = {"$set": {param_path: converted_value}} + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or parameter '{param_path}' not updated"), 404 + + return jsonify(message=f"Parameter '{param_path}' updated successfully"), 200 + + + def replace_configuration(self, new_config): + current_app.logger.debug("Replacing entire CAPIF configuration") + + error_response = validate_snake_case_keys(new_config) + if error_response: + return error_response + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + existing_config = config_col.find_one({}, {"_id": 0}) + + if not existing_config: + return jsonify(message="No existing configuration found"), 404 + + # Preserve protected fields + for field in self.PROTECTED_FIELDS: + if field in existing_config: + new_config[field] = existing_config[field] + + new_config = convert_nested_values(new_config, existing_config) + result = config_col.replace_one({}, new_config, upsert=True) + + return jsonify(message="Configuration replaced successfully (protected fields preserved)"), 200 + + + def add_new_configuration(self, category_name, category_values): + """ + Add a new category of parameters in 'settings'. + """ + current_app.logger.debug(f"Adding new category: {category_name} with values: {category_values}") + + # Block protected field creation + if category_name in self.PROTECTED_FIELDS: + return jsonify(message=f"The category '{category_name}' is immutable and cannot be modified"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + category_name_snake = to_snake_case(category_name) + category_values_snake = convert_dict_keys_to_snake_case(category_values) + + update_query = {"$set": {f"settings.{category_name_snake}": category_values_snake}} + + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or category '{category_name_snake}' not added"), 404 + + return jsonify(message=f"Category '{category_name_snake}' added successfully"), 200 + + + def add_new_config_setting(self, param_path, new_value): + """Add a new parameter in 'settings'.""" + current_app.logger.debug(f"Adding new configuration setting: {param_path} with value: {new_value}") + + # Block protected field creation + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be added or modified"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) + + update_query = {"$set": {f"settings.{param_path_snake}": new_value}} + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not updated"), 404 + + return jsonify(message=f"Parameter '{param_path_snake}' added successfully"), 200 + + + def remove_config_param(self, param_path): + """Removes a specific parameter inside 'settings'.""" + current_app.logger.debug(f"Removing configuration parameter: {param_path}") + + # Prevent deletion of protected fields + if any(param_path.startswith(field) for field in self.PROTECTED_FIELDS): + return jsonify(message=f"The parameter '{param_path}' is immutable and cannot be removed"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + param_path_snake = ".".join(to_snake_case(part) for part in param_path.split(".")) + + update_query = {"$unset": {f"settings.{param_path_snake}": ""}} + + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or parameter '{param_path_snake}' not removed"), 404 + + return jsonify(message=f"Parameter '{param_path_snake}' removed successfully"), 200 + + + def remove_config_category(self, category_name): + """Removes an entire category inside 'settings'.""" + current_app.logger.debug(f"Removing configuration category: {category_name}") + + # Prevent deletion of protected fields + if category_name in self.PROTECTED_FIELDS: + return jsonify(message=f"The category '{category_name}' is immutable and cannot be removed"), 403 + + config_col = self.db.get_col_by_name(self.db.capif_configuration) + + category_name_snake = to_snake_case(category_name) + + update_query = {"$unset": {f"settings.{category_name_snake}": ""}} + + result = config_col.update_one({}, update_query) + + if result.modified_count == 0: + return jsonify(message=f"No configuration found or category '{category_name_snake}' not removed"), 404 + + return jsonify(message=f"Category '{category_name_snake}' removed successfully"), 200 \ No newline at end of file diff --git a/services/helper/helper_service/services/configuration/encoder.py b/services/helper/helper_service/services/configuration/encoder.py new file mode 100644 index 0000000000000000000000000000000000000000..27e1d86ac6462393735fb2e4905d5c5b95a572b2 --- /dev/null +++ b/services/helper/helper_service/services/configuration/encoder.py @@ -0,0 +1,19 @@ +from connexion.apps.flask_app import FlaskJSONEncoder + +from configuration.models.base_model import Model + + +class JSONEncoder(FlaskJSONEncoder): + include_nulls = False + + def default(self, o): + if isinstance(o, Model): + dikt = {} + for attr in o.openapi_types: + value = getattr(o, attr) + if value is None and not self.include_nulls: + continue + attr = o.attribute_map[attr] + dikt[attr] = value + return dikt + return FlaskJSONEncoder.default(self, o) diff --git a/services/helper/helper_service/services/configuration/models/__init__.py b/services/helper/helper_service/services/configuration/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..951c845bb4974335ebc4e689bf2bf41ebcab1eed --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/__init__.py @@ -0,0 +1,10 @@ +# flake8: noqa +# import models into model package +from configuration.models.capif_configuration import CapifConfiguration +from configuration.models.config_category_create_request import ConfigCategoryCreateRequest +from configuration.models.config_param_update_request import ConfigParamUpdateRequest +from configuration.models.generic_error import GenericError +from configuration.models.settings import Settings +from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings +from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry +from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority diff --git a/services/helper/helper_service/services/configuration/models/base_model.py b/services/helper/helper_service/services/configuration/models/base_model.py new file mode 100644 index 0000000000000000000000000000000000000000..aa9250b37d1f88ddf988137320ca7cba903b38dc --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/base_model.py @@ -0,0 +1,68 @@ +import pprint + +import typing + +from configuration import util + +T = typing.TypeVar('T') + + +class Model: + # openapiTypes: The key is attribute name and the + # value is attribute type. + openapi_types: typing.Dict[str, type] = {} + + # attributeMap: The key is attribute name and the + # value is json key in definition. + attribute_map: typing.Dict[str, str] = {} + + @classmethod + def from_dict(cls: typing.Type[T], dikt) -> T: + """Returns the dict as a model""" + return util.deserialize_model(dikt, cls) + + def to_dict(self): + """Returns the model properties as a dict + + :rtype: dict + """ + result = {} + + for attr in self.openapi_types: + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model + + :rtype: str + """ + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/services/helper/helper_service/services/configuration/models/capif_configuration.py b/services/helper/helper_service/services/configuration/models/capif_configuration.py new file mode 100644 index 0000000000000000000000000000000000000000..e51aa812c16c51c3c550b4ec5a13058dad26a009 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/capif_configuration.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration.models.settings import Settings +from configuration import util + +from configuration.models.settings import Settings # noqa: E501 + +class CapifConfiguration(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, config_name=None, version=None, settings=None): # noqa: E501 + """CapifConfiguration - a model defined in OpenAPI + + :param config_name: The config_name of this CapifConfiguration. # noqa: E501 + :type config_name: str + :param version: The version of this CapifConfiguration. # noqa: E501 + :type version: str + :param settings: The settings of this CapifConfiguration. # noqa: E501 + :type settings: List[Settings] + """ + self.openapi_types = { + 'config_name': str, + 'version': str, + 'settings': List[Settings] + } + + self.attribute_map = { + 'config_name': 'config_name', + 'version': 'version', + 'settings': 'settings' + } + + self._config_name = config_name + self._version = version + self._settings = settings + + @classmethod + def from_dict(cls, dikt) -> 'CapifConfiguration': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CapifConfiguration of this CapifConfiguration. # noqa: E501 + :rtype: CapifConfiguration + """ + return util.deserialize_model(dikt, cls) + + @property + def config_name(self) -> str: + """Gets the config_name of this CapifConfiguration. + + Configuration name # noqa: E501 + + :return: The config_name of this CapifConfiguration. + :rtype: str + """ + return self._config_name + + @config_name.setter + def config_name(self, config_name: str): + """Sets the config_name of this CapifConfiguration. + + Configuration name # noqa: E501 + + :param config_name: The config_name of this CapifConfiguration. + :type config_name: str + """ + + self._config_name = config_name + + @property + def version(self) -> str: + """Gets the version of this CapifConfiguration. + + configuration version # noqa: E501 + + :return: The version of this CapifConfiguration. + :rtype: str + """ + return self._version + + @version.setter + def version(self, version: str): + """Sets the version of this CapifConfiguration. + + configuration version # noqa: E501 + + :param version: The version of this CapifConfiguration. + :type version: str + """ + + self._version = version + + @property + def settings(self) -> List[Settings]: + """Gets the settings of this CapifConfiguration. + + + :return: The settings of this CapifConfiguration. + :rtype: List[Settings] + """ + return self._settings + + @settings.setter + def settings(self, settings: List[Settings]): + """Sets the settings of this CapifConfiguration. + + + :param settings: The settings of this CapifConfiguration. + :type settings: List[Settings] + """ + + self._settings = settings diff --git a/services/helper/helper_service/services/configuration/models/config_category_create_request.py b/services/helper/helper_service/services/configuration/models/config_category_create_request.py new file mode 100644 index 0000000000000000000000000000000000000000..305c43f1706efdc22461acabbda4a93355aaa02e --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/config_category_create_request.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class ConfigCategoryCreateRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, category_name=None, category_values=None): # noqa: E501 + """ConfigCategoryCreateRequest - a model defined in OpenAPI + + :param category_name: The category_name of this ConfigCategoryCreateRequest. # noqa: E501 + :type category_name: str + :param category_values: The category_values of this ConfigCategoryCreateRequest. # noqa: E501 + :type category_values: Dict[str, object] + """ + self.openapi_types = { + 'category_name': str, + 'category_values': Dict[str, object] + } + + self.attribute_map = { + 'category_name': 'category_name', + 'category_values': 'category_values' + } + + self._category_name = category_name + self._category_values = category_values + + @classmethod + def from_dict(cls, dikt) -> 'ConfigCategoryCreateRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ConfigCategoryCreateRequest of this ConfigCategoryCreateRequest. # noqa: E501 + :rtype: ConfigCategoryCreateRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def category_name(self) -> str: + """Gets the category_name of this ConfigCategoryCreateRequest. + + Name of the new configuration category. # noqa: E501 + + :return: The category_name of this ConfigCategoryCreateRequest. + :rtype: str + """ + return self._category_name + + @category_name.setter + def category_name(self, category_name: str): + """Sets the category_name of this ConfigCategoryCreateRequest. + + Name of the new configuration category. # noqa: E501 + + :param category_name: The category_name of this ConfigCategoryCreateRequest. + :type category_name: str + """ + if category_name is None: + raise ValueError("Invalid value for `category_name`, must not be `None`") # noqa: E501 + + self._category_name = category_name + + @property + def category_values(self) -> Dict[str, object]: + """Gets the category_values of this ConfigCategoryCreateRequest. + + Key/value pairs that compose the new category. # noqa: E501 + + :return: The category_values of this ConfigCategoryCreateRequest. + :rtype: Dict[str, object] + """ + return self._category_values + + @category_values.setter + def category_values(self, category_values: Dict[str, object]): + """Sets the category_values of this ConfigCategoryCreateRequest. + + Key/value pairs that compose the new category. # noqa: E501 + + :param category_values: The category_values of this ConfigCategoryCreateRequest. + :type category_values: Dict[str, object] + """ + if category_values is None: + raise ValueError("Invalid value for `category_values`, must not be `None`") # noqa: E501 + + self._category_values = category_values diff --git a/services/helper/helper_service/services/configuration/models/config_param_update_request.py b/services/helper/helper_service/services/configuration/models/config_param_update_request.py new file mode 100644 index 0000000000000000000000000000000000000000..6d608e78a21c2c6c149ccd992131d2a2ca8944e0 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/config_param_update_request.py @@ -0,0 +1,95 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class ConfigParamUpdateRequest(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, param_path=None, new_value=None): # noqa: E501 + """ConfigParamUpdateRequest - a model defined in OpenAPI + + :param param_path: The param_path of this ConfigParamUpdateRequest. # noqa: E501 + :type param_path: str + :param new_value: The new_value of this ConfigParamUpdateRequest. # noqa: E501 + :type new_value: object + """ + self.openapi_types = { + 'param_path': str, + 'new_value': object + } + + self.attribute_map = { + 'param_path': 'param_path', + 'new_value': 'new_value' + } + + self._param_path = param_path + self._new_value = new_value + + @classmethod + def from_dict(cls, dikt) -> 'ConfigParamUpdateRequest': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The ConfigParamUpdateRequest of this ConfigParamUpdateRequest. # noqa: E501 + :rtype: ConfigParamUpdateRequest + """ + return util.deserialize_model(dikt, cls) + + @property + def param_path(self) -> str: + """Gets the param_path of this ConfigParamUpdateRequest. + + Dotted path to the configuration value to update. # noqa: E501 + + :return: The param_path of this ConfigParamUpdateRequest. + :rtype: str + """ + return self._param_path + + @param_path.setter + def param_path(self, param_path: str): + """Sets the param_path of this ConfigParamUpdateRequest. + + Dotted path to the configuration value to update. # noqa: E501 + + :param param_path: The param_path of this ConfigParamUpdateRequest. + :type param_path: str + """ + if param_path is None: + raise ValueError("Invalid value for `param_path`, must not be `None`") # noqa: E501 + + self._param_path = param_path + + @property + def new_value(self) -> object: + """Gets the new_value of this ConfigParamUpdateRequest. + + New value for the configuration parameter. # noqa: E501 + + :return: The new_value of this ConfigParamUpdateRequest. + :rtype: object + """ + return self._new_value + + @new_value.setter + def new_value(self, new_value: object): + """Sets the new_value of this ConfigParamUpdateRequest. + + New value for the configuration parameter. # noqa: E501 + + :param new_value: The new_value of this ConfigParamUpdateRequest. + :type new_value: object + """ + if new_value is None: + raise ValueError("Invalid value for `new_value`, must not be `None`") # noqa: E501 + + self._new_value = new_value diff --git a/services/helper/helper_service/services/configuration/models/generic_error.py b/services/helper/helper_service/services/configuration/models/generic_error.py new file mode 100644 index 0000000000000000000000000000000000000000..506bc0f35d131c8195d642a2ea5b5a9566857d6b --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/generic_error.py @@ -0,0 +1,91 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class GenericError(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, code=None, message=None): # noqa: E501 + """GenericError - a model defined in OpenAPI + + :param code: The code of this GenericError. # noqa: E501 + :type code: str + :param message: The message of this GenericError. # noqa: E501 + :type message: str + """ + self.openapi_types = { + 'code': str, + 'message': str + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message' + } + + self._code = code + self._message = message + + @classmethod + def from_dict(cls, dikt) -> 'GenericError': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The GenericError of this GenericError. # noqa: E501 + :rtype: GenericError + """ + return util.deserialize_model(dikt, cls) + + @property + def code(self) -> str: + """Gets the code of this GenericError. + + + :return: The code of this GenericError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code: str): + """Sets the code of this GenericError. + + + :param code: The code of this GenericError. + :type code: str + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def message(self) -> str: + """Gets the message of this GenericError. + + + :return: The message of this GenericError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message: str): + """Sets the message of this GenericError. + + + :param message: The message of this GenericError. + :type message: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message diff --git a/services/helper/helper_service/services/configuration/models/settings.py b/services/helper/helper_service/services/configuration/models/settings.py new file mode 100644 index 0000000000000000000000000000000000000000..c658eae495adda56cbba99137d5e4b67590f292e --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings +from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry +from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority +from configuration import util + +from configuration.models.settings_acl_policy_settings import SettingsAclPolicySettings # noqa: E501 +from configuration.models.settings_certificates_expiry import SettingsCertificatesExpiry # noqa: E501 +from configuration.models.settings_security_method_priority import SettingsSecurityMethodPriority # noqa: E501 + +class Settings(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, certificates_expiry=None, security_method_priority=None, acl_policy_settings=None): # noqa: E501 + """Settings - a model defined in OpenAPI + + :param certificates_expiry: The certificates_expiry of this Settings. # noqa: E501 + :type certificates_expiry: SettingsCertificatesExpiry + :param security_method_priority: The security_method_priority of this Settings. # noqa: E501 + :type security_method_priority: SettingsSecurityMethodPriority + :param acl_policy_settings: The acl_policy_settings of this Settings. # noqa: E501 + :type acl_policy_settings: SettingsAclPolicySettings + """ + self.openapi_types = { + 'certificates_expiry': SettingsCertificatesExpiry, + 'security_method_priority': SettingsSecurityMethodPriority, + 'acl_policy_settings': SettingsAclPolicySettings + } + + self.attribute_map = { + 'certificates_expiry': 'certificates_expiry', + 'security_method_priority': 'security_method_priority', + 'acl_policy_settings': 'acl_policy_settings' + } + + self._certificates_expiry = certificates_expiry + self._security_method_priority = security_method_priority + self._acl_policy_settings = acl_policy_settings + + @classmethod + def from_dict(cls, dikt) -> 'Settings': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings of this Settings. # noqa: E501 + :rtype: Settings + """ + return util.deserialize_model(dikt, cls) + + @property + def certificates_expiry(self) -> SettingsCertificatesExpiry: + """Gets the certificates_expiry of this Settings. + + + :return: The certificates_expiry of this Settings. + :rtype: SettingsCertificatesExpiry + """ + return self._certificates_expiry + + @certificates_expiry.setter + def certificates_expiry(self, certificates_expiry: SettingsCertificatesExpiry): + """Sets the certificates_expiry of this Settings. + + + :param certificates_expiry: The certificates_expiry of this Settings. + :type certificates_expiry: SettingsCertificatesExpiry + """ + + self._certificates_expiry = certificates_expiry + + @property + def security_method_priority(self) -> SettingsSecurityMethodPriority: + """Gets the security_method_priority of this Settings. + + + :return: The security_method_priority of this Settings. + :rtype: SettingsSecurityMethodPriority + """ + return self._security_method_priority + + @security_method_priority.setter + def security_method_priority(self, security_method_priority: SettingsSecurityMethodPriority): + """Sets the security_method_priority of this Settings. + + + :param security_method_priority: The security_method_priority of this Settings. + :type security_method_priority: SettingsSecurityMethodPriority + """ + + self._security_method_priority = security_method_priority + + @property + def acl_policy_settings(self) -> SettingsAclPolicySettings: + """Gets the acl_policy_settings of this Settings. + + + :return: The acl_policy_settings of this Settings. + :rtype: SettingsAclPolicySettings + """ + return self._acl_policy_settings + + @acl_policy_settings.setter + def acl_policy_settings(self, acl_policy_settings: SettingsAclPolicySettings): + """Sets the acl_policy_settings of this Settings. + + + :param acl_policy_settings: The acl_policy_settings of this Settings. + :type acl_policy_settings: SettingsAclPolicySettings + """ + + self._acl_policy_settings = acl_policy_settings diff --git a/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py b/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py new file mode 100644 index 0000000000000000000000000000000000000000..d018f225d5c0fc3a24880b4d850c336e950e1db4 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings_acl_policy_settings.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class SettingsAclPolicySettings(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocations_time_range_days=None): # noqa: E501 + """SettingsAclPolicySettings - a model defined in OpenAPI + + :param allowed_total_invocations: The allowed_total_invocations of this SettingsAclPolicySettings. # noqa: E501 + :type allowed_total_invocations: str + :param allowed_invocations_per_second: The allowed_invocations_per_second of this SettingsAclPolicySettings. # noqa: E501 + :type allowed_invocations_per_second: str + :param allowed_invocations_time_range_days: The allowed_invocations_time_range_days of this SettingsAclPolicySettings. # noqa: E501 + :type allowed_invocations_time_range_days: int + """ + self.openapi_types = { + 'allowed_total_invocations': str, + 'allowed_invocations_per_second': str, + 'allowed_invocations_time_range_days': int + } + + self.attribute_map = { + 'allowed_total_invocations': 'allowed_total_invocations', + 'allowed_invocations_per_second': 'allowed_invocations_per_second', + 'allowed_invocations_time_range_days': 'allowed_invocations_time_range_days' + } + + self._allowed_total_invocations = allowed_total_invocations + self._allowed_invocations_per_second = allowed_invocations_per_second + self._allowed_invocations_time_range_days = allowed_invocations_time_range_days + + @classmethod + def from_dict(cls, dikt) -> 'SettingsAclPolicySettings': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings_acl_policy_settings of this SettingsAclPolicySettings. # noqa: E501 + :rtype: SettingsAclPolicySettings + """ + return util.deserialize_model(dikt, cls) + + @property + def allowed_total_invocations(self) -> str: + """Gets the allowed_total_invocations of this SettingsAclPolicySettings. + + total number of requests the invoker can make # noqa: E501 + + :return: The allowed_total_invocations of this SettingsAclPolicySettings. + :rtype: str + """ + return self._allowed_total_invocations + + @allowed_total_invocations.setter + def allowed_total_invocations(self, allowed_total_invocations: str): + """Sets the allowed_total_invocations of this SettingsAclPolicySettings. + + total number of requests the invoker can make # noqa: E501 + + :param allowed_total_invocations: The allowed_total_invocations of this SettingsAclPolicySettings. + :type allowed_total_invocations: str + """ + + self._allowed_total_invocations = allowed_total_invocations + + @property + def allowed_invocations_per_second(self) -> str: + """Gets the allowed_invocations_per_second of this SettingsAclPolicySettings. + + total number of requests the invoker can make per second # noqa: E501 + + :return: The allowed_invocations_per_second of this SettingsAclPolicySettings. + :rtype: str + """ + return self._allowed_invocations_per_second + + @allowed_invocations_per_second.setter + def allowed_invocations_per_second(self, allowed_invocations_per_second: str): + """Sets the allowed_invocations_per_second of this SettingsAclPolicySettings. + + total number of requests the invoker can make per second # noqa: E501 + + :param allowed_invocations_per_second: The allowed_invocations_per_second of this SettingsAclPolicySettings. + :type allowed_invocations_per_second: str + """ + + self._allowed_invocations_per_second = allowed_invocations_per_second + + @property + def allowed_invocations_time_range_days(self) -> int: + """Gets the allowed_invocations_time_range_days of this SettingsAclPolicySettings. + + time range when an invoker can make requests # noqa: E501 + + :return: The allowed_invocations_time_range_days of this SettingsAclPolicySettings. + :rtype: int + """ + return self._allowed_invocations_time_range_days + + @allowed_invocations_time_range_days.setter + def allowed_invocations_time_range_days(self, allowed_invocations_time_range_days: int): + """Sets the allowed_invocations_time_range_days of this SettingsAclPolicySettings. + + time range when an invoker can make requests # noqa: E501 + + :param allowed_invocations_time_range_days: The allowed_invocations_time_range_days of this SettingsAclPolicySettings. + :type allowed_invocations_time_range_days: int + """ + + self._allowed_invocations_time_range_days = allowed_invocations_time_range_days diff --git a/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py b/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py new file mode 100644 index 0000000000000000000000000000000000000000..c08aaad00144a032a1dbdbcaf1097b008da39b70 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings_certificates_expiry.py @@ -0,0 +1,119 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class SettingsCertificatesExpiry(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, ttl_superadmin_cert=None, ttl_invoker_cert=None, ttl_provider_cert=None): # noqa: E501 + """SettingsCertificatesExpiry - a model defined in OpenAPI + + :param ttl_superadmin_cert: The ttl_superadmin_cert of this SettingsCertificatesExpiry. # noqa: E501 + :type ttl_superadmin_cert: str + :param ttl_invoker_cert: The ttl_invoker_cert of this SettingsCertificatesExpiry. # noqa: E501 + :type ttl_invoker_cert: str + :param ttl_provider_cert: The ttl_provider_cert of this SettingsCertificatesExpiry. # noqa: E501 + :type ttl_provider_cert: str + """ + self.openapi_types = { + 'ttl_superadmin_cert': str, + 'ttl_invoker_cert': str, + 'ttl_provider_cert': str + } + + self.attribute_map = { + 'ttl_superadmin_cert': 'ttl_superadmin_cert', + 'ttl_invoker_cert': 'ttl_invoker_cert', + 'ttl_provider_cert': 'ttl_provider_cert' + } + + self._ttl_superadmin_cert = ttl_superadmin_cert + self._ttl_invoker_cert = ttl_invoker_cert + self._ttl_provider_cert = ttl_provider_cert + + @classmethod + def from_dict(cls, dikt) -> 'SettingsCertificatesExpiry': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings_certificates_expiry of this SettingsCertificatesExpiry. # noqa: E501 + :rtype: SettingsCertificatesExpiry + """ + return util.deserialize_model(dikt, cls) + + @property + def ttl_superadmin_cert(self) -> str: + """Gets the ttl_superadmin_cert of this SettingsCertificatesExpiry. + + ttl for superadmin certificates # noqa: E501 + + :return: The ttl_superadmin_cert of this SettingsCertificatesExpiry. + :rtype: str + """ + return self._ttl_superadmin_cert + + @ttl_superadmin_cert.setter + def ttl_superadmin_cert(self, ttl_superadmin_cert: str): + """Sets the ttl_superadmin_cert of this SettingsCertificatesExpiry. + + ttl for superadmin certificates # noqa: E501 + + :param ttl_superadmin_cert: The ttl_superadmin_cert of this SettingsCertificatesExpiry. + :type ttl_superadmin_cert: str + """ + + self._ttl_superadmin_cert = ttl_superadmin_cert + + @property + def ttl_invoker_cert(self) -> str: + """Gets the ttl_invoker_cert of this SettingsCertificatesExpiry. + + ttl for invoker certificates # noqa: E501 + + :return: The ttl_invoker_cert of this SettingsCertificatesExpiry. + :rtype: str + """ + return self._ttl_invoker_cert + + @ttl_invoker_cert.setter + def ttl_invoker_cert(self, ttl_invoker_cert: str): + """Sets the ttl_invoker_cert of this SettingsCertificatesExpiry. + + ttl for invoker certificates # noqa: E501 + + :param ttl_invoker_cert: The ttl_invoker_cert of this SettingsCertificatesExpiry. + :type ttl_invoker_cert: str + """ + + self._ttl_invoker_cert = ttl_invoker_cert + + @property + def ttl_provider_cert(self) -> str: + """Gets the ttl_provider_cert of this SettingsCertificatesExpiry. + + ttl for provider certificates # noqa: E501 + + :return: The ttl_provider_cert of this SettingsCertificatesExpiry. + :rtype: str + """ + return self._ttl_provider_cert + + @ttl_provider_cert.setter + def ttl_provider_cert(self, ttl_provider_cert: str): + """Sets the ttl_provider_cert of this SettingsCertificatesExpiry. + + ttl for provider certificates # noqa: E501 + + :param ttl_provider_cert: The ttl_provider_cert of this SettingsCertificatesExpiry. + :type ttl_provider_cert: str + """ + + self._ttl_provider_cert = ttl_provider_cert diff --git a/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py b/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py new file mode 100644 index 0000000000000000000000000000000000000000..4dcc573b72ed99a7706f194a7aa7b3c9ef58bb37 --- /dev/null +++ b/services/helper/helper_service/services/configuration/models/settings_security_method_priority.py @@ -0,0 +1,113 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from configuration.models.base_model import Model +from configuration import util + + +class SettingsSecurityMethodPriority(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + def __init__(self, oauth=None, pki=None, psk=None): # noqa: E501 + """SettingsSecurityMethodPriority - a model defined in OpenAPI + + :param oauth: The oauth of this SettingsSecurityMethodPriority. # noqa: E501 + :type oauth: int + :param pki: The pki of this SettingsSecurityMethodPriority. # noqa: E501 + :type pki: int + :param psk: The psk of this SettingsSecurityMethodPriority. # noqa: E501 + :type psk: int + """ + self.openapi_types = { + 'oauth': int, + 'pki': int, + 'psk': int + } + + self.attribute_map = { + 'oauth': 'oauth', + 'pki': 'pki', + 'psk': 'psk' + } + + self._oauth = oauth + self._pki = pki + self._psk = psk + + @classmethod + def from_dict(cls, dikt) -> 'SettingsSecurityMethodPriority': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Settings_security_method_priority of this SettingsSecurityMethodPriority. # noqa: E501 + :rtype: SettingsSecurityMethodPriority + """ + return util.deserialize_model(dikt, cls) + + @property + def oauth(self) -> int: + """Gets the oauth of this SettingsSecurityMethodPriority. + + + :return: The oauth of this SettingsSecurityMethodPriority. + :rtype: int + """ + return self._oauth + + @oauth.setter + def oauth(self, oauth: int): + """Sets the oauth of this SettingsSecurityMethodPriority. + + + :param oauth: The oauth of this SettingsSecurityMethodPriority. + :type oauth: int + """ + + self._oauth = oauth + + @property + def pki(self) -> int: + """Gets the pki of this SettingsSecurityMethodPriority. + + + :return: The pki of this SettingsSecurityMethodPriority. + :rtype: int + """ + return self._pki + + @pki.setter + def pki(self, pki: int): + """Sets the pki of this SettingsSecurityMethodPriority. + + + :param pki: The pki of this SettingsSecurityMethodPriority. + :type pki: int + """ + + self._pki = pki + + @property + def psk(self) -> int: + """Gets the psk of this SettingsSecurityMethodPriority. + + + :return: The psk of this SettingsSecurityMethodPriority. + :rtype: int + """ + return self._psk + + @psk.setter + def psk(self, psk: int): + """Sets the psk of this SettingsSecurityMethodPriority. + + + :param psk: The psk of this SettingsSecurityMethodPriority. + :type psk: int + """ + + self._psk = psk diff --git a/services/helper/helper_service/services/configuration/openapi/openapi.yaml b/services/helper/helper_service/services/configuration/openapi/openapi.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2e23c81ea3905787331986388b514230843a88a6 --- /dev/null +++ b/services/helper/helper_service/services/configuration/openapi/openapi.yaml @@ -0,0 +1,482 @@ +openapi: 3.0.1 +info: + description: | + CAPIF Helper Configuration API. Allows reading and modifying the runtime configuration + stored in MongoDB (ACL policy, certificate expiration, security priorities, etc). + title: Helper Configuration API + version: 1.0.0 +servers: +- url: "{apiRoot}/configuration" + variables: + apiRoot: + default: http://localhost:8080 + description: Base URL of the Helper service. +paths: + /addNewConfigSetting: + patch: + description: Adds a brand new top-level category. + operationId: dynamic_config_controller_add_new_configuration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigCategoryCreateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Category added + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Add new configuration category + x-openapi-router-controller: configuration.controllers.default_controller + /addNewConfiguration: + post: + description: Adds a new key/value inside an existing category using "param_path" + and "new_value". + operationId: dynamic_config_controller_add_new_config_setting + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Setting added + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Add new config setting at path + x-openapi-router-controller: configuration.controllers.default_controller + /getConfiguration: + get: + description: Returns the entire CAPIF configuration document. + operationId: configuration_controller_get_configuration + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Current configuration + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Read full configuration + x-openapi-router-controller: configuration.controllers.default_controller + /removeConfigCategory: + delete: + description: Deletes an entire top-level category by name. + operationId: dynamic_config_controller_remove_config_category + parameters: + - description: Configuration path to remove + explode: true + in: query + name: config_path + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Category removed + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Remove configuration category + x-openapi-router-controller: configuration.controllers.default_controller + /removeConfigParam: + delete: + description: Deletes a leaf parameter by dotted path. + operationId: dynamic_config_controller_remove_config_param + parameters: + - description: Parameter path to remove + explode: true + in: query + name: param_path + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Parameter removed + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Remove config parameter + x-openapi-router-controller: configuration.controllers.default_controller + /replaceConfiguration: + put: + description: Replaces the configuration document with a new one. + operationId: dynamic_config_controller_replace_configuration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Updated configuration + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Replace entire configuration + x-openapi-router-controller: configuration.controllers.default_controller + /updateConfigParam: + patch: + description: Updates a single setting inside the configuration using a dotted + path selector. + operationId: dynamic_config_controller_update_config_param + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigParamUpdateRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CapifConfiguration' + description: Parameter updated + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + default: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + summary: Update single config parameter + x-openapi-router-controller: configuration.controllers.default_controller +components: + responses: + BadRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Bad request + InternalError: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Internal server error + GenericError: + content: + application/json: + schema: + $ref: '#/components/schemas/GenericError' + description: Generic error response + schemas: + CapifConfiguration: + additionalProperties: true + description: CAPIF runtime configuration document. + example: + config_name: default + settings: + - security_method_priority: + psk: 3 + oauth: 1 + pki: 2 + acl_policy_settings: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + certificates_expiry: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + - security_method_priority: + psk: 3 + oauth: 1 + pki: 2 + acl_policy_settings: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + certificates_expiry: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + version: "1.0" + properties: + config_name: + description: Configuration name + example: default + type: string + version: + description: configuration version + example: "1.0" + type: string + settings: + items: + $ref: '#/components/schemas/Settings' + type: object + title: CapifConfiguration + type: object + ConfigParamUpdateRequest: + example: + param_path: param_path + new_value: "" + properties: + param_path: + description: Dotted path to the configuration value to update. + title: param_path + type: string + new_value: + description: New value for the configuration parameter. + title: new_value + required: + - new_value + - param_path + title: ConfigParamUpdateRequest + type: object + ConfigCategoryCreateRequest: + example: + category_values: + key: "" + category_name: category_name + properties: + category_name: + description: Name of the new configuration category. + title: category_name + type: string + category_values: + additionalProperties: true + description: Key/value pairs that compose the new category. + title: category_values + type: object + required: + - category_name + - category_values + title: ConfigCategoryCreateRequest + type: object + GenericError: + example: + code: code + message: message + properties: + code: + title: code + type: string + message: + title: message + type: string + required: + - code + - message + title: GenericError + type: object + Settings: + description: Configuration Settings + example: + security_method_priority: + psk: 3 + oauth: 1 + pki: 2 + acl_policy_settings: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + certificates_expiry: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + properties: + certificates_expiry: + $ref: '#/components/schemas/Settings_certificates_expiry' + security_method_priority: + $ref: '#/components/schemas/Settings_security_method_priority' + acl_policy_settings: + $ref: '#/components/schemas/Settings_acl_policy_settings' + title: Settings + type: object + Settings_certificates_expiry: + description: Expiry configuration for certificates + example: + ttl_superadmin_cert: 4300h + ttl_invoker_cert: 4300h + ttl_provider_cert: 4300h + properties: + ttl_superadmin_cert: + description: ttl for superadmin certificates + example: 4300h + title: ttl_superadmin_cert + type: string + ttl_invoker_cert: + description: ttl for invoker certificates + example: 4300h + title: ttl_invoker_cert + type: string + ttl_provider_cert: + description: ttl for provider certificates + example: 4300h + title: ttl_provider_cert + type: string + title: Settings_certificates_expiry + type: object + Settings_security_method_priority: + description: priority to follow in granting the security method + example: + psk: 3 + oauth: 1 + pki: 2 + properties: + oauth: + example: 1 + title: oauth + type: integer + pki: + example: 2 + title: pki + type: integer + psk: + example: 3 + title: psk + type: integer + title: Settings_security_method_priority + type: object + Settings_acl_policy_settings: + description: default access policies + example: + allowed_invocations_time_range_days: 365 + allowed_invocations_per_second: "5" + allowed_total_invocations: "5" + properties: + allowed_total_invocations: + description: total number of requests the invoker can make + example: "5" + title: allowed_total_invocations + type: string + allowed_invocations_per_second: + description: total number of requests the invoker can make per second + example: "5" + title: allowed_invocations_per_second + type: string + allowed_invocations_time_range_days: + description: time range when an invoker can make requests + example: 365 + title: allowed_invocations_time_range_days + type: integer + title: Settings_acl_policy_settings + type: object diff --git a/services/helper/helper_service/services/configuration/typing_utils.py b/services/helper/helper_service/services/configuration/typing_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..74e3c913a7db6246bc765f147ca872996112c6bb --- /dev/null +++ b/services/helper/helper_service/services/configuration/typing_utils.py @@ -0,0 +1,30 @@ +import sys + +if sys.version_info < (3, 7): + import typing + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return type(klass) == typing.GenericMeta + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__extra__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__extra__ == list + +else: + + def is_generic(klass): + """ Determine whether klass is a generic class """ + return hasattr(klass, '__origin__') + + def is_dict(klass): + """ Determine whether klass is a Dict """ + return klass.__origin__ == dict + + def is_list(klass): + """ Determine whether klass is a List """ + return klass.__origin__ == list diff --git a/services/helper/helper_service/services/configuration/util.py b/services/helper/helper_service/services/configuration/util.py new file mode 100644 index 0000000000000000000000000000000000000000..f96d28fdffc590fdb3c9f23935a150cd26c6ece6 --- /dev/null +++ b/services/helper/helper_service/services/configuration/util.py @@ -0,0 +1,147 @@ +import datetime + +import typing +from configuration import typing_utils + + +def _deserialize(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 klass in (int, float, str, bool, bytearray): + return _deserialize_primitive(data, klass) + elif klass == object: + return _deserialize_object(data) + elif klass == datetime.date: + return deserialize_date(data) + elif klass == datetime.datetime: + return deserialize_datetime(data) + elif typing_utils.is_generic(klass): + if typing_utils.is_list(klass): + return _deserialize_list(data, klass.__args__[0]) + if typing_utils.is_dict(klass): + return _deserialize_dict(data, klass.__args__[1]) + else: + return deserialize_model(data, klass) + + +def _deserialize_primitive(data, klass): + """Deserializes to primitive type. + + :param data: data to deserialize. + :param klass: class literal. + + :return: int, long, float, str, bool. + :rtype: int | long | float | str | bool + """ + try: + value = klass(data) + except UnicodeEncodeError: + value = data + except TypeError: + value = data + return value + + +def _deserialize_object(value): + """Return an original value. + + :return: object. + """ + return value + + +def deserialize_date(string): + """Deserializes string to date. + + :param string: str. + :type string: str + :return: date. + :rtype: date + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + + +def deserialize_datetime(string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :type string: str + :return: datetime. + :rtype: datetime + """ + if string is None: + return None + + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + + +def deserialize_model(data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :type data: dict | list + :param klass: class literal. + :return: model object. + """ + instance = klass() + + if not instance.openapi_types: + return data + + for attr, attr_type in instance.openapi_types.items(): + if data is not None \ + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): + value = data[instance.attribute_map[attr]] + setattr(instance, attr, _deserialize(value, attr_type)) + + return instance + + +def _deserialize_list(data, boxed_type): + """Deserializes a list and its elements. + + :param data: list to deserialize. + :type data: list + :param boxed_type: class literal. + + :return: deserialized list. + :rtype: list + """ + return [_deserialize(sub_data, boxed_type) + for sub_data in data] + + +def _deserialize_dict(data, boxed_type): + """Deserializes a dict and its elements. + + :param data: dict to deserialize. + :type data: dict + :param boxed_type: class literal. + + :return: deserialized dict. + :rtype: dict + """ + return {k: _deserialize(v, boxed_type) + for k, v in data.items() } diff --git a/services/helper/requirements.txt b/services/helper/requirements.txt index 33e44310149964b14a53f01d551265f5c693fbe2..e240c8ae33a8aae4445f6fd7d8de5b01012d4be2 100644 --- a/services/helper/requirements.txt +++ b/services/helper/requirements.txt @@ -1,12 +1,18 @@ -python_dateutil == 2.9.0.post0 -setuptools == 80.9.0 -Flask == 3.0.3 -pymongo == 4.7.3 -flask_jwt_extended == 4.6.0 -pyopenssl == 25.3.0 -pyyaml == 6.0.1 -requests == 2.32.2 +connexion[swagger-ui] >= 2.6.0; python_version>="3.6" +# 2.3 is the last version that supports python 3.4-3.5 +connexion[swagger-ui] <= 2.3.0; python_version=="3.5" or python_version=="3.4" +# prevent breaking dependencies from advent of connexion>=3.0 +connexion[swagger-ui] <= 2.14.2; python_version>"3.4" +# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug +# we must peg werkzeug versions below to fix connexion +# https://github.com/zalando/connexion/pull/1044 +werkzeug == 0.16.1; python_version=="3.5" or python_version=="3.4" +swagger-ui-bundle >= 0.0.2 +python_dateutil >= 2.6.0 +setuptools >= 21.0.0 +Flask == 2.1.1 gunicorn == 23.0.0 uvicorn == 0.34.2 asgiref == 3.8.1 -packaging == 24.0 +pymongo == 4.7.3 +pyopenssl == 25.3.0 diff --git a/services/nginx/nginx.conf b/services/nginx/nginx.conf index 49591bdd600da861eeb19f7b67da23a0e6bfdb05..dfea48b85985aa91b6138e18c85d0a0c775b0439 100644 --- a/services/nginx/nginx.conf +++ b/services/nginx/nginx.conf @@ -177,8 +177,10 @@ http { add_header Content-Type 'application/problem+json'; return 401 $helper_error_message; } - proxy_set_header X-SSL-Client-Cert $ssl_client_cert; - proxy_pass http://helper:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://helper:8080/; } } diff --git a/tests/resources/common/basicRequests.robot b/tests/resources/common/basicRequests.robot index 2fcd189414190fd1af2e8d42cccfd01720c0484b..e4f13fe7bd0ec282581c608cb06fe700ee3508a8 100644 --- a/tests/resources/common/basicRequests.robot +++ b/tests/resources/common/basicRequests.robot @@ -958,7 +958,7 @@ Create Security Context Between invoker and provider Get Number Of Services ${resp}= Get Request Capif - ... /helper/getServices + ... /helper/api/getServices ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${SUPERADMIN_USERNAME}