Skip to content

Commit

Permalink
CI Build Client Artifacts (eMASS Clients)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgedias committed Oct 10, 2023
1 parent cc3320a commit 2fb375f
Show file tree
Hide file tree
Showing 596 changed files with 1,993 additions and 1,045 deletions.
4 changes: 2 additions & 2 deletions src/python_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Representational State Transfer (REST) Application Programming Interface (API) s
This Python package was generated from the eMASS API specification:

- API version: v3.12
- Package version: 3.11.1
- Build date: 2023-10-10T02:05:20.537795Z[Etc/UTC]
- Package version: 3.12.0
- Build date: 2023-10-10T14:36:02.975730Z[Etc/UTC]

## Requirements.

Expand Down
6 changes: 3 additions & 3 deletions src/python_client/emass_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
This Python package was generated from the eMASS API specification:

- API version: v3.12
- Package version: 3.11.1
- Build date: 2023-10-10T02:05:20.537795Z[Etc/UTC]
- Package version: 3.12.0
- Build date: 2023-10-10T14:36:02.975730Z[Etc/UTC]

## Requirements.

Expand Down Expand Up @@ -51,7 +51,7 @@

Execute `pytest` to run the tests.

__version__ = "3.11.1"
__version__ = "3.12.0"

# import apis into sdk package
from emass_client.api.artifacts_api import ArtifactsApi
Expand Down
76 changes: 66 additions & 10 deletions src/python_client/emass_client/api/artifacts_api.py

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions src/python_client/emass_client/api/artifacts_export_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
This Python package was generated from the eMASS API specification:

- API version: v3.12
- Package version: 3.11.1
- Build date: 2023-10-10T02:05:20.537795Z[Etc/UTC]
- Package version: 3.12.0
- Build date: 2023-10-10T14:36:02.975730Z[Etc/UTC]

## Requirements.

Expand Down Expand Up @@ -84,7 +84,13 @@ def __init__(self, api_client=None) -> None:
self.api_client = api_client

@validate_call
def get_system_artifacts_export(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], filename : Annotated[StrictStr, Field(description="**File Name**: The file name (to include file-extension).")], compress : Annotated[Optional[StrictBool], Field(description="**Compress File**: Determines if returned file is compressed.")] = None, **kwargs) -> bytearray: # noqa: E501
def get_system_artifacts_export(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
filename: Annotated[StrictStr, Field(description="**File Name**: The file name (to include file-extension).")],
compress: Annotated[Optional[StrictBool], Field(description="**Compress File**: Determines if returned file is compressed.")] = None,
**kwargs,
) -> bytearray:
"""Get the file of an artifact in a system # noqa: E501
<strong>Sample Responce</strong><br> Binary file associated with given filename.<br> If `compress` parameter is specified, zip archive of binary file associated with given filename. # noqa: E501
Expand Down Expand Up @@ -118,7 +124,13 @@ def get_system_artifacts_export(self, system_id : Annotated[StrictInt, Field(des
return self.get_system_artifacts_export_with_http_info(system_id, filename, compress, **kwargs) # noqa: E501

@validate_call
def get_system_artifacts_export_with_http_info(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], filename : Annotated[StrictStr, Field(description="**File Name**: The file name (to include file-extension).")], compress : Annotated[Optional[StrictBool], Field(description="**Compress File**: Determines if returned file is compressed.")] = None, **kwargs) -> ApiResponse: # noqa: E501
def get_system_artifacts_export_with_http_info(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
filename: Annotated[StrictStr, Field(description="**File Name**: The file name (to include file-extension).")],
compress: Annotated[Optional[StrictBool], Field(description="**Compress File**: Determines if returned file is compressed.")] = None,
**kwargs,
) -> ApiResponse:
"""Get the file of an artifact in a system # noqa: E501
<strong>Sample Responce</strong><br> Binary file associated with given filename.<br> If `compress` parameter is specified, zip archive of binary file associated with given filename. # noqa: E501
Expand Down
32 changes: 26 additions & 6 deletions src/python_client/emass_client/api/cac_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
This Python package was generated from the eMASS API specification:

- API version: v3.12
- Package version: 3.11.1
- Build date: 2023-10-10T02:05:20.537795Z[Etc/UTC]
- Package version: 3.12.0
- Build date: 2023-10-10T14:36:02.975730Z[Etc/UTC]

## Requirements.

Expand Down Expand Up @@ -87,7 +87,12 @@ def __init__(self, api_client=None) -> None:
self.api_client = api_client

@validate_call
def add_system_cac(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], request_body : Annotated[List[object], Field(description="Add control(s) to second role of CAC")], **kwargs) -> CacResponsePost: # noqa: E501
def add_system_cac(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
request_body: Annotated[List[object], Field(description="Add control(s) to second role of CAC")],
**kwargs,
) -> CacResponsePost:
"""Submit control to second role of CAC # noqa: E501
**Request Body Required Fields** - `controlAcronym` - `comments` **Notes:** - Comments `comments` are not required at the first role of the CAC but are required at the second role of the CAC. Comments cannot exceed 10,000 characters. - POST requests will only yield successful results if the control is currently sitting at the first role of the CAC. If the control is not currently sitting at the first role, then an error will be returned. # noqa: E501
Expand Down Expand Up @@ -119,7 +124,12 @@ def add_system_cac(self, system_id : Annotated[StrictInt, Field(description="**S
return self.add_system_cac_with_http_info(system_id, request_body, **kwargs) # noqa: E501

@validate_call
def add_system_cac_with_http_info(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], request_body : Annotated[List[object], Field(description="Add control(s) to second role of CAC")], **kwargs) -> ApiResponse: # noqa: E501
def add_system_cac_with_http_info(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
request_body: Annotated[List[object], Field(description="Add control(s) to second role of CAC")],
**kwargs,
) -> ApiResponse:
"""Submit control to second role of CAC # noqa: E501
**Request Body Required Fields** - `controlAcronym` - `comments` **Notes:** - Comments `comments` are not required at the first role of the CAC but are required at the second role of the CAC. Comments cannot exceed 10,000 characters. - POST requests will only yield successful results if the control is currently sitting at the first role of the CAC. If the control is not currently sitting at the first role, then an error will be returned. # noqa: E501
Expand Down Expand Up @@ -250,7 +260,12 @@ def add_system_cac_with_http_info(self, system_id : Annotated[StrictInt, Field(d
_request_auth=_params.get('_request_auth'))

@validate_call
def get_system_cac(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], control_acronyms : Annotated[Optional[StrictStr], Field(description="**Control Acronym**: Filter query by given system acronym (single value or comma separated).")] = None, **kwargs) -> CacResponseGet: # noqa: E501
def get_system_cac(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
control_acronyms: Annotated[Optional[StrictStr], Field(description="**Control Acronym**: Filter query by given system acronym (single value or comma separated).")] = None,
**kwargs,
) -> CacResponseGet:
"""Get location of one or many controls in CAC # noqa: E501
Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter # noqa: E501
Expand Down Expand Up @@ -282,7 +297,12 @@ def get_system_cac(self, system_id : Annotated[StrictInt, Field(description="**S
return self.get_system_cac_with_http_info(system_id, control_acronyms, **kwargs) # noqa: E501

@validate_call
def get_system_cac_with_http_info(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], control_acronyms : Annotated[Optional[StrictStr], Field(description="**Control Acronym**: Filter query by given system acronym (single value or comma separated).")] = None, **kwargs) -> ApiResponse: # noqa: E501
def get_system_cac_with_http_info(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
control_acronyms: Annotated[Optional[StrictStr], Field(description="**Control Acronym**: Filter query by given system acronym (single value or comma separated).")] = None,
**kwargs,
) -> ApiResponse:
"""Get location of one or many controls in CAC # noqa: E501
Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter # noqa: E501
Expand Down
32 changes: 26 additions & 6 deletions src/python_client/emass_client/api/cloud_resource_results_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
This Python package was generated from the eMASS API specification:

- API version: v3.12
- Package version: 3.11.1
- Build date: 2023-10-10T02:05:20.537795Z[Etc/UTC]
- Package version: 3.12.0
- Build date: 2023-10-10T14:36:02.975730Z[Etc/UTC]

## Requirements.

Expand Down Expand Up @@ -88,7 +88,12 @@ def __init__(self, api_client=None) -> None:
self.api_client = api_client

@validate_call
def add_cloud_resources_by_system_id(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], request_body : Annotated[List[object], Field(description="Add cloud resources and their scan results")], **kwargs) -> CloudResourcesResponsePost: # noqa: E501
def add_cloud_resources_by_system_id(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
request_body: Annotated[List[object], Field(description="Add cloud resources and their scan results")],
**kwargs,
) -> CloudResourcesResponsePost:
"""Add one or many cloud resources and their scan results # noqa: E501
Add cloud resources and their scan results in the assets module for a system `systemId` **Request Body Required Fields** - `provider` - `resourceId` - `resourceName` - `resourceType` - Compliance Results Object Array `complianceResults` - `cspPolicyDefinitionId` - `isCompliant` - `policyDefinitionTitle` **Example Request Body Required Fields** ``` [ { \"provider\": \"provide name\", \"resourceId\": \"resource identification\", \"resourceName\": \"resource name\", \"resourceType\": \"resource type\", \"complianceResults\": [ { \"cspPolicyDefinitionId\": \"CSP policy definition identification\", \"policyDefinitionTitle\": \"policy definition title\", \"isCompliant\": [true or false] } ] } ] ``` # noqa: E501
Expand Down Expand Up @@ -120,7 +125,12 @@ def add_cloud_resources_by_system_id(self, system_id : Annotated[StrictInt, Fiel
return self.add_cloud_resources_by_system_id_with_http_info(system_id, request_body, **kwargs) # noqa: E501

@validate_call
def add_cloud_resources_by_system_id_with_http_info(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], request_body : Annotated[List[object], Field(description="Add cloud resources and their scan results")], **kwargs) -> ApiResponse: # noqa: E501
def add_cloud_resources_by_system_id_with_http_info(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
request_body: Annotated[List[object], Field(description="Add cloud resources and their scan results")],
**kwargs,
) -> ApiResponse:
"""Add one or many cloud resources and their scan results # noqa: E501
Add cloud resources and their scan results in the assets module for a system `systemId` **Request Body Required Fields** - `provider` - `resourceId` - `resourceName` - `resourceType` - Compliance Results Object Array `complianceResults` - `cspPolicyDefinitionId` - `isCompliant` - `policyDefinitionTitle` **Example Request Body Required Fields** ``` [ { \"provider\": \"provide name\", \"resourceId\": \"resource identification\", \"resourceName\": \"resource name\", \"resourceType\": \"resource type\", \"complianceResults\": [ { \"cspPolicyDefinitionId\": \"CSP policy definition identification\", \"policyDefinitionTitle\": \"policy definition title\", \"isCompliant\": [true or false] } ] } ] ``` # noqa: E501
Expand Down Expand Up @@ -251,7 +261,12 @@ def add_cloud_resources_by_system_id_with_http_info(self, system_id : Annotated[
_request_auth=_params.get('_request_auth'))

@validate_call
def delete_cloud_resources(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], cloud_resources_delete_body_inner : Annotated[List[CloudResourcesDeleteBodyInner], Field(description="Delete the given Cloud Resource Id")], **kwargs) -> CloudResourcesDelete: # noqa: E501
def delete_cloud_resources(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
cloud_resources_delete_body_inner: Annotated[List[CloudResourcesDeleteBodyInner], Field(description="Delete the given Cloud Resource Id")],
**kwargs,
) -> CloudResourcesDelete:
"""Remove one or many cloud resources in a system # noqa: E501
Removes cloud resources and their scan results in the assets module for a system `systemId` # noqa: E501
Expand Down Expand Up @@ -283,7 +298,12 @@ def delete_cloud_resources(self, system_id : Annotated[StrictInt, Field(descript
return self.delete_cloud_resources_with_http_info(system_id, cloud_resources_delete_body_inner, **kwargs) # noqa: E501

@validate_call
def delete_cloud_resources_with_http_info(self, system_id : Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")], cloud_resources_delete_body_inner : Annotated[List[CloudResourcesDeleteBodyInner], Field(description="Delete the given Cloud Resource Id")], **kwargs) -> ApiResponse: # noqa: E501
def delete_cloud_resources_with_http_info(
self,
system_id: Annotated[StrictInt, Field(description="**System Id**: The unique system record identifier.")],
cloud_resources_delete_body_inner: Annotated[List[CloudResourcesDeleteBodyInner], Field(description="Delete the given Cloud Resource Id")],
**kwargs,
) -> ApiResponse:
"""Remove one or many cloud resources in a system # noqa: E501
Removes cloud resources and their scan results in the assets module for a system `systemId` # noqa: E501
Expand Down
16 changes: 12 additions & 4 deletions src/python_client/emass_client/api/cmmc_assessments_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
This Python package was generated from the eMASS API specification:

- API version: v3.12
- Package version: 3.11.1
- Build date: 2023-10-10T02:05:20.537795Z[Etc/UTC]
- Package version: 3.12.0
- Build date: 2023-10-10T14:36:02.975730Z[Etc/UTC]

## Requirements.

Expand Down Expand Up @@ -83,7 +83,11 @@ def __init__(self, api_client=None) -> None:
self.api_client = api_client

@validate_call
def get_cmmc_assessments(self, since_date : Annotated[StrictStr, Field(description="**Date** CMMC date (Unix date format)")], **kwargs) -> CmmcResponseGet: # noqa: E501
def get_cmmc_assessments(
self,
since_date: Annotated[StrictStr, Field(description="**Date** CMMC date (Unix date format)")],
**kwargs,
) -> CmmcResponseGet:
"""Get CMMC assessment information # noqa: E501
Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only. # noqa: E501
Expand Down Expand Up @@ -113,7 +117,11 @@ def get_cmmc_assessments(self, since_date : Annotated[StrictStr, Field(descripti
return self.get_cmmc_assessments_with_http_info(since_date, **kwargs) # noqa: E501

@validate_call
def get_cmmc_assessments_with_http_info(self, since_date : Annotated[StrictStr, Field(description="**Date** CMMC date (Unix date format)")], **kwargs) -> ApiResponse: # noqa: E501
def get_cmmc_assessments_with_http_info(
self,
since_date: Annotated[StrictStr, Field(description="**Date** CMMC date (Unix date format)")],
**kwargs,
) -> ApiResponse:
"""Get CMMC assessment information # noqa: E501
Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only. # noqa: E501
Expand Down
Loading

0 comments on commit 2fb375f

Please sign in to comment.