diff --git a/.env-example b/.env-example index 87fb54e..266aba4 100644 --- a/.env-example +++ b/.env-example @@ -8,3 +8,5 @@ export EMASSER_CLIENT_SIDE_VALIDATION= export EMASSER_VERIFY_SSL= export EMASSER_VERIFY_SSL_HOST= export EMASSER_DEBUGGING= +export EMASSER_CLI_DISPLAY_NULL= +export EMASSER_EPOCH_TO_DATETIME= diff --git a/.github/workflows/generate_docs.yml b/.github/workflows/generate_docs.yml deleted file mode 100644 index 1d51e0a..0000000 --- a/.github/workflows/generate_docs.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: generate-docs - -# Run on each push to main -on: - push: - branches: [ main ] - -jobs: - test_job: - runs-on: ubuntu-latest - name: Generate Document with redoc - steps: - - name: Checkout - uses: actions/checkout@v2 - - # use the public name of the action - - name: redoc-cli test - uses: seeebiii/redoc-cli-github-action@v9 - with: - args: 'bundle emass_client/eMASSRestOpenApi.yaml -o docs/redoc/index.html' - - - name: check result - run: | - ls -al - test -f docs/redoc/index.html || (echo "Fail to generate docs/redoc/index.html from previous step." && exit 1) - - - name: deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/redoc - destination_dir: docs/redoc - enable_jekyll: true diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 869663d..ebf1473 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -2,8 +2,8 @@ name: Deploy to GitHub Pages on: push: branches: [ main ] - # pull_request: - # branches: [ main ] + pull_request: + branches: [ main ] jobs: build-deploy: @@ -17,11 +17,10 @@ jobs: run: | sudo mkdir -p /publish sudo mkdir -p /publish/docs + sudo mkdir -p /publish/images + sudo cp -R ./images /publish sudo cp README.md /publish sudo cp _config.yml /publish/_config.yml - sudo cp -R ./docs/redoc /publish/docs/redoc - sudo cp -R ./docs/swagger /publish/docs/swagger - sudo cp ./docs/developers.md /publish/docs/developers.md sudo cp ./docs/features.md /publish/docs/features.md - name: Deploy Markdown Files 🚀 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0537b3f..9a80784 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,15 +28,15 @@ jobs: GPR_API_KEY: ${{secrets.GITHUB_TOKEN}} - name: Build emasser run: gem build *.gemspec - - name: Build emass_client - run: gem build -C emass_client/ruby_client/ emass_client.gemspec + # - name: Build emass_client + # run: gem build -C emass_client/ruby_client/ emass_client.gemspec - name: Publish to RubyGems run: | gem push --KEY rubygems --host https://rubygems.org *.gem - gem push --KEY rubygems --host https://rubygems.org emass_client/ruby_client/*.gem + # gem push --KEY rubygems --host https://rubygems.org emass_client/ruby_client/*.gem - name: Publish to GPR run: | gem push --KEY github --host https://rubygems.pkg.github.com/mitre *.gem - gem push --KEY github --host https://rubygems.pkg.github.com/mitre emass_client/ruby_client/*.gem + # gem push --KEY github --host https://rubygems.pkg.github.com/mitre emass_client/ruby_client/*.gem env: OWNER: mitre diff --git a/Dockerfile b/Dockerfile index bfef6c5..4a47767 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,21 +18,23 @@ RUN gem install bundler -v '2.3.5' RUN apt update && apt install -y build-essential COPY . . RUN bundle install -WORKDIR /emasser/emass_client/ruby_client -RUN gem build emass_client.gemspec +# WORKDIR /emasser/emass_client/ruby_client +# RUN gem build emass_client.gemspec WORKDIR /emasser RUN gem build emasser.gemspec RUN mkdir gems -RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem +# RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem RUN mv emasser*.gem gems/emasser.gem + FROM ruby:2-alpine # Use the line below when testing creating the container locally # RUN sed -i 's/https/http/g' /etc/apk/repositories COPY --from=build /emasser/gems /emass-gems -RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem +# RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem +RUN apk add build-base libcurl && gem install /emass-gems/emasser.gem VOLUME [ "/data" ] WORKDIR /data diff --git a/Gemfile b/Gemfile index 86e0077..756e0b1 100644 --- a/Gemfile +++ b/Gemfile @@ -5,4 +5,4 @@ source 'https://rubygems.org' # Specify your gem's dependencies in emasser.gemspec gemspec -gem 'emass_client', path: './emass_client/ruby_client/' +#gem 'emass_client', path: './emass_client/ruby_client/' diff --git a/Gemfile.lock b/Gemfile.lock index 194d065..77911e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,80 +1,74 @@ PATH remote: . specs: - emasser (1.0.3) + emasser (1.0.6) activesupport (~> 6.1.4) colorize (~> 0.8.1) dotenv (~> 2.7.6) - emass_client (~> 1.0) + emass_client (~> 1.0, != 1.0.3) rubyzip (~> 2.3.2) thor (~> 1.1.0) -PATH - remote: emass_client/ruby_client - specs: - emass_client (1.0.3) - json (~> 2.1, >= 2.1.0) - typhoeus (~> 1.0, >= 1.0.1) - GEM remote: https://rubygems.org/ specs: - activesupport (6.1.4.4) + activesupport (6.1.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) ast (2.4.2) - bundler-audit (0.9.0.1) + bundler-audit (0.9.1) bundler (>= 1.2.0, < 3) thor (~> 1.0) byebug (11.1.3) colorize (0.8.1) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) diff-lcs (1.5.0) dotenv (2.7.6) + emass_client (1.0.6) + typhoeus (~> 1.0, >= 1.0.1) ethon (0.15.0) ffi (>= 1.15.0) ffi (1.15.5-x64-mingw32) - i18n (1.8.11) + i18n (1.10.0) concurrent-ruby (~> 1.0) - json (2.6.1) minitest (5.15.0) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.22.1) + parser (3.1.2.0) ast (~> 2.4.1) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.2.0) + regexp_parser (2.5.0) rexml (3.2.5) rspec (3.10.0) rspec-core (~> 3.10.0) rspec-expectations (~> 3.10.0) rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) + rspec-core (3.10.2) rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec-expectations (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-mocks (3.10.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.3) - rubocop (1.24.1) + rubocop (1.30.0) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.18.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - rubocop-minitest (0.17.0) + rubocop-ast (1.18.0) + parser (>= 3.1.1.0) + rubocop-minitest (0.20.0) rubocop (>= 0.90, < 2.0) - rubocop-performance (1.13.1) + rubocop-performance (1.14.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rake (0.6.0) @@ -88,7 +82,7 @@ GEM concurrent-ruby (~> 1.0) unicode-display_width (2.1.0) yaml (0.2.0) - zeitwerk (2.5.3) + zeitwerk (2.5.4) PLATFORMS x64-mingw32 @@ -97,7 +91,6 @@ DEPENDENCIES bundler (~> 2.3) bundler-audit (~> 0.7) byebug (~> 11.1.3) - emass_client! emasser! rake (~> 13.0) rspec (~> 3.10.0) diff --git a/README.md b/README.md index cddf5f6..a5343ad 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # emasser -![GitHub Release Date](https://img.shields.io/github/release-date/mitre/emasser?label=Release%20Date) -![GitHub release (latest by date)](https://img.shields.io/github/v/release/mitre/emasser?label=Release%20Version) -[![Gem Version](https://badge.fury.io/rb/emasser.svg)](https://badge.fury.io/rb/emasser) - +![GitHub Release Date](https://img.shields.io/github/release-date/mitre/emasser?label=Release%20Date&logo=github&color=blue) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/mitre/emasser?label=Release%20Version&logo=github) ![Gem](https://img.shields.io/gem/v/emasser?label=gem%20version&logo=ruby&logoColor=red) ![Docker Version](https://img.shields.io/docker/v/mitre/emasser?label=docker%20version&logo=docker&sort=semver) ![emasser Testing](https://github.com/mitre/emasser/actions/workflows/test-cli.yml/badge.svg) ![CodeQL Vulnerabilities and Errors](https://github.com/mitre/emasser/actions/workflows/codeql-analysis.yml/badge.svg) @@ -10,47 +8,28 @@ ![Code Linter](https://github.com/mitre/emasser/actions/workflows/rubocop.yml/badge.svg) ## About -`emasser` is a command line interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its representational state transfer (REST) application programming interface (API) v3.2. - -## Documentation -emasser provides users with the following documentation: - -[**eMASS API Documentation**](https://mitre.github.io/emasser/docs/redoc/) | [**eMASS Swagger UI**](https://mitre.github.io/emasser/docs/swagger/) - -## Current Features - -The following eMASS API HTTP methods are implemented: -* `GET` view eMASS resources -* `POST` add eMASS resources -* `PUT` update eMASS resources -* `DELETE` remove eMASS resources - - -[**emasser CLI Features**](docs/features.md) | [**emasser Developers Instructions**](docs/developers.md) - -## In Development +`emasser` is a Command Line Interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its Representational State Transfer (REST) Application Programming Interface (API). -This project is actively looking for user stories, features to build, and interactions with eMASS. See Roadmap for more information. +***NOTE***: The `emasser` CLI utilizes the [emass_client](https://github.com/mitre/emass_client) RubyGem executable package to access the eMASS API endpoints. -* Support raw JSON upload +--- +## Documentation +For detail content information about the `eMASS` API references the [**eMASS API Specification**](https://mitre.github.io/emass_client/docs/redoc/) page. -## Roadmap +For detail features provided by the `emasser` CLI references the [**emasser CLI Features**](docs/features.md) page. -Emasser is currently in MVP development and we are targeting all the features listed in Current and In Development for version 1.0.X. The Road Map are things that the team and community have talked about as possible great additions but feedback on which should come first, second, and third are what we would love feedback on from you. +The `emasser` CLI [**Architecture**](#emasser-cli-architecture) depicts the `emasser` structure, and provides an explanation of how it behaves. -* Update a system's record with met/not met NIST 800-53 Security and Privacy controls and/or common control indicators (CCI) based on scan results expressed in [Heimdall Data Format (HDF)](https://saf.mitre.org/#/normalize). -* Resolve a particular plan of action and milestone (POA&M) based on scan results or git-ops workflow. -* PKCS11 support to run in an attended mode. +--- +## Installation Options -## Installation +`emasser` is a Ruby CLI distributed via GitHub (this repository), [RubyGems](https://rubygems.org/gems/emass_client/versions/), or [Docker](https://hub.docker.com/r/mitre/emasser/tags). -`emasser` is a Ruby CLI that is distributed via git only. You must request the source from saf@groups.mitre.org - -Installation Dependencies: +### Installation Dependencies * git - * Ruby version 2.7 or greater. + * Ruby version 2.7 or greater -Runtime Dependencies: +### Runtime Dependencies * Ruby version 2.7 or greater. * `rubyzip (latest version)` * `emass_client (latest version)` @@ -63,52 +42,74 @@ Runtime Dependencies: - Install [cURL for windows](https://community.chocolatey.org/packages/curl) and add the installation directory to the PATH. -To install (via github): -```bash -git clone emasser -cd emasser -``` -- Build the emasser gem -```bash - gem build *.gemspec - gem install *.gem -``` -- Build the emass_client gem -```bash - cd emass_client/ruby_client - gem build *.gemspec - gem install *.gem -``` +## Install via GitHub +- [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the repository + ```bash + git clone emasser + cd emasser + ``` +- Build the emasser gem* + ```bash + gem build *.gemspec + gem install *.gem + ``` -To install (via published RubyGems): -```bash -gem install emasser -``` +***Note:** To run in development mode there isn't a need to build the gem, simply clone from the emasser repository and use: -**Note:** To run in development mode there isn't a need to build the gem, simply clone from the emasser repository and use: ``` +bundle install + bundle exec exe/emasser [command] ``` +## Install via published RubyGems +- Install the `emasser` gem from the [RubyGems](https://rubygems.org/gems/emass_client/versions/) registry + ```bash + gem install emasser + ``` +- Update the `emasser` gem to the latest version + ```bash + gem update emasser + ``` + +- To run (execute a command) create a `.env*` file in the directory where you want to invoke the `emmaser` and use: + + ``` + emasser [command] + ``` +***Note:** See [Setting Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration) for detailed information on required and optional variables. + ## Using Docker -### Run the emasser Docker Container -- To run the emasser container use: +Ensure that docker engine is running and start the emasser Docker Container. +### Install +- On Linux or Mac: ``` docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest ``` -- To run the emasser container in a `Windows terminal (cmd)` use: +- On Windows: + ``` + docker run --rm -v %cd%/path-to-secrets:/data mitre/emasser:latest ``` - docker run --rm -v %cd%/path-to-secrets:/data mitre/emasser:latest +- Update via Docker + ```bash + docker pull mitre/emasser:latest ``` -**Notes:** + +**Docker Notes:** - Docker Options - `--rm` Automatically remove the container when it exits - `-v` Bind mount a volume - path-to-secrets - - Path to the `.env` file and the appropriate eMASS certificates (key. pem and client.pem). See [Editing Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration) + - Is the path to the `.env` file and the appropriate eMASS certificates (key.pem and client.pem). + - For example, if the `.env` is located in the same directory where the `docker run` is executed, running the command in a Windows platform would look like this: + + ``` + docker run --rm -v %cd%/.:/data mitre/emasser:latest + ``` + - See [Editing Environment Variables Configuration](https://github.com/mitre/emasser/wiki/Editing-Environment-Variables-Configuration) ### Run emasser API client commands -- To list all GET, POST, PUT, or DELETE commands use: +- To list all available GET, POST, PUT, or DELETE commands use: ``` docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest get help ``` @@ -121,34 +122,41 @@ bundle exec exe/emasser [command] ``` docker run --rm -v $PWD/path-to-secrets:/data mitre/emasser:latest delete help ``` + Example commands are for Linux or Mac, replace the `$PWD` with `%cd%` for Windows ### Delete (remove) the Docker Container ``` docker rmi -f mitre/emasser ``` +--- +## Roadmap -## Use +The `emasser` implements all endpoints provided by the `eMASS` API, there is, all of the functions available from the `eMASS GUI` that are exposed by the API. If additional functions are useful (accessible via the CLI), please submit a request to [eMass Tier III Support](mailto:disa.meade.id.mbx.emass-tier-iii-support@mail.mil) for possible inclusion into the API. -**Requirement 1 & 2: Authentication and Authorization:** -`emasser` requires authentication to eMASS as well as authorization to use the eMASS API. This authentication and authorization is **not** a function of `emasser` and needs to be handled directly with discussions with [eMASS](https://www.dcsa.mil/is/emass/). `emasser` will accept credentials that are created based on those discussions. +The Road Map seeks to add any useful features that facilitates organization that utilizes `eMASS` instances and have a need to automate their cybersecurity management process. -**Approve API Client for Actionable Requests** -Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. +For additional capability create an [issue](https://github.com/mitre/emasser/issues), and email it to the [SAF Team](mailto:saf@groups.mitre.org) citing the issue link so we can help. -To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: -* [eMASS Tier III support - Website](https://www.dcsa.mil/is/emass/) -* [Send email to eMASS Tier III support](disa.meade.id.mbx.emass-tier-iii-support@mail.mil) -* [eMASS New User Registration (CAC required)](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) +Some proposed capabilities (looking for a sponsor) are: +* Update a system's record with met/not met NIST 800-53 Security and Privacy controls and/or common control indicators (CCI) based on scan results expressed in [Heimdall Data Format (HDF)](https://saf.mitre.org/#/normalize). +* Resolve a particular plan of action and milestone (POA&M) based on scan results or git-ops workflow. +* PKCS11 support to run in an attended mode. ## Design -**Interactions with eMASS API:** -`emasser` leverages a MITRE dependency, `emass_client`, which provides a REST API client based on a MITRE-created [OpenAPI](https://www.openapis.org/) version 3 specification for the official eMASS version 3.2 API documentation. This design enables REST API clients to be generated in [any supported programming language](https://swagger.io/tools/swagger-codegen/). This design decision enables `emass_client` to generate a Ruby client for `emasser` and a TypeScript client that is included with [Heimdall Enterprise Server](https://github.com/mitre/heimdall2). +### Interactions with eMASS API +The `emasser` CLI leverages the [emass_client](https://github.com/mitre/emass_client), which provides a REST API client developed by MITRE based on the [OpenAPI V3](https://www.openapis.org/) standards for the official [eMASS API specification](https://mitre.github.io/emass_client/docs/redoc). This design enables REST API clients to be generated in [any supported programming language](https://openapi-generator.tech/docs/generators/). The design enables the `emass_client` to be generated independently of the emasser CLI. Currently, a Ruby and a Typescript eMASS client API are provided. The TypeScript client is used with the [Security Automation Framework CLI (SAF) CLI](https://github.com/mitre/saf). + +### Business Logic +Because interactions with the API are handled by a dependency, the bulk of `emasser` business logic is for accepting user input/output, reading data from eMASS or from input, transforming data, and routing data to the appropriate eMASS API endpoint. This business logic is organized into Ruby Classes and Modules based on the command or subcommand requested by the user. -**Business Logic:** -Because interactions with the API are handled by a dependency, the bulk of `emasser` is business logic for accepting user input/output, reading data from eMASS or from input, transforming data, and routing data to the appropriate eMASS API endpoint. This business logic is organized into Ruby Classes and Modules based on the command or subcommand requested by the user. +## Emasser CLI Architecture +The `emasser` CLI makes use of the `emass_client` ruby gem to communicate with an `eMASS` instance via the `eMASS API` as depicted in the diagram below: +
+ emasser CLI Architecture +
### NOTICE diff --git a/docs/developers.md b/docs/developers.md deleted file mode 100644 index 51fbbec..0000000 --- a/docs/developers.md +++ /dev/null @@ -1,115 +0,0 @@ -# Developers Instructions - -The documentation provided here is an OpenAPI (v3.0.3) Specification compliant describing, producing, consuming, and visualizing the eMASS RESTful API web services (endpoints) as described in the eMASS REST API (v3.2) document, dated October 21, 2021. - -The API is documented in YAML and can be viewed utilizing Swagger Editor or Visual Studio Code (VSC) with swagger and yaml extensions. - -### Viewing the API via Swagger - -There are online tool options for viewing and editing OpenAPI compliant RESTfull APIs like the eMASS API documentations. Some of these tools are Swagger Editor or SwaggerHub. We discourage the utilization of any online capability for editing a controlled unclassified API document. - -To install the Swagger Editor offline from its repository follow these [instructions](https://github.com/swagger-api/swagger-editor). - -### Generate the API documentation (to view in a web browser-html) -eMASS API documentation can be found [here](/docs/redoc/index.html) - -To generate the API documentation that can be viewable in a totally dependency-free (and nice looking) HTML use the `redoc-cli` command line tool. - - -Install the tool via `npm`: -```bash -npm install -g redoc-cli -``` -To generate the HTML document, use the following command: -```bash -redoc-cli bundle -o ./output/eMASS.html eMASSRestOpenApi.yaml -``` - -The command above assumes that the generated file is placed in a subfolder relative to the current folder called output, and that the eMASSRestApi.yaml is in the current working directory. The generated file is called eMASS.html and can be viewed in any web browser. - -### Setting up Visual Studio Code -Install these Extensions (Ctrl+Shift+X): -* YAML ([link](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)) -* Swagger Viewer ([link](https://marketplace.visualstudio.com/items?itemName=Arjun.swagger-viewer)) -* OpenAPI Swagger Editor ([link](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi)) -* Swagger Snippets ([link](https://marketplace.visualstudio.com/items?itemName=adisreyaj.swagger-snippets), optional) - -Open the eMASS Rest API file by selecting File -> Open Folder and select the folder containing the eMASSRestApi.yaml file. Open the file into the editor and select the "OpenApi: show preview using default render" (Ctrl+K V) - -Once the mock server is running, we can utilize the "Try it Out" on each of the API endpoints to test the API documentation with mock data. - -### Using PRISM HTTP mock Server -Install prism (if not installed) via npm: -``` npm -npm install -g @stoplight/prism-cli -``` - -Run the prism server on the localhost, use the -p parameter to set the port (using 4010) -``` node -prism mock -p 4010 eMASSRestOpenApi.yaml -``` - -To invoke the mock server interactive use the -d parameter (provides fake responses using x-faker) -``` node -prism mock -d -p 4010 eMASSRestOpenAPI.yaml -``` -**Note:** -* The Prism starting commands above assumes that the current path contains the eMASSRestAPI.yaml file -* If using VSC, Prism restarts automatically when the yaml file is modified and saved -* Use `npx` instead of `npm` to install packages locally, but still be able to run them as if they were global - -Now you can access the fake API endpoints utilizing either CURL or the Swagger Editor. The following curl command invokes the systems endpoint with a path parameter of policy=rmf: -``` node -curl -X GET "http://localhost:4010/api/systems?policy=rmf" -H "accept: application/json" -H "api-key: f32516cc-57d3-43f5-9e16-8f86780a4cce" -H "user-uid: 1647389405" -``` -Note: The API expects the api-key and user-uid headers. - -## Swagger Codegen -### Clone the source code -Follow these instruction to generate the eMASS client API library (software development kit - SDK): -``` git -git clone https://github.com/swagger-api/swagger-codegen -cd swagger-codegen -git checkout 3.0.0 -mvn clean package -``` -Alternatively, you can follow instruction listed in [Swagger Codegen](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#getting-started). The eMASS API utilized the OpenAPI version 3.0 standards, ensure that the proper `Swagger Codegen` is utilized to generate the client SDK. - - -### Build the Client SDK - -NOTE: The current [handlebar templates](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#modifying-the-client-library-format) do not provide a configuration variable where a keypassword can be defined containing the client certificate passphrase used by libcurl wrapper Typhoeus. For this reason, we have provided [updated templates](./swagger-codegen/ruby_template) that can be utilized in the interim until the necessary fixes are integrated into the [main repository](https://github.com/swagger-api/swagger-codegen/tree/3.0.0) - -After cloning the appropriate `Swagger Codegen` baseline (3.0.0) generate the SDK (make sure you are in the cloned directory, e.g; /path/to/codegen/swagger-codegen) - -To generate the client SDK with provided templates use: -``` node -java -jar swagger-codegen-cli generate generate -i /path/to/yaml/eMASSRestOpenApi.yaml -l ruby -t emass_client/swagger-codegen/ruby_template -o /path/to/sdk/emass_api_client -``` - - -To generate without specifying the templates use: -``` node -java -jar swagger-codegen-cli generate -i /path/to/yaml/eMASSRestOpenApi.yaml -l ruby -o /path/to/sdk/emass_api_client -``` -Note: The command listed above is for generating a ruby client SDK. Other languages are available, see instructions [here](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#to-generate-a-sample-client-library) - -## Ruby Client -Information about the swagger generated ruby client SDK refer to the [ruby_client](./ruby_client) directory. - - ---- - -NOTICE - -© 2020 The MITRE Corporation. - -Approved for Public Release; Distribution Unlimited. Case Number 18-3678. -NOTICE - -MITRE hereby grants express written permission to use, reproduce, distribute, modify, and otherwise leverage this software to the extent permitted by the licensed terms provided in the LICENSE.md file included with this project. -NOTICE - -This software was produced for the U. S. Government under Contract Number HHSM-500-2012-00008I, and is subject to Federal Acquisition Regulation Clause 52.227-14, Rights in Data-General. - -No other use other than that granted to the U. S. Government, or to those acting on behalf of the U. S. Government under that Clause is authorized without the express written permission of The MITRE Corporation. DISA STIGs are published by DISA, see: https://public.cyber.mil/privacy-security/ diff --git a/docs/features.md b/docs/features.md index 2b851fc..0af8d3a 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,9 +1,17 @@ # emasser CLI Features -## Required Environment Variables -To facilitate setting the required environment variables the emasser CLI utilized the zero-dependency module to load these variables from a .env file. An .env-example file is provided with the required fields (listed below). +## Environment Variables +To facilitate setting the required environment variables the `emasser `CLI utilized the zero-dependency module to load these variables from a `.env` file. -emasser environment variables (required): +### Configuring the `.env` File +An `.env-example` file is provided with the required and optional fields. + +Modify the `.env_example` as necessary and save it as a `.env` file. + +Place the file on the path where the `emasser` command is executed. + +### Required and Optional Environment Variables +The following environment variables are required: * EMASSER_API_KEY_API_KEY=`` * EMASSER_API_KEY_USER_UID=`` @@ -11,26 +19,31 @@ emasser environment variables (required): * EMASSER_CERT_FILE_PATH=`` * EMASSER_KEY_PASSWORD=`` -emasser environment variables (optional): -* EMASSER_CLIENT_SIDE_VALIDATION=`` -* EMASSER_VERIFY_SSL=`` -* EMASSER_VERIFY_SSL_HOST=`` -* EMASSER_DEBUGGING=`` +The following environment variables are *optional: +* EMASSER_CLIENT_SIDE_VALIDATION=`` +* EMASSER_VERIFY_SSL=`` +* EMASSER_VERIFY_SSL_HOST=`` +* EMASSER_DEBUGGING=`` +* EMASSER_CLI_DISPLAY_NULL=`` +* EMASSER_POCH_TO_DATETIME=`` + +\* If not provided defaults are used + +The proper format to set these variables in the `.env` files is as follows: +```bash +export [VARIABLE_NAME]='value' +``` +***NOTE*** +`emasser` requires authentication to an eMASS instance as well as authorization to use the eMASS API. This authentication and authorization is **not** a function of `emasser` and needs to be accomplished with the eMASS instances owner organization. Further information about eMASS credential requirements refer to [Defense Counterintelligence and Security Agency](https://www.dcsa.mil/is/emass/) about eMASS access. +--- ## Common emasser Endpoint Requests Information - To invoke any boolean parameters use --parameterName for TRUE and --no-parameterName for FALSE - - The eMASS API provides the capability of updating multiple entries within several endpoints, however this CLI only supports updating one entry at the time. + - The eMASS API provides the capability of updating multiple entries within several endpoints, however the `emasser` CLI, in some cases only supports updating one entry at the time. ## Invoking emasser CLI Commands -The CLI invoke commands listed in this document shows them when executing from the source code (after a pull from GitHub). If an executable (.gem) is created the command to invoke the endpoint is different. For example: -- Invoking the GET systems endpoint from the source code is: - - bundle exec exe/emasser get systems all - -- Invoking the GET systems endpoint from the compile binary (.gem) is: - - emasser get systems all +The CLI invoke commands listed in this document shows them when executing from the source code (after a pull from GitHub). Please reference the [`emasser` README](https://mitre.github.io/emasser/) on how to invoke the CLI using other available executables (gem or docker). ## API Endpoints Provided @@ -38,10 +51,11 @@ The CLI invoke commands listed in this document shows them when executing from t * [/api](#get-test-connection) * [/api/system](#get-system) * [/api/systems](#get-systems) +* [/api/systems/{systemId}](#get-system) * [/api/system-roles](#get-roles) * [/api/system-roles/{roleCategory}](#get-roles) * [/api/systems/{systemId}/controls](#get-controls) -* [/api/systems/{systemId}/test-results](#get-test_results) +* [/api/systems/{systemId}/test-results](#get-testresults) * [/api/systems/{systemId}/poams](#get-poams) * [/api/systems/{systemId}/poams/{poamId}](#get-poams) * [/api/systems/{systemId}/poams/{poamId}/milestones](#get-milestones) @@ -51,8 +65,8 @@ The CLI invoke commands listed in this document shows them when executing from t * [/api/systems/{systemId}/approval/cac](#get-cac) * [/api/systems/{systemId}/approval/pac](#get-pac) * [/api/cmmc-assessments](#get-cmmc) -* [/api/workflow-definitions](#get-workflow_definitions) -* [/api/systems/{systemId}/workflow-instances](#get-workflow_instances) +* [/api/workflow-definitions](#get-workflowdefinitions) +* [/api/systems/{systemId}/workflow-instances](#get-workflowinstances) ### POST * [/api/systems/{systemId}/test-results](#post-test_results) @@ -62,6 +76,8 @@ The CLI invoke commands listed in this document shows them when executing from t * [/api/systems/{systemId}/approval/cac](#post-cac) * [/api/systems/{systemId}/approval/pac](#post-pac) * [/api/systems/{systemId}/static-code-scans](#post-static_code_scan) +* [/api/systems/{systemId}/cloud-resource-results](#post-cloudresource) +* [/api/systems/{systemId}/container-scan-results](#post-container) ### PUT * [/api/systems/{systemId}/controls](#put-controls) @@ -77,77 +93,76 @@ The CLI invoke commands listed in this document shows them when executing from t ## Endpoints CLI help Each CLI endpoint command has several layers of help. -- Using `help` after a `get, put, post, or delete` command lists all available endpoint calls +- Using `help` after a `get, put, post, or delete` command lists all available endpoint calls. The following command would list all available `GET` endpoints commands. - ``` + ```bash $ bundle exec exe/emasser get help + Commands: + emasser get artifacts # Get system Artifacts + emasser get cac # Get location of one or many controls in... + emasser get cmmc # Get CMMC assessment information + emasser get controls # Get system Controls + emasser get help [COMMAND] # Describe subcommands or one specific su... + emasser get milestones # Get system Milestones + emasser get pac # Get status of active workflows in a system + emasser get poams # Get system Poams + emasser get roles # Get all system roles or by category Id + emasser get system # Get a system ID given name/owner, or ge... + emasser get systems # Get all systems + emasser get test # Test connection to the configured eMASS... + emasser get test_results # Get system Test Results + emasser get workflow_definitions # Get workflow definitions in a site + emasser get workflow_instances # Get workflow instance by system and/or ... ``` - - would list all available `GET` endpoint Commands: - - - emasser get approval ... - - emasser get artifacts ... - - emasser get controls ... - - emasser get help [COMMAND] ... - - emasser get poams ... - - emasser get roles ... - - emasser get system [--system-name [SYSTEM_NAME]] [--system-owner [SYSTEM_OW... - - emasser get systems [options] ... - - emasser get test_results ... - -- Preceding any command with `help` provides help for the command - - ``` +- Preceding any command with `help` provides help for the command. The following command would list all available sub-commands and options for the `get artifacts` endpoint command. + ```bash $ bundle exec exe/emasser get help artifacts + commands: + emasser get artifacts export --filename=FILENAME --systemId=N # Get artifa... + emasser get artifacts forSystem --systemId=N # Get all sy... + emasser get artifacts help [COMMAND] # Describe s... ``` - would list all available sub-commands and options for the `get artifacts` endpoint commands: - - emasser get artifacts export --filename=FILENAME --systemId=N # Get artifa... - - emasser get artifacts help [COMMAND] # Describe s... - - emasser get artifacts system --systemId=N # Get all sy... - -- Using `help` after any command lists all available options - - ``` +- Using `help` after any command lists all available options. The following command would list all available options for the `get artifacts export` endpoint command. + ```bash $ bundle exec exe/emasser get artifacts help export - ``` - would list all available options for the `get artifacts export` endpoint command: - - Usage: - - emasser get artifacts export --filename=FILENAME --systemId=N - - Options: - - --systemId=N # A numeric value representing the system identification - - --filename=FILENAME # The artifact file name - - --compress # BOOLEAN - true or false. + Usage: + emasser get artifacts export --filename=FILENAME --systemId=N -**The same format is applicable to POST, PUT and DELETE requests as well, however there may be additional help content** + Options: + --systemId=N # A numeric value representing the system identification + --filename=FILENAME # The artifact file name + [--compress], [--no-compress] # BOOLEAN - true or false. + ``` +**The same format is applicable for POST, PUT and DELETE requests as well, however there may be additional help content** ## Usage - GET -### ```get test connection``` -[top](#api-endpoints-provided) - +### ```get test connection``` --- The Test Connection endpoint provides the ability to verify connection to the web service. $ bundle exec exe/emasser get test connection A return of success from the call indicates that the CLI can reach the configure server URL. -References [Required Environment Variables](#required-environment-variables) list above. +References [Required Environment Variables](#required-environment-variables) for the necessary environment variables. -### ```get system``` [top](#api-endpoints-provided) +### ```get system``` + --- -The `get system id` is a notified call by the CLI to find a system ID based on the system `name` or `owner` +The `get system` command is not a sanctioned eMASS endpoint, it makes use of the `get systems` endpoint with added business logic. + +There are two commands provided by the get system: -The `get system byId` is an eMASS GET request +- The `get system id` - returns system ID's based on the system `name` or `owner` +- The `get system byId` - returns the system content for parameter system ID ### get system id Retrieves a system identification based on the SYSTEM_NAME (name) or SYSTEM_OWNER (systemOwner) fields. -**NOTE** This call is based on the /api/systems endpoint - -To invoke the `get system` use the following command: +To invoke the `get system id` use the following command: $ bundle exec exe/emasser get system id --system_name "system name" --system_owner "system owner" @@ -157,7 +172,7 @@ If using a platform that has `awk` installed the following command can be used t ### get system byId -To view a system by its identification (Id) use the following command: +Retrieves the system content for provided identification (ID) number. To invoke the endpoint use the following command: $ bundle exec exe/emasser get system byId @@ -174,14 +189,16 @@ To view a system by its identification (Id) use the following command: |--includePackage |BOOLEAN - true or false | |--policy |Possible values: diacap, rmf, reporting | +[top](#api-endpoints-provided) ### ```get systems``` -[top](#api-endpoints-provided) ---- -To view systems use the following command: - +To retrieve controls use the following command: +- all - Retrieves all available systems + ``` $ bundle exec exe/emasser get systems all + ``` - Optional parameters are: @@ -194,12 +211,11 @@ To view systems use the following command: |--includePackage |BOOLEAN - true or false | |--policy |Possible values: diacap, rmf, reporting | |--registrationType |Possible values: assessAndAuthorize, assessOnly, guest, regular, functional, | - | | loudServiceProvider, commonControlProvider | + | | cloudServiceProvider, commonControlProvider | |--reportsForScorecard |BOOLEAN - true or false | - -### ```get roles``` [top](#api-endpoints-provided) +### ```get roles``` ---- There are two get endpoints for system roles: @@ -225,12 +241,11 @@ There are two get endpoints for system roles: |--policy |Possible values: diacap, rmf, reporting | |--includeDecommissioned |BOOLEAN - true or false | - -### ```get controls``` [top](#api-endpoints-provided) +### ```get controls``` ---- -To view controls use the following command: +To retrieve controls use the following command: $ bundle exec exe/emasser get controls forSystem --systemId=SYSTEMID @@ -246,12 +261,11 @@ To view controls use the following command: |-------------|:------------------------------------------| |--acronyms |The system acronym(s) e.g "AC-1, AC-2" - if not provided all controls for systemId are returned | - -### ```get test_results``` [top](#api-endpoints-provided) +### ```get test_results``` ---- -To view test results use the following command: +To retrieve test results use the following command: $ bundle exec exe/emasser get test_results forSystem --systemId=SYSTEMID @@ -269,9 +283,8 @@ To view test results use the following command: |--ccis |String - The system CCIS string numerical value | |--latestOnly |BOOLEAN - true or false| - -### ```get poams``` [top](#api-endpoints-provided) +### ```get poams``` ---- There are two get endpoints for system poams: @@ -307,9 +320,8 @@ There are two get endpoints for system poams: |--systemId |Integer - Unique system identifier | |--poamId |Integer - Unique poam identifier | - -### ```get milestones``` [top](#api-endpoints-provided) +### ```get milestones``` ---- There are two get endpoints for system milestones: @@ -344,9 +356,8 @@ There are two get endpoints for system milestones: |--poamId |Integer - Unique poam identifier | |--milestoneId |Integer - Unique milestone identifier | - -### ```get artifacts``` [top](#api-endpoints-provided) +### ```get artifacts``` ---- There are two get endpoints that provides the ability to view existing `Artifacts` in a system: @@ -380,11 +391,14 @@ There are two get endpoints that provides the ability to view existing `Artifact |-------------|:----------------------------------| |--systemId |Integer - Unique system identifier | |--filename |The artifact file name | + + - optional parameter is: + |parameter | type or values | + |-------------|:----------------------------------| |--compress |BOOLEAN - true or false. | - -### ```get cac``` [top](#api-endpoints-provided) +### ```get cac``` ---- To view one or many Control Approval Chain (CAC) in a system specified system ID use the following command: @@ -403,9 +417,8 @@ To view one or many Control Approval Chain (CAC) in a system specified system ID |-------------------------------|:----------------------------------------------| |--controlAcronyms |String - The system acronym(s) e.g "AC-1, AC-2"| - -### ```get pac``` [top](#api-endpoints-provided) +### ```get pac``` ---- To view one or many Package Approval Chain (PAC) in a system specified system ID use the following command: @@ -419,9 +432,8 @@ To view one or many Package Approval Chain (PAC) in a system specified system ID |-------------|:----------------------------------| |--systemId |Integer - Unique system identifier | - -### ```get cmmc``` [top](#api-endpoints-provided) +### ```get cmmc``` ---- To view Cybersecurity Maturity Model Certification (CMMC) Assessments use the following command: @@ -434,9 +446,8 @@ To view Cybersecurity Maturity Model Certification (CMMC) Assessments use the fo |----------------|:--------------------------------------| |--sinceDate |Date - The CMMC date. Unix date format | - -### ```get workflow_definitions``` [top](#api-endpoints-provided) +### ```get workflow_definitions``` ---- To view Workflow Definitions use the following command: @@ -449,22 +460,15 @@ To view Workflow Definitions use the following command: |---------------------|:----------------------------------------------------------------------------| |--includeInactive |BOOLEAN - true or false | |--registrationType |Possible values: assessAndAuthorize, assessOnly, guest, regular, functional, | - | | loudServiceProvider, commonControlProvider | - + | | cloudServiceProvider, commonControlProvider | -### ```get workflow_instances``` [top](#api-endpoints-provided) +### ```get workflow_instances``` ---- There are two get endpoints to view workflow instances: - - forSystem - $ bundle exec exe/emasser get workflow_instances forSystem --systemId=SYSTEMID - - - required parameter is: - - |parameter | type or values | - |-------------|:----------------------------------| - |--systemId |Integer - Unique system identifier | + - all + $ bundle exec exe/emasser get workflow_instances all - Optional parameters are: @@ -476,21 +480,20 @@ There are two get endpoints to view workflow instances: |--status |Possible values: active, inactive, all | - byWorkflowInstanceId - $ bundle exec exe/emasser get workflow_instances byWorkflowInstanceId --systemId=SYSTEMID --workflowInstanceId=--WORKFLOWID + $ bundle exec exe/emasser get workflow_instances byWorkflowInstanceId --workflowInstanceId=--WORKFLOWID - required parameter is: |parameter | type or values | |---------------------|:---------------------------------------------| - |--systemId |Integer - Unique system identifier | |--workflowInstanceId |Integer - Unique workflow instance identifier | +[top](#api-endpoints-provided) + ## Usage - POST ### ``post test_results`` -[top](#api-endpoints-provided) - --- Test Result add (POST) endpoint API business rules. @@ -531,11 +534,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser post test_results help add ``` - +[top](#post) ### ``post poams`` -[top](#api-endpoints-provided) - --- Plan of Action and Milestones (POA&M) add (POST) endpoint API business rules. @@ -573,19 +574,23 @@ Business logic, the following rules apply when adding POA&Ms - If the Security Control or Assessment Procedure does not exist in the system we may have to just import POA&M Item at the System Level. -The following parameters/fields have the following character limitations: -- POA&M Item cannot be saved if the Point of Contact fields exceed 100 characters: - - Office / Organization (pocOrganization) - - First Name (pocFirstName) - - Last Name (pocLastName) - - Email (email) - - Phone Number (pocPhoneNumber) -- POA&M Items cannot be saved if Mitigation field (mitigation) exceeds 2000 characters. -- POA&M Items cannot be saved if Source Identifying Vulnerability field exceeds 2000 characters. -- POA&M Items cannot be saved if Comments (comments) field exceeds 2000 characters -- POA&M Items cannot be saved if Resource (resource) field exceeds 250 characters. -- POA&M Items cannot be saved if Milestone Description exceeds 2000 characters. - +The following POA&M parameters/fields have the following character limitations: +- Fields that can not exceed 100 characters: + - Office / Organization (`pocOrganization`) + - First Name (`pocFirstName`) + - Last Name (`pocLastName`) + - Email (`email`) + - Phone Number (`pocPhoneNumber`) + - External Unique ID (`externalUid`) +- Fields that can not exceed 250 characters: + - Resource (`resource`) +- Fields have can not exceed 2000 character: + - Vulnerability Description (`vulnerabilityDescription`) + - Source Identifying Vulnerability (`sourceIdentVuln`) + - Recommendations (`recommendations`) + - Risk Accepted Comments (`comments`) + - Milestone Description (`description`) + - Mitigation Justification (`mitigation`) To add (POST) POA&Ms use the following command: ``` @@ -604,30 +609,30 @@ $ bundle exec exe/emasser post poams add --systemId [value] --status [value] --v Client API parameters/fields (required, conditional, and optional). - required parameter are: - |parameter | type or values | - |---------------------------|:-----------------------------------------------------------------------| - |--systemId |Integer - Unique system identifier | - |--status |Possible Values: Ongoing,Risk Accepted,Completed,Not Applicable | - |--vulnerabilityDescription |String - Vulnerability description for the POA&M Item. 2000 Characters | - |--sourceIdentVuln |String - Include Source Identifying Vulnerability text. 2000 Characters | - |--pocOrganization |String - Organization/Office represented. 100 Characters | - |--resources |String - List of resources used. Character Limit = 250 | + |parameter | type or values | + |---------------------------|:---------------------------------------------------------------| + |--systemId |Integer - Unique system identifier | + |--status |Possible Values: Ongoing,Risk Accepted,Completed,Not Applicable | + |--vulnerabilityDescription |String - Vulnerability description for the POA&M Item | + |--sourceIdentVuln |String - Include Source Identifying Vulnerability text | + |--pocOrganization |String - Organization/Office represented | + |--resources |String - List of resources used. Character Limit = 250 | ** If any poc information is provided all POC fields are required. See additional details for POC fields below. - conditional parameters are: - |parameter | type or values | - |--------------------------|:--------------------------------------------------------------------------------------| - |--milestones |JSON - see milestone format | - |--pocFirstName |String - First name of POC. 100 Characters | - |--pocLastName |String - Last name of POC. 100 Characters | - |--pocEmail |String - Email address of POC. 100 Characters | - |--pocPhoneNumber |String - Phone number of POC (area code) ***-**** format. 100 Characters | - |--severity |Possible values - Very Low, Low, Moderate, High, Very High | - |--scheduledCompletionDate |Date - Required for ongoing and completed POA&M items. Unix time format | - |--completionDate |Date - Field is required for completed POA&M items. Unix time format | - |--comments |String - Field is required for completed and risk accepted POA&M items. 2000 Characters| + |parameter | type or values | + |--------------------------|:------------------------------------------------------------------------| + |--milestones |JSON - see milestone format | + |--pocFirstName |String - First name of POC | + |--pocLastName |String - Last name of POC | + |--pocEmail |String - Email address of POC | + |--pocPhoneNumber |String - Phone number of POC (area code) ***-**** format | + |--severity |Possible values - Very Low, Low, Moderate, High, Very High | + |--scheduledCompletionDate |Date - Required for ongoing and completed POA&M items. Unix time format | + |--completionDate |Date - Field is required for completed POA&M items. Unix time format | + |--comments |String - Field is required for completed and risk accepted POA&M items. | ** If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are required within the request: pocFirstName, pocLastName, pocPhoneNumber @@ -639,7 +644,7 @@ Client API parameters/fields (required, conditional, and optional). |parameter | type or values | |--------------------|:-----------------------------------------------------------------------------------------| - |--externalUid |String - External unique identifier for use with associating POA&M Items. 100 Characters | + |--externalUid |String - External unique identifier for use with associating POA&M Items | |--controlAcronym |String - Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined| |--cci |String - CCI associated with the test result | |--securityChecks |String - Security Checks that are associated with the POA&M | @@ -649,8 +654,8 @@ Client API parameters/fields (required, conditional, and optional). |--impact |Possible values: Very Low, Low, Moderate, High, Very High | |--impactDescription |String - Include description of Security Control’s impact | |--residualRiskLevel |Possible values: Very Low, Low, Moderate, High, Very High | - |--recommendations |String - Include recommendations. Character Limit 2,000 | - |--mitigation |String - Include mitigation explanation. 2000 Characters | + |--recommendations |String - Include recommendations | + |--mitigation |String - Include mitigation explanation | **Note** @@ -658,11 +663,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser post poams help add ``` - +[top](#post) ### ``post milestones`` -[top](#api-endpoints-provided) - --- To add (POST) milestones in a system for one or more POA&M items use the following command: @@ -684,11 +687,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser post milestones help add ``` - +[top](#post) ### ``post artifacts`` -[top](#api-endpoints-provided) - --- The add (POST) artifacts endpoint accepts a single binary file with file extension.zip only. The command line (CI) reads the files provided and zips them before sending to eMASS. @@ -745,11 +746,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser post artifacts help upload ``` - +[top](#post) ### ``post cac`` -[top](#api-endpoints-provided) - ---- Submit control to second role of CAC @@ -779,11 +778,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser post cac help add ``` - +[top](#post) ### ``post pac`` -[top](#api-endpoints-provided) - ---- Submit control to second role of CAC @@ -799,20 +796,17 @@ To add (POST) test PAC use the following command: |--systemId |Integer - Unique system identifier | |--workflow |Possible Values: Assess and Authorize, Assess Only, Security Plan Approval | |--name |String - Package name. 100 Characters | - |--comments |Strings - Comments submitted upon initiation of the indicated workflow, 4,000 character| + |--comments |String - Comments submitted upon initiation of the indicated workflow, 4,000 character| **Note** For information at the command line use: ``` $ bundle exec exe/emasser post pac help add ``` - +[top](#post) ### ``post static_code_scan`` -[top](#api-endpoints-provided) - ---- - To add (POST) static code scans use the following command: ```` @@ -858,12 +852,139 @@ For information at the command line use: ``` $ bundle exec exe/emasser post scan_findings help add ``` +[top](#post) + +### ```post cloud_resource``` +--- + +The following Cloud Resource parameters/fields have the following character limitations: +- Fields that can not exceed 50 characters: + - Policy Deployment Version (`policyDeploymentVersion`) +- Fields that can not exceed 100 characters: + - Assessment Procedure (`assessmentProcedure`) + - Security Control Acronym (`control`) + - CSP Account ID (`cspAccountId`) + - CSP Region (`cspRegion`) + - Email of POC (`initiatedBy`) + - Cloud Service Provider (`provider`) + - Type of Cloud resource (`resourceType`) +- Fields that can not exceed 500 characters: + - CSP/Resource’s Policy ID (`cspPolicyDefinitionId`) + - Policy Deployment Name (`policyDeploymentName`) + - Policy Compliance ID (`resourceId`) + - Cloud Resource Name (`resourceName`) +- Fields that can not exceed 1000 characters: + - Reason for Compliance (`complianceReason`) +- Fields that can not exceed 2000 characters: + - Policy Short Title (`policyDefinitionTitle`) + +To add a cloud resource and their scan results in the assets module for a system use the following command: +```` + $ bundle exec exe/emasser post cloud_resource add --systemId [value] --provider [value] --resourceId [value] --resourceName [value] --resourceType [value] --cspPolicyDefinitionId [value] --isCompliant or --is-not-Compliant --policyDefinitionTitle [value] --test [value] +```` + - required parameter are: + + |parameter | type or values | + |------------------------|:--------------------------------------------------------------------------| + |--systemId |Integer - Unique system identifier | + |--provider |string - Cloud service provider name | + |--resourceId |String - Unique identifier/resource namespace for policy compliance result | + |--resourceName |String - Friendly name of Cloud resource | + |--resourceType |String - Type of Cloud resource | + |--cspPolicyDefinitionId |String - Unique identifier/compliance namespace for CSP/Resource\'s policy definition/compliance check| + |--isCompliant | Boolean - Compliance status of the policy for the identified cloud resource | + |--policyDefinitionTitle | String - Friendly policy/compliance check title. Recommend short title | + + - optional parameters are: + + |parameter | type or values | + |-------------------|:------------------------------------------------------| + |--initiatedBy |String - Person initiating the process email address | + |--cspAccountId |String - System/owner\'s CSP account ID/number | + |--cspRegion |String - CSP region of system | + |--isBaseline |Boolean - Flag that indicates in results is a baseline | + |Tags Object (tags)| + |--text | String - Text that specifies the tag type | + |Compliance Results Array Objects (complianceResults)| + |--assessmentProcedure |String - Comma separated correlation to Assessment Procedure (i.e. CCI number for DoD Control Set) | + |--complianceCheckTimestamp |Date - The compliance check date - Unix time format | + |--complianceReason |String - Reason/comments for compliance result | + |--control |String - Comma separated correlation to Security Control (e.g. exact NIST Control acronym) | + |--policyDeploymentName |String - Name of policy deployment | + |--policyDeploymentVersion |String - Version of policy deployment | + |--severity |Possible Values: Low, Medium, High, Critical | + + +**Note** +For information at the command line use: +``` +$ bundle exec exe/emasser post cloud_resource help add +``` + +[top](#post) + + +### ```post container``` +--- +The following Container parameters/fields have the following character limitations: +- Fields that can not exceed 100 characters: + - STIG Benchmark ID (`benchmark`) + - Container Namespace (`namespace`) + - Kubernetes assigned IP (`podIp`) + - Kubernetes Pod Name) (`podName`) +- Fields that can not exceed 500 characters: + - Container ID (`containerId`) + - Friendly Container Name (`containerName`) +- Fields that can not exceed 1000 characters: + - Result Comments (`message`) + + + +To add containers and their scan results in the assets module for a system use the following command: +```` + $ bundle exec ruby exe/emasser post container add --systemId [value] --containerId [value] --containerName [value] --time [value] --benchmark [value] --lastSeen [value] --ruleId [value] --status [value] + +```` + + - required parameter are: + + |parameter | type or values | + |------------------------|:--------------------------------------------------------------------------| + |--systemId |Integer - Unique system identifier | + |--containerId |String - Unique identifier of the container | + |--containerName |String - Friendly name of the container | + |--time |Date - Datetime of scan/result. Unix date format | + |Bench Marks Object (benchmarks)| + |--benchmark |String - Identifier of the benchmark/grouping of compliance results | + |benchmarks.results |Object + |--ruleId |String - Identifier for the compliance result, vulnerability, etc. + |--status |String - Benchmark result status + |--lastSeen |Date - Date last seen, Unix date format + + - optional parameters are: + + |parameter | type or values | + |----------------------------|:------------------------------------------------------| + |--podName |String - Name of pod (e.g. Kubernetes pod) | + |--podIp |String - IP address of pod | + |--namespace |String - Namespace of container in container orchestration (e.g. Kubernetes namespace)| + |Tags Object (tags)| + |--text | String - Text that specifies the tag type | + |Bench Marks Object (benchmarks) + |--isBaseline |Boolean - True/false flag for providing results as baseline. If true, all existing compliance results for the provided benchmark within the container will be replaced by results in the current call| + |benchmarks.results |Object + |--message |String - Comments for the result +**Note** +For information at the command line use: +``` +$ bundle exec exe/emasser post container help add +``` +[top](#post) ## Usage - PUT ### ``put controls`` -[top](#api-endpoints-provided) ---- Business Rules @@ -882,16 +1003,16 @@ Implementation Plan cannot be updated if a Security Control is "Inherited" excep The following parameters/fields have the following character limitations: - Implementation Plan information cannot be saved if the fields below exceed 2,000 character limits: - - N/A Justification (naJustification) - - Responsible Entities (responsibleEntities) - - Implementation Narrative (implementationNarrative) - - Criticality (slcmCriticality) - - Reporting (slcmReporting) - - Tracking (slcmTracking) - - Vulnerability Summary (vulnerabilitySummary) - - Recommendations (recommendations) + - N/A Justification (`naJustification`) + - Responsible Entities (`responsibleEntities`) + - Implementation Narrative (`implementationNarrative`) + - Criticality (`slcmCriticality`) + - Reporting (`slcmReporting`) + - Tracking (`slcmTracking`) + - Vulnerability Summary (`vulnerabilitySummary`) + - Recommendations (`recommendations`) - Implementation Plan information cannot be saved if the fields below exceed 4,000 character limits: - - SLCM Comments (slcmComments) + - SLCM Comments (`slcmComments`) Implementation Plan information cannot be updated if Security Control does not exist in the system record. @@ -943,10 +1064,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser put controls help update ``` - +[top](#put) ### ``put poams`` -[top](#api-endpoints-provided) ---- Business Rules @@ -996,6 +1116,26 @@ The following parameters/fields have the following character limitations: - POA&M Item cannot be saved if Resource field (resource) exceeds 250 characters. - POA&M Items cannot be saved if Milestone Description (description) exceeds 2,000 characters. + +The following POA&M parameters/fields have the following character limitations: +- Fields that can not exceed 100 characters: + - Office / Organization (`pocOrganization`) + - First Name (`pocFirstName`) + - Last Name (`pocLastName`) + - Email (`email`) + - Phone Number (`pocPhoneNumber`) + - External Unique ID (`externalUid`) +- Fields that can not exceed 250 characters: + - Resource (`resource`) +- Fields have can not exceed 2000 character: + - Vulnerability Description (`vulnerabilityDescription`) + - Source Identifying Vulnerability (`sourceIdentVuln`) + - Recommendations (`recommendations`) + - Risk Accepted Comments (`comments`) + - Milestone Description (`description`) + - Mitigation Justification (`mitigation`) + + --- Updating (PUT) a POA&M can be accomplished by invoking the following command: ```` @@ -1003,32 +1143,32 @@ Updating (PUT) a POA&M can be accomplished by invoking the following command: ```` - required parameter are: - |parameter | type or values | - |---------------------------|:-----------------------------------------------------------------------| - |--systemId |Integer - Unique system identifier | - |--displayPoamId |Integer - Globally unique identifier for individual POA&M Items | - |--status |Possible Values: Ongoing,Risk Accepted,Completed,Not Applicable | - |--vulnerabilityDescription |String - Vulnerability description for the POA&M Item. 2000 Characters | - |--sourceIdentVuln |String - Include Source Identifying Vulnerability text. 2000 Characters | - |--pocOrganization |String - Organization/Office represented. 100 Characters | - |--resources |String - List of resources used. Character Limit = 250 | + |parameter | type or values | + |---------------------------|:---------------------------------------------------------------| + |--systemId |Integer - Unique system identifier | + |--displayPoamId |Integer - Globally unique identifier for individual POA&M Items | + |--status |Possible Values: Ongoing,Risk Accepted,Completed,Not Applicable | + |--vulnerabilityDescription |String - Vulnerability description for the POA&M Item | + |--sourceIdentVuln |String - Include Source Identifying Vulnerability text | + |--pocOrganization |String - Organization/Office represented | + |--resources |String - List of resources used. Character Limit = 250 | ** If any poc information is provided all POC fields are required. See additional details for POC fields below. - conditional parameters are: - |parameter | type or values | - |--------------------------|:--------------------------------------------------------------------------------------| - |--milestones |JSON - see milestone format | - |--pocFirstName |String - First name of POC. 100 Characters | - |--pocLastName |String - Last name of POC. 100 Characters | - |--pocEmail |String - Email address of POC. 100 Characters | - |--pocPhoneNumber |String - Phone number of POC (area code) ***-**** format. 100 Characters | - |--severity |Possible values - Very Low, Low, Moderate, High, Very High | - |--scheduledCompletionDate |Date - Required for ongoing and completed POA&M items. Unix time format | - |--completionDate |Date - Field is required for completed POA&M items. Unix time format | - |--comments |String - Field is required for completed and risk accepted POA&M items. 2000 Characters| - |--isActive |Boolean - Used to delete milestones when updating a POA&M | + |parameter | type or values | + |--------------------------|:-----------------------------------------------------------------------| + |--milestones |JSON - see milestone format | + |--pocFirstName |String - First name of POC | + |--pocLastName |String - Last name of POC | + |--pocEmail |String - Email address of POC | + |--pocPhoneNumber |String - Phone number of POC (area code) ***-**** format | + |--severity |Possible values - Very Low, Low, Moderate, High, Very High | + |--scheduledCompletionDate |Date - Required for ongoing and completed POA&M items. Unix time format | + |--completionDate |Date - Field is required for completed POA&M items. Unix time format | + |--comments |String - Field is required for completed and risk accepted POA&M items | + |--isActive |Boolean - Used to delete milestones when updating a POA&M | ** If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are required within the request: pocFirstName, pocLastName, pocPhoneNumber @@ -1041,7 +1181,7 @@ Updating (PUT) a POA&M can be accomplished by invoking the following command: |parameter | type or values | |--------------------|:-----------------------------------------------------------------------------------------| - |--externalUid |String - External unique identifier for use with associating POA&M Items. 100 Characters | + |--externalUid |String - External unique identifier for use with associating POA&M Items | |--controlAcronym |String - Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined| |--cci |String - CCI associated with the test result | |--securityChecks |String - Security Checks that are associated with the POA&M | @@ -1051,7 +1191,7 @@ Updating (PUT) a POA&M can be accomplished by invoking the following command: |--impact |Possible values: Very Low, Low, Moderate, High, Very High | |--impactDescription |String - Include description of Security Control’s impact | |--residualRiskLevel |Possible values: Very Low, Low, Moderate, High, Very High | - |--recommendations |String - Include recommendations. Character Limit 2,000 | + |--recommendations |String - Include recommendations | |--mitigation |String - Include mitigation explanation. 2000 Characters | **Note** @@ -1059,10 +1199,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser put poams help update ``` - +[top](#put) ### ``put milestones`` -[top](#api-endpoints-provided) ---- @@ -1087,10 +1226,9 @@ For information at the command line use: ``` $ bundle exec exe/emasser put milestones help update ``` - +[top](#put) ### ``put artifacts`` -[top](#api-endpoints-provided) ---- Business Rules @@ -1143,12 +1281,11 @@ For information at the command line use: ``` $ bundle exec exe/emasser put artifacts help update ``` - +[top](#put) ## Usage - DELETE ### ``delete poams`` -[top](#api-endpoints-provided) ---- Remove one or many poa&m items in a system @@ -1157,10 +1294,9 @@ To remove (DELETE) one or more POA&M items use the following command: ``` bundle exec exe/emasser delete poams remove --systemId [value] --poamId [value] ``` - +[top](#delete) ### ``delete milestones`` -[top](#api-endpoints-provided) ---- Remove milestones in a system for one or many POA&M items @@ -1175,10 +1311,9 @@ To remove (DELETE) one or more Milestones in a system use the following command: ``` bundle exec exe/emasser delete milestones remove--systemId [value] --poamId [value] --milestoneId [value] ``` - +[top](#delete) ### ``delete artifacts`` -[top](#api-endpoints-provided) --- Remove one or many artifacts in a system @@ -1193,3 +1328,4 @@ bundle exec exe/emasser delete artifacts remove --systemId [value] --files [valu or bundle exec exe/emasser delete artifacts remove --systemId [value] --files [value, value...] ``` +[top](#delete) \ No newline at end of file diff --git a/docs/images/emasser_architecture.jpg b/docs/images/emasser_architecture.jpg new file mode 100644 index 0000000..d39ae6a Binary files /dev/null and b/docs/images/emasser_architecture.jpg differ diff --git a/docs/swagger/dist/favicon-16x16.png b/docs/swagger/dist/favicon-16x16.png deleted file mode 100644 index 8b194e6..0000000 Binary files a/docs/swagger/dist/favicon-16x16.png and /dev/null differ diff --git a/docs/swagger/dist/favicon-32x32.png b/docs/swagger/dist/favicon-32x32.png deleted file mode 100644 index 249737f..0000000 Binary files a/docs/swagger/dist/favicon-32x32.png and /dev/null differ diff --git a/docs/swagger/dist/oauth2-redirect.html b/docs/swagger/dist/oauth2-redirect.html deleted file mode 100644 index 64b171f..0000000 --- a/docs/swagger/dist/oauth2-redirect.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - Swagger UI: OAuth2 Redirect - - - - - diff --git a/docs/swagger/dist/swagger-ui-bundle.js b/docs/swagger/dist/swagger-ui-bundle.js deleted file mode 100644 index e9a9319..0000000 --- a/docs/swagger/dist/swagger-ui-bundle.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=463)}([function(e,t,n){"use strict";e.exports=n(533)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return u(e)?e:K(e)}function o(e){return s(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[h])}function c(e){return u(e)||s(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=u,n.isIndexed=s,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function C(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return N(e,t,0)}function I(e,t){return N(e,t,t)}function N(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var P=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function z(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function U(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?u(e)?e.toSeq():e.fromEntrySeq():ue(e)}function Y(e){return null==e?ie():i(e)?u(e)?e.entrySeq():e.toIndexedSeq():se(e)}function G(e){return(null==e?ie():i(e)?u(e)?e.entrySeq():e:se(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=P,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return fe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return pe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return fe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return pe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Q,Z,X,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Q||(Q=new te([]))}function ue(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():U(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=le(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function le(e){return $(e)?new te(e):V(e)?new oe(e):U(e)?new re(e):void 0}function fe(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var u=o[n?a-i:i];if(!1===t(u[1],r?u[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function pe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new F((function(){var e=o[n?a-i:i];return i++>a?q():z(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function he(e,t){return t?de(t,e,"",{"":e}):me(e)}function de(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return de(e,n,r,t)}))):ve(t)?e.call(r,n,K(t).map((function(n,r){return de(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?K(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||u(e)!==u(t)||s(e)!==s(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ge(o[1],e)&&(n||ge(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var f=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return f=!1,!1}));return f&&e.size===p}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function we(e,t){if(!e)throw new Error(t)}function xe(e,t,n){if(!(this instanceof xe))return new xe(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?q():z(e,o,n[t?r-o++:o++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new F((function(){var i=r[t?o-a:a];return a++>o?q():z(e,i,n[i])}))},ne.prototype[d]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=W(this._iterable),r=0;if(V(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=W(this._iterable);if(!V(n))return new F(q);var r=0;return new F((function(){var t=n.next();return t.done?t:z(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return z(e,o,r[o++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return j(e,t,n)?this:new be(this._value,I(t,n)-T(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?q():z(e,a++,i)}))},xe.prototype.equals=function(e){return e instanceof xe?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(_e,n),t(Ee,_e),t(Se,_e),t(ke,_e),_e.Keyed=Ee,_e.Indexed=Se,_e.Set=ke;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Oe(e){return e>>>1&1073741824|3221225471&e}function Ce(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Oe(n)}if("string"===t)return e.length>Fe?je(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ie(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function je(e){var t=Ue[e];return void 0===t&&(t=Te(e),qe===ze&&(qe=0,Ue={}),qe++,Ue[e]=t),t}function Te(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Re,De="function"==typeof WeakMap;De&&(Re=new WeakMap);var Le=0,Be="__immutablehash__";"function"==typeof Symbol&&(Be=Symbol(Be));var Fe=16,ze=255,qe=0,Ue={};function Ve(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function We(e){return null==e?ot():He(e)&&!l(e)?e:ot().withMutations((function(t){var n=r(e);Ve(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function He(e){return!(!e||!e[Je])}t(We,Ee),We.of=function(){var t=e.call(arguments,0);return ot().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},We.prototype.toString=function(){return this.__toString("Map {","}")},We.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},We.prototype.set=function(e,t){return at(this,e,t)},We.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},We.prototype.remove=function(e){return at(this,e,b)},We.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},We.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},We.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,_n(e),t,n);return r===b?void 0:r},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},We.prototype.merge=function(){return pt(this,void 0,arguments)},We.prototype.mergeWith=function(t){return pt(this,t,e.call(arguments,1))},We.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},We.prototype.mergeDeep=function(){return pt(this,ht,arguments)},We.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return pt(this,dt(t),n)},We.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},We.prototype.sort=function(e){return Ut(fn(this,e))},We.prototype.sortBy=function(e,t){return Ut(fn(this,t,e))},We.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},We.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},We.prototype.asImmutable=function(){return this.__ensureOwner()},We.prototype.wasAltered=function(){return this.__altered},We.prototype.__iterator=function(e,t){return new et(this,e,t)},We.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},We.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},We.isMap=He;var $e,Je="@@__IMMUTABLE_MAP__@@",Ke=We.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Qe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return z(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ke);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return $e||($e=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=_(w),i=_(x);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===b?-1:1:0)}else{if(n===b)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,u){return e?e.update(t,n,r,o,a,i,u):a===b?e:(E(u),E(i),new Xe(t,r,[o,a]))}function ut(e){return e.constructor===Xe||e.constructor===Ze}function st(e,t,n,r,o){if(e.keyHash===r)return new Ze(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,u=(0===n?r:r>>>n)&y;return new Ge(t,1<>>=1)i[u]=1&n?t[a++]:void 0;return i[r]=o,new Qe(e,a+1,i)}function pt(e,t,n){for(var o=[],a=0;a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:k(e);return o[t]=n,o}function bt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,u=0;u=xt)return ct(e,s,r,o);var p=e&&e===this.ownerID,h=p?s:k(s);return f?u?c===l-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),p?(this.entries=h,this):new Ye(e,h)}},Ge.prototype.get=function(e,t,n,r){void 0===t&&(t=Ce(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[gt(a&o-1)].get(e+v,t,n,r)},Ge.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Ce(r));var u=(0===t?n:n>>>t)&y,s=1<=_t)return ft(e,p,c,u,d);if(l&&!d&&2===p.length&&ut(p[1^f]))return p[1^f];if(l&&d&&1===p.length&&ut(d))return d;var m=e&&e===this.ownerID,g=l?d?c:c^s:c|s,w=l?d?yt(p,f,d,m):wt(p,f,m):bt(p,f,d,m);return m?(this.bitmap=g,this.nodes=w,this):new Ge(e,g,w)},Qe.prototype.get=function(e,t,n,r){void 0===t&&(t=Ce(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+v,t,n,r):r},Qe.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Ce(r));var u=(0===t?n:n>>>t)&y,s=o===b,c=this.nodes,l=c[u];if(s&&!l)return this;var f=it(l,e,t+v,n,r,o,a,i);if(f===l)return this;var p=this.count;if(l){if(!f&&--p0&&r=0&&e>>t&y;if(r>=this.array.length)return new Ct([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-v,n))===i&&a)return this}if(a&&!o)return this;var u=Lt(this,e);if(!a)for(var s=0;s>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-v,n))===a&&o===this.array.length-1)return this}var i=Lt(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var jt,Tt,It={};function Nt(e,t){var n=e._origin,r=e._capacity,o=qt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?u(e,n):s(e,t,n)}function u(e,i){var u=i===o?a&&a.array:e&&e.array,s=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(s===c)return It;var e=t?--c:s++;return u&&u[e]}}function s(e,o,a){var u,s=e&&e.array,c=a>n?0:n-a>>o,l=1+(r-a>>o);return l>g&&(l=g),function(){for(;;){if(u){var e=u();if(e!==It)return e;u=null}if(c===l)return It;var n=t?--l:c++;u=i(s&&s[n],o-v,a+(n<=e.size||t<0)return e.withMutations((function(e){t<0?Ft(e,t).set(0,n):Ft(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=_(x);return t>=qt(e._capacity)?r=Dt(r,e.__ownerID,0,t,n,a):o=Dt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Pt(e._origin,e._capacity,e._level,o,r):e}function Dt(e,t,n,r,o,a){var i,u=r>>>n&y,s=e&&u0){var c=e&&e.array[u],l=Dt(c,t,n-v,r,o,a);return l===c?e:((i=Lt(e,t)).array[u]=l,i)}return s&&e.array[u]===o?e:(E(a),i=Lt(e,t),void 0===o&&u===i.array.length-1?i.array.pop():i.array[u]=o,i)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ct(e?e.array.slice():[],t)}function Bt(e,t){if(t>=qt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=v;return n}}function Ft(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,o=e._origin,a=e._capacity,i=o+t,u=void 0===n?a:n<0?a+n:o+n;if(i===o&&u===a)return e;if(i>=u)return e.clear();for(var s=e._level,c=e._root,l=0;i+l<0;)c=new Ct(c&&c.array.length?[void 0,c]:[],r),l+=1<<(s+=v);l&&(i+=l,o+=l,u+=l,a+=l);for(var f=qt(a),p=qt(u);p>=1<f?new Ct([],r):h;if(h&&p>f&&iv;g-=v){var b=f>>>g&y;m=m.array[b]=Lt(m.array[b],r)}m.array[f>>>v&y]=h}if(u=p)i-=p,u-=p,s=v,c=null,d=d&&d.removeBefore(r,0,i);else if(i>o||p>>s&y;if(w!==p>>>s&y)break;w&&(l+=(1<o&&(c=c.removeBefore(r,s,i-l)),c&&pa&&(a=c.size),i(s)||(c=c.map((function(e){return he(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),mt(e,t,r)}function qt(e){return e>>v<=g&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=u===i.size-1?i.pop():i.set(u,void 0))}else if(s){if(n===i.get(u)[1])return e;r=a,o=i.set(u,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Wt(r,o)}function Jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Qt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===R){var r=e.__iterator(t,n);return new F((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===M?P:M,n)},t}function Zt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,b);return a===b?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(R,o);return new F((function(){var o=a.next();if(o.done)return o;var i=o.value,u=i[0];return z(r,u,t.call(n,i[1],u,e),o)}))},r}function Xt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Qt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=bn(e);return r&&(o.has=function(r){var o=e.get(r,b);return o!==b&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,b);return a!==b&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,u=0;return e.__iterate((function(e,a,s){if(t.call(n,e,a,s))return u++,o(e,r?a:u-1,i)}),a),u},o.__iteratorUncached=function(o,a){var i=e.__iterator(R,a),u=0;return new F((function(){for(;;){var a=i.next();if(a.done)return a;var s=a.value,c=s[0],l=s[1];if(t.call(n,l,c,e))return z(o,r?c:u++,l,a)}}))},o}function tn(e,t,n){var r=We().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=u(e),o=(l(e)?Ut():We()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return mn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),j(t,n,o))return e;var a=T(t,o),i=I(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var u,s=i-a;s==s&&(u=s<0?0:s);var c=bn(e);return c.size=0===u?u:e.size&&u||void 0,!r&&ae(e)&&u>=0&&(c.get=function(t,n){return(t=O(this,t))>=0&&tu)return q();var e=o.next();return r||t===M?e:z(t,s-1,t===P?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,u){return t.call(n,e,o,u)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(R,o),u=!0;return new F((function(){if(!u)return q();var e=i.next();if(e.done)return e;var o=e.value,s=o[0],c=o[1];return t.call(n,c,s,a)?r===R?e:z(r,s,c,e):(u=!1,q())}))},r}function an(e,t,n,r){var o=bn(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var u=!0,s=0;return e.__iterate((function(e,a,c){if(!u||!(u=t.call(n,e,a,c)))return s++,o(e,r?a:s-1,i)})),s},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var u=e.__iterator(R,a),s=!0,c=0;return new F((function(){var e,a,l;do{if((e=u.next()).done)return r||o===M?e:z(o,c++,o===P?void 0:e.value[1],e);var f=e.value;a=f[0],l=f[1],s&&(s=t.call(n,l,a,i))}while(s);return o===R?e:z(o,a,l,e)}))},o}function un(e,t){var n=u(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?ue(e):se(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&u(a)||s(e)&&s(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function sn(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=0,u=!1;function s(e,c){var l=this;e.__iterate((function(e,o){return(!t||c0}function dn(e,t,r){var o=bn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),W(o?e.reverse():e)})),i=0,u=!1;return new F((function(){var n;return u||(n=a.map((function(e){return e.next()})),u=n.some((function(e){return e.done}))),u?q():z(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function mn(e,t){return ae(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Ve(e.size),A(e)}function yn(e){return u(e)?r:s(e)?o:a}function bn(e){return Object.create((u(e)?K:s(e)?Y:G).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function xn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kn(e,t)},Vn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ve(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kn(t,n)},Vn.prototype.pop=function(){return this.slice(1)},Vn.prototype.unshift=function(){return this.push.apply(this,arguments)},Vn.prototype.unshiftAll=function(e){return this.pushAll(e)},Vn.prototype.shift=function(){return this.pop.apply(this,arguments)},Vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Vn.prototype.slice=function(e,t){if(j(e,t,this.size))return this;var n=T(e,this.size);if(I(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Kn(r,o)},Vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new F((function(){if(r){var t=r.value;return r=r.next,z(e,n++,t)}return q()}))},Vn.isStack=Wn;var Hn,$n="@@__IMMUTABLE_STACK__@@",Jn=Vn.prototype;function Kn(e,t,n,r){var o=Object.create(Jn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Hn||(Hn=Kn(0))}function Gn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Jn[$n]=!0,Jn.withMutations=Ke.withMutations,Jn.asMutable=Ke.asMutable,Jn.asImmutable=Ke.asImmutable,Jn.wasAltered=Ke.wasAltered,n.Iterator=F,Gn(n,{toArray:function(){Ve(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Jt(this,!0)},toMap:function(){return We(this.toKeyedSeq())},toObject:function(){Ve(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Ut(this.toKeyedSeq())},toOrderedSet:function(){return Ln(u(this)?this.valueSeq():this)},toSet:function(){return jn(u(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vn(u(this)?this.valueSeq():this)},toList:function(){return St(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,un(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(R)},every:function(e,t){Ve(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ve(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ve(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(P)},map:function(e,t){return mn(this,Zt(this,e,t))},reduce:function(e,t,n){var r,o;return Ve(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Xt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,fn(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return A(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(C)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,sn(this,e,!0))},fromEntrySeq:function(){return new Gt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=_n(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(Xn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return pn(this,e)},maxBy:function(e,t){return pn(this,t,e)},min:function(e){return pn(this,e?nr(e):ar)},minBy:function(e,t){return pn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,fn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Qn=n.prototype;Qn[f]=!0,Qn[B]=Qn.values,Qn.__toJS=Qn.toArray,Qn.__toStringMapper=rr,Qn.inspect=Qn.toSource=function(){return this.toString()},Qn.chain=Qn.flatMap,Qn.contains=Qn.includes,Gn(r,{flip:function(){return mn(this,Qt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Zn=r.prototype;function Xn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return k(arguments)}function ar(e,t){return et?-1:0}function ir(e){if(e.size===1/0)return 0;var t=l(e),n=u(e),r=t?1:0;return ur(e.__iterate(n?t?function(e,t){r=31*r+sr(Ce(e),Ce(t))|0}:function(e,t){r=r+sr(Ce(e),Ce(t))|0}:t?function(e){r=31*r+Ce(e)|0}:function(e){r=r+Ce(e)|0}),r)}function ur(e,t){return t=Ae(t,3432918353),t=Ae(t<<15|t>>>-15,461845907),t=Ae(t<<13|t>>>-13,5),t=Ae((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Oe((t=Ae(t^t>>>13,3266489909))^t>>>16)}function sr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Zn[p]=!0,Zn[B]=Qn.entries,Zn.__toJS=Qn.toObject,Zn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Gn(o,{toKeyedSeq:function(){return new Jt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Xt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(k(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,sn(this,e,!1))},get:function(e,t){return(e=O(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=O(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function Ne(e){return t=e.replace(/\.[^./]*$/,""),Y()(J()(t));var t}function Pe(e,t,n,r,a){if(!t)return[];var u=[],s=t.get("nullable"),c=t.get("required"),f=t.get("maximum"),h=t.get("minimum"),d=t.get("type"),m=t.get("format"),g=t.get("maxLength"),b=t.get("minLength"),x=t.get("uniqueItems"),_=t.get("maxItems"),E=t.get("minItems"),S=t.get("pattern"),k=n||!0===c,A=null!=e;if(s&&null===e||!d||!(k||A&&"array"===d||!(!k&&!A)))return[];var O="string"===d&&e,C="array"===d&&l()(e)&&e.length,j="array"===d&&W.a.List.isList(e)&&e.count(),T=[O,C,j,"array"===d&&"string"==typeof e&&e,"file"===d&&e instanceof ue.a.File,"boolean"===d&&(e||!1===e),"number"===d&&(e||0===e),"integer"===d&&(e||0===e),"object"===d&&"object"===i()(e)&&null!==e,"object"===d&&"string"==typeof e&&e],I=N()(T).call(T,(function(e){return!!e}));if(k&&!I&&!r)return u.push("Required field is not provided"),u;if("object"===d&&(null===a||"application/json"===a)){var P,M=e;if("string"==typeof e)try{M=JSON.parse(e)}catch(e){return u.push("Parameter string value must be valid JSON"),u}if(t&&t.has("required")&&Ee(c.isList)&&c.isList()&&y()(c).call(c,(function(e){void 0===M[e]&&u.push({propKey:e,error:"Required property not found"})})),t&&t.has("properties"))y()(P=t.get("properties")).call(P,(function(e,t){var n=Pe(M[t],e,!1,r,a);u.push.apply(u,o()(p()(n).call(n,(function(e){return{propKey:t,error:e}}))))}))}if(S){var R=function(e,t){if(!new RegExp(t).test(e))return"Value must follow pattern "+t}(e,S);R&&u.push(R)}if(E&&"array"===d){var D=function(e,t){var n;if(!e&&t>=1||e&&e.lengtht)return v()(n="Array must not contain more then ".concat(t," item")).call(n,1===t?"":"s")}(e,_);L&&u.push({needRemove:!0,error:L})}if(x&&"array"===d){var B=function(e,t){if(e&&("true"===t||!0===t)){var n=Object(V.fromJS)(e),r=n.toSet();if(e.length>r.size){var o=Object(V.Set)();if(y()(n).call(n,(function(e,t){w()(n).call(n,(function(t){return Ee(t.equals)?t.equals(e):t===e})).size>1&&(o=o.add(t))})),0!==o.size)return p()(o).call(o,(function(e){return{index:e,error:"No duplicates allowed."}})).toArray()}}}(e,x);B&&u.push.apply(u,o()(B))}if(g||0===g){var F=function(e,t){var n;if(e.length>t)return v()(n="Value must be no longer than ".concat(t," character")).call(n,1!==t?"s":"")}(e,g);F&&u.push(F)}if(b){var z=function(e,t){var n;if(e.lengtht)return"Value must be less than ".concat(t)}(e,f);q&&u.push(q)}if(h||0===h){var U=function(e,t){if(e2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,a=n.bypassRequiredCheck,i=void 0!==a&&a,u=e.get("required"),s=Object(le.a)(e,{isOAS3:o}),c=s.schema,l=s.parameterContentMediaType;return Pe(t,c,u,i,l)},Re=function(e,t,n){if(e&&(!e.xml||!e.xml.name)){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(ie.memoizedCreateXMLExample)(e,t,n)},De=[{when:/json/,shouldStringifyTypes:["string"]}],Le=["object"],Be=function(e,t,n,r){var a=Object(ie.memoizedSampleFromSchema)(e,t,r),u=i()(a),s=S()(De).call(De,(function(e,t){var r;return t.when.test(n)?v()(r=[]).call(r,o()(e),o()(t.shouldStringifyTypes)):e}),Le);return te()(s,(function(e){return e===u}))?M()(a,null,2):a},Fe=function(e,t,n,r){var o,a=Be(e,t,n,r);try{"\n"===(o=me.a.dump(me.a.load(a),{lineWidth:-1}))[o.length-1]&&(o=T()(o).call(o,0,o.length-1))}catch(e){return console.error(e),"error: could not generate yaml example"}return o.replace(/\t/g," ")},ze=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return e&&Ee(e.toJS)&&(e=e.toJS()),r&&Ee(r.toJS)&&(r=r.toJS()),/xml/.test(t)?Re(e,n,r):/(yaml|yml)/.test(t)?Fe(e,n,t,r):Be(e,n,t,r)},qe=function(){var e={},t=ue.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},Ue=function(t){return(t instanceof e?t:e.from(t.toString(),"utf-8")).toString("base64")},Ve={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},We=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},He=function(e,t,n){return!!X()(n,(function(n){return re()(e[n],t[n])}))};function $e(e){return"string"!=typeof e||""===e?"":Object(H.sanitizeUrl)(e)}function Je(e){return!(!e||D()(e).call(e,"localhost")>=0||D()(e).call(e,"127.0.0.1")>=0||"none"===e)}function Ke(e){if(!W.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=B()(e).call(e,(function(e,t){return z()(t).call(t,"2")&&_()(e.get("content")||{}).length>0})),n=e.get("default")||W.a.OrderedMap(),r=(n.get("content")||W.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var Ye=function(e){return"string"==typeof e||e instanceof String?U()(e).call(e).replace(/\s/g,"%20"):""},Ge=function(e){return ce()(Ye(e).replace(/%20/g,"_"))},Qe=function(e){return w()(e).call(e,(function(e,t){return/^x-/.test(t)}))},Ze=function(e){return w()(e).call(e,(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function Xe(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==i()(e)||l()(e)||null===e||!t)return e;var o=A()({},e);return y()(n=_()(o)).call(n,(function(e){e===t&&r(o[e],e)?delete o[e]:o[e]=Xe(o[e],t,r)})),o}function et(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===i()(e)&&null!==e)try{return M()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function tt(e){return"number"==typeof e?e.toString():e}function nt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,a=void 0===o||o;if(!W.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var i,u,s,c=e.get("name"),l=e.get("in"),f=[];e&&e.hashCode&&l&&c&&a&&f.push(v()(i=v()(u="".concat(l,".")).call(u,c,".hash-")).call(i,e.hashCode()));l&&c&&f.push(v()(s="".concat(l,".")).call(s,c));return f.push(c),r?f:f[0]||""}function rt(e,t){var n,r=nt(e,{returnAll:!0});return w()(n=p()(r).call(r,(function(e){return t[e]}))).call(n,(function(e){return void 0!==e}))[0]}function ot(){return it(pe()(32).toString("base64"))}function at(e){return it(de()("sha256").update(e).digest("base64"))}function it(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var ut=function(e){return!e||!(!ge(e)||!e.isEmpty())}}).call(this,n(125).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(215);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},function(e,t,n){e.exports=n(621)},function(e,t,n){var r=n(159),o=n(494);function a(t){return"function"==typeof r&&"symbol"==typeof o?(e.exports=a=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),a(t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(519)},function(e,t,n){e.exports=n(517)},function(e,t,n){"use strict";var r=n(38),o=n(120).f,a=n(318),i=n(31),u=n(103),s=n(70),c=n(51),l=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,h,d,m,v,g,y=e.target,b=e.global,w=e.stat,x=e.proto,_=b?r:w?r[y]:(r[y]||{}).prototype,E=b?i:i[y]||(i[y]={}),S=E.prototype;for(p in t)n=!a(b?p:y+(w?".":"#")+p,e.forced)&&_&&c(_,p),d=E[p],n&&(m=e.noTargetGet?(g=o(_,p))&&g.value:_[p]),h=n&&m?m:t[p],n&&typeof d==typeof h||(v=e.bind&&n?u(h,r):e.wrap&&n?l(h):x&&"function"==typeof h?u(Function.call,h):h,(e.sham||h&&h.sham||d&&d.sham)&&s(v,"sham",!0),E[p]=v,x&&(c(i,f=y+"Prototype")||s(i,f,{}),i[f][p]=h,e.real&&S&&!S[p]&&s(S,p,h)))}},function(e,t,n){e.exports=n(367)},function(e,t,n){e.exports=n(522)},function(e,t,n){var r=n(405),o=n(406),a=n(776),i=n(778),u=n(782),s=n(784),c=n(789),l=n(215),f=n(3);function p(e,t){var n=r(e);if(o){var u=o(e);t&&(u=a(u).call(u,(function(t){return i(e,t).enumerable}))),n.push.apply(n,u)}return n}e.exports=function(e){for(var t=1;t>",i=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};i.isRequired=i;var u=function(){return i};function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof o.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function c(e){function t(t,n,r,o,i,u){for(var s=arguments.length,c=Array(s>6?s-6:0),l=6;l4)}function l(e){var t=e.get("swagger");return"string"==typeof t&&i()(t).call(t,"2.0")}function f(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?c(n.specSelectors.specJson())?s.a.createElement(e,o()({},r,n,{Ori:t})):s.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){e.exports=n(513)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(38),o=n(202),a=n(51),i=n(164),u=n(201),s=n(316),c=o("wks"),l=r.Symbol,f=s?l:l&&l.withoutSetter||i;e.exports=function(e){return a(c,e)&&(u||"string"==typeof c[e])||(u&&a(l,e)?c[e]=l[e]:c[e]=f("Symbol."+e)),c[e]}},function(e,t,n){var r=n(230);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){e.exports=n(807)},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(53))},function(e,t,n){var r=n(31);e.exports=function(e){return r[e+"Prototype"]}},function(e,t,n){var r=n(31),o=n(51),a=n(211),i=n(62).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||i(t,e,{value:a.f(e)})}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SPEC",(function(){return ee})),n.d(t,"UPDATE_URL",(function(){return te})),n.d(t,"UPDATE_JSON",(function(){return ne})),n.d(t,"UPDATE_PARAM",(function(){return re})),n.d(t,"UPDATE_EMPTY_PARAM_INCLUSION",(function(){return oe})),n.d(t,"VALIDATE_PARAMS",(function(){return ae})),n.d(t,"SET_RESPONSE",(function(){return ie})),n.d(t,"SET_REQUEST",(function(){return ue})),n.d(t,"SET_MUTATED_REQUEST",(function(){return se})),n.d(t,"LOG_REQUEST",(function(){return ce})),n.d(t,"CLEAR_RESPONSE",(function(){return le})),n.d(t,"CLEAR_REQUEST",(function(){return fe})),n.d(t,"CLEAR_VALIDATE_PARAMS",(function(){return pe})),n.d(t,"UPDATE_OPERATION_META_VALUE",(function(){return he})),n.d(t,"UPDATE_RESOLVED",(function(){return de})),n.d(t,"UPDATE_RESOLVED_SUBTREE",(function(){return me})),n.d(t,"SET_SCHEME",(function(){return ve})),n.d(t,"updateSpec",(function(){return ge})),n.d(t,"updateResolved",(function(){return ye})),n.d(t,"updateUrl",(function(){return be})),n.d(t,"updateJsonSpec",(function(){return we})),n.d(t,"parseToJson",(function(){return xe})),n.d(t,"resolveSpec",(function(){return Ee})),n.d(t,"requestResolvedSubtree",(function(){return Ae})),n.d(t,"changeParam",(function(){return Oe})),n.d(t,"changeParamByIdentity",(function(){return Ce})),n.d(t,"updateResolvedSubtree",(function(){return je})),n.d(t,"invalidateResolvedSubtreeCache",(function(){return Te})),n.d(t,"validateParams",(function(){return Ie})),n.d(t,"updateEmptyParamInclusion",(function(){return Ne})),n.d(t,"clearValidateParams",(function(){return Pe})),n.d(t,"changeConsumesValue",(function(){return Me})),n.d(t,"changeProducesValue",(function(){return Re})),n.d(t,"setResponse",(function(){return De})),n.d(t,"setRequest",(function(){return Le})),n.d(t,"setMutatedRequest",(function(){return Be})),n.d(t,"logRequest",(function(){return Fe})),n.d(t,"executeRequest",(function(){return ze})),n.d(t,"execute",(function(){return qe})),n.d(t,"clearResponse",(function(){return Ue})),n.d(t,"clearRequest",(function(){return Ve})),n.d(t,"setScheme",(function(){return We}));var r=n(24),o=n.n(r),a=n(49),i=n.n(a),u=n(68),s=n.n(u),c=n(18),l=n.n(c),f=n(37),p=n.n(f),h=n(23),d=n.n(h),m=n(4),v=n.n(m),g=n(306),y=n.n(g),b=n(28),w=n.n(b),x=n(189),_=n.n(x),E=n(60),S=n.n(E),k=n(12),A=n.n(k),O=n(190),C=n.n(O),j=n(17),T=n.n(j),I=n(22),N=n.n(I),P=n(2),M=n.n(P),R=n(15),D=n.n(R),L=n(20),B=n.n(L),F=n(307),z=n.n(F),q=n(66),U=n(1),V=n(82),W=n.n(V),H=n(134),$=n(439),J=n.n($),K=n(440),Y=n.n(K),G=n(308),Q=n.n(G),Z=n(5),X=["path","method"],ee="spec_update_spec",te="spec_update_url",ne="spec_update_json",re="spec_update_param",oe="spec_update_empty_param_inclusion",ae="spec_validate_param",ie="spec_set_response",ue="spec_set_request",se="spec_set_mutated_request",ce="spec_log_request",le="spec_clear_response",fe="spec_clear_request",pe="spec_clear_validate_param",he="spec_update_operation_meta_value",de="spec_update_resolved",me="spec_update_resolved_subtree",ve="set_scheme";function ge(e){var t,n=(t=e,J()(t)?t:"").replace(/\t/g," ");if("string"==typeof e)return{type:ee,payload:n}}function ye(e){return{type:de,payload:e}}function be(e){return{type:te,payload:e}}function we(e){return{type:ne,payload:e}}var xe=function(e){return function(t){var n=t.specActions,r=t.specSelectors,o=t.errActions,a=r.specStr,i=null;try{e=e||a(),o.clear({source:"parser"}),i=q.a.load(e)}catch(e){return console.error(e),o.newSpecErr({source:"parser",level:"error",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return i&&"object"===l()(i)?n.updateJsonSpec(i):{}}},_e=!1,Ee=function(e,t){return function(n){var r=n.specActions,o=n.specSelectors,a=n.errActions,i=n.fn,u=i.fetch,s=i.resolve,c=i.AST,l=void 0===c?{}:c,f=n.getConfigs;_e||(console.warn("specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!"),_e=!0);var p=f(),h=p.modelPropertyMacro,m=p.parameterMacro,g=p.requestInterceptor,b=p.responseInterceptor;void 0===e&&(e=o.specJson()),void 0===t&&(t=o.url());var w=l.getLineNumberForPath?l.getLineNumberForPath:function(){},x=o.specStr();return s({fetch:u,spec:e,baseDoc:t,modelPropertyMacro:h,parameterMacro:m,requestInterceptor:g,responseInterceptor:b}).then((function(e){var t=e.spec,n=e.errors;if(a.clear({type:"thrown"}),d()(n)&&n.length>0){var o=v()(n).call(n,(function(e){return console.error(e),e.line=e.fullPath?w(x,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e}));a.newThrownErrBatch(o)}return r.updateResolved(t)}))}},Se=[],ke=Y()(s()(p.a.mark((function e(){var t,n,r,o,a,i,u,c,l,f,h,m,g,b,x,E,k,O;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Se.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,a=o.resolveSubtree,i=o.fetch,u=o.AST,c=void 0===u?{}:u,l=t.specSelectors,f=t.specActions,a){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return h=c.getLineNumberForPath?c.getLineNumberForPath:function(){},m=l.specStr(),g=t.getConfigs(),b=g.modelPropertyMacro,x=g.parameterMacro,E=g.requestInterceptor,k=g.responseInterceptor,e.prev=11,e.next=14,w()(Se).call(Se,function(){var e=s()(p.a.mark((function e(t,o){var u,c,f,g,w,O,j,T,I;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return u=e.sent,c=u.resultMap,f=u.specWithCurrentSubtrees,e.next=7,a(f,o,{baseDoc:l.url(),modelPropertyMacro:b,parameterMacro:x,requestInterceptor:E,responseInterceptor:k});case 7:if(g=e.sent,w=g.errors,O=g.spec,r.allErrors().size&&n.clearBy((function(e){var t;return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!_()(t=e.get("fullPath")).call(t,(function(e,t){return e===o[t]||void 0===o[t]}))})),d()(w)&&w.length>0&&(j=v()(w).call(w,(function(e){return e.line=e.fullPath?h(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(j)),!O||!l.isOAS3()||"components"!==o[0]||"securitySchemes"!==o[1]){e.next=15;break}return e.next=15,S.a.all(v()(T=A()(I=C()(O)).call(I,(function(e){return"openIdConnect"===e.type}))).call(T,function(){var e=s()(p.a.mark((function e(t){var n,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={url:t.openIdConnectUrl,requestInterceptor:E,responseInterceptor:k},e.prev=1,e.next=4,i(n);case 4:(r=e.sent)instanceof Error||r.status>=400?console.error(r.statusText+" "+n.url):t.openIdConnectData=JSON.parse(r.text),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()));case 15:return Q()(c,o,O),Q()(f,o,O),e.abrupt("return",{resultMap:c,specWithCurrentSubtrees:f});case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),S.a.resolve({resultMap:(l.specResolvedSubtree([])||Object(U.Map)()).toJS(),specWithCurrentSubtrees:l.specJson().toJS()}));case 14:O=e.sent,delete Se.system,Se=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:f.updateResolvedSubtree([],O.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),Ae=function(e){return function(t){var n;T()(n=v()(Se).call(Se,(function(e){return e.join("@@")}))).call(n,e.join("@@"))>-1||(Se.push(e),Se.system=t,ke())}};function Oe(e,t,n,r,o){return{type:re,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function Ce(e,t,n,r){return{type:re,payload:{path:e,param:t,value:n,isXml:r}}}var je=function(e,t){return{type:me,payload:{path:e,value:t}}},Te=function(){return{type:me,payload:{path:[],value:Object(U.Map)()}}},Ie=function(e,t){return{type:ae,payload:{pathMethod:e,isOAS3:t}}},Ne=function(e,t,n,r){return{type:oe,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Pe(e){return{type:pe,payload:{pathMethod:e}}}function Me(e,t){return{type:he,payload:{path:e,value:t,key:"consumes_value"}}}function Re(e,t){return{type:he,payload:{path:e,value:t,key:"produces_value"}}}var De=function(e,t,n){return{payload:{path:e,method:t,res:n},type:ie}},Le=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ue}},Be=function(e,t,n){return{payload:{path:e,method:t,req:n},type:se}},Fe=function(e){return{payload:e,type:ce}},ze=function(e){return function(t){var n,r,o=t.fn,a=t.specActions,i=t.specSelectors,u=t.getConfigs,c=t.oas3Selectors,l=e.pathName,f=e.method,h=e.operation,m=u(),g=m.requestInterceptor,y=m.responseInterceptor,b=h.toJS();h&&h.get("parameters")&&N()(n=A()(r=h.get("parameters")).call(r,(function(e){return e&&!0===e.get("allowEmptyValue")}))).call(n,(function(t){if(i.parameterInclusionSettingFor([l,f],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(Z.B)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}));if(e.contextUrl=W()(i.url()).toString(),b&&b.operationId?e.operationId=b.operationId:b&&l&&f&&(e.operationId=o.opId(b,l,f)),i.isOAS3()){var w,x=M()(w="".concat(l,":")).call(w,f);e.server=c.selectedServer(x)||c.selectedServer();var _=c.serverVariables({server:e.server,namespace:x}).toJS(),E=c.serverVariables({server:e.server}).toJS();e.serverVariables=D()(_).length?_:E,e.requestContentType=c.requestContentType(l,f),e.responseContentType=c.responseContentType(l,f)||"*/*";var S,k=c.requestBodyValue(l,f),O=c.requestBodyInclusionSetting(l,f);if(k&&k.toJS)e.requestBody=A()(S=v()(k).call(k,(function(e){return U.Map.isMap(e)?e.get("value"):e}))).call(S,(function(e,t){return(d()(e)?0!==e.length:!Object(Z.q)(e))||O.get(t)})).toJS();else e.requestBody=k}var C=B()({},e);C=o.buildRequest(C),a.setRequest(e.pathName,e.method,C);var j=function(){var t=s()(p.a.mark((function t(n){var r,o;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g.apply(undefined,[n]);case 2:return r=t.sent,o=B()({},r),a.setMutatedRequest(e.pathName,e.method,o),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();e.requestInterceptor=j,e.responseInterceptor=y;var T=z()();return o.execute(e).then((function(t){t.duration=z()()-T,a.setResponse(e.pathName,e.method,t)})).catch((function(t){"Failed to fetch"===t.message&&(t.name="",t.message='**Failed to fetch.** \n**Possible Reasons:** \n - CORS \n - Network Failure \n - URL scheme must be "http" or "https" for CORS request.'),a.setResponse(e.pathName,e.method,{error:!0,err:Object(H.serializeError)(t)})}))}},qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i()(e,X);return function(e){var a=e.fn.fetch,i=e.specSelectors,u=e.specActions,s=i.specJsonWithResolvedSubtrees().toJS(),c=i.operationScheme(t,n),l=i.contentTypeValues([t,n]).toJS(),f=l.requestContentType,p=l.responseContentType,h=/xml/i.test(f),d=i.parameterValues([t,n],h).toJS();return u.executeRequest(o()(o()({},r),{},{fetch:a,spec:s,pathName:t,method:n,parameters:d,requestContentType:f,scheme:c,responseContentType:p}))}};function Ue(e,t){return{type:le,payload:{path:e,method:t}}}function Ve(e,t){return{type:fe,payload:{path:e,method:t}}}function We(e,t,n){return{type:ve,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=e.length?{done:!0}:{done:!1,value:e[u++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,f=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){f=!0,c=e},f:function(){try{l||null==n.return||n.return()}finally{if(f)throw c}}}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(41);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(406),o=n(407),a=n(794);e.exports=function(e,t){if(null==e)return{};var n,i,u=a(e,t);if(r){var s=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG",(function(){return a})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return i})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return u})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return s})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return c})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return l})),n.d(t,"SET_REQUEST_BODY_VALIDATE_ERROR",(function(){return f})),n.d(t,"CLEAR_REQUEST_BODY_VALIDATE_ERROR",(function(){return p})),n.d(t,"CLEAR_REQUEST_BODY_VALUE",(function(){return h})),n.d(t,"setSelectedServer",(function(){return d})),n.d(t,"setRequestBodyValue",(function(){return m})),n.d(t,"setRetainRequestBodyValueFlag",(function(){return v})),n.d(t,"setRequestBodyInclusion",(function(){return g})),n.d(t,"setActiveExamplesMember",(function(){return y})),n.d(t,"setRequestContentType",(function(){return b})),n.d(t,"setResponseContentType",(function(){return w})),n.d(t,"setServerVariableValue",(function(){return x})),n.d(t,"setRequestBodyValidateError",(function(){return _})),n.d(t,"clearRequestBodyValidateError",(function(){return E})),n.d(t,"initRequestBodyValidateError",(function(){return S})),n.d(t,"clearRequestBodyValue",(function(){return k}));var r="oas3_set_servers",o="oas3_set_request_body_value",a="oas3_set_request_body_retain_flag",i="oas3_set_request_body_inclusion",u="oas3_set_active_examples_member",s="oas3_set_request_content_type",c="oas3_set_response_content_type",l="oas3_set_server_variable_value",f="oas3_set_request_body_validate_error",p="oas3_clear_request_body_validate_error",h="oas3_clear_request_body_value";function d(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function m(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}var v=function(e){var t=e.value,n=e.pathMethod;return{type:a,payload:{value:t,pathMethod:n}}};function g(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:i,payload:{value:t,pathMethod:n,name:r}}}function y(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:u,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function b(e){var t=e.value,n=e.pathMethod;return{type:s,payload:{value:t,pathMethod:n}}}function w(e){var t=e.value,n=e.path,r=e.method;return{type:c,payload:{value:t,path:n,method:r}}}function x(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:l,payload:{server:t,namespace:n,key:r,val:o}}}var _=function(e){var t=e.path,n=e.method,r=e.validationErrors;return{type:f,payload:{path:t,method:n,validationErrors:r}}},E=function(e){var t=e.path,n=e.method;return{type:p,payload:{path:t,method:n}}},S=function(e){var t=e.pathMethod;return{type:p,payload:{path:t[0],method:t[1]}}},k=function(e){var t=e.pathMethod;return{type:h,payload:{pathMethod:t}}}},function(e,t,n){var r=n(57),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},function(e,t,n){e.exports=n(624)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"a",(function(){return b})),n.d(t,"d",(function(){return w}));var r=n(45),o=n.n(r),a=n(18),i=n.n(a),u=n(97),s=n.n(u),c=n(2),l=n.n(c),f=n(48),p=n.n(f),h=function(e){return String.prototype.toLowerCase.call(e)},d=function(e){return e.replace(/[^\w]/gi,"_")};function m(e){var t=e.openapi;return!!t&&s()(t).call(t,"3")}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==i()(e))return null;var a=(e.operationId||"").replace(/\s/g,"");return a.length?d(e.operationId):g(t,n,{v2OperationIdCompatibilityMode:o})}function g(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var a,i,u=l()(a="".concat(t.toLowerCase(),"_")).call(a,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(u=u||l()(i="".concat(e.substring(1),"_")).call(i,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return l()(n="".concat(h(t))).call(n,d(e))}function y(e,t){var n;return l()(n="".concat(h(t),"-")).call(n,e)}function b(e,t){return e&&e.paths?function(e,t){return function(e,t,n){if(!e||"object"!==i()(e)||!e.paths||"object"!==i()(e.paths))return null;var r=e.paths;for(var o in r)for(var a in r[o])if("PARAMETERS"!==a.toUpperCase()){var u=r[o][a];if(u&&"object"===i()(u)){var s={spec:e,pathName:o,method:a.toUpperCase(),operation:u},c=t(s);if(n&&c)return s}}return}(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==i()(o))return!1;var a=o.operationId;return[v(o,n,r),y(n,r),a].some((function(e){return e&&e===t}))})):null}function w(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var a in n){var i=n[a];if(p()(i)){var u=i.parameters,s=function(e){var n=i[e];if(!p()(n))return"continue";var s=v(n,a,e);if(s){r[s]?r[s].push(n):r[s]=[n];var c=r[s];if(c.length>1)c.forEach((function(e,t){var n;e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=l()(n="".concat(s)).call(n,t+1)}));else if(void 0!==n.operationId){var f=c[0];f.__originalOperationId=f.__originalOperationId||n.operationId,f.operationId=s}}if("parameters"!==e){var h=[],d={};for(var m in t)"produces"!==m&&"consumes"!==m&&"security"!==m||(d[m]=t[m],h.push(d));if(u&&(d.parameters=u,h.push(d)),h.length){var g,y=o()(h);try{for(y.s();!(g=y.n()).done;){var b=g.value;for(var w in b)if(n[w]){if("parameters"===w){var x,_=o()(b[w]);try{var E=function(){var e=x.value;n[w].some((function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e}))||n[w].push(e)};for(_.s();!(x=_.n()).done;)E()}catch(e){_.e(e)}finally{_.f()}}}else n[w]=b[w]}}catch(e){y.e(e)}finally{y.f()}}}};for(var c in i)s(c)}}return t.$$normalized=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return o})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return a})),n.d(t,"NEW_SPEC_ERR",(function(){return i})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return u})),n.d(t,"NEW_AUTH_ERR",(function(){return s})),n.d(t,"CLEAR",(function(){return c})),n.d(t,"CLEAR_BY",(function(){return l})),n.d(t,"newThrownErr",(function(){return f})),n.d(t,"newThrownErrBatch",(function(){return p})),n.d(t,"newSpecErr",(function(){return h})),n.d(t,"newSpecErrBatch",(function(){return d})),n.d(t,"newAuthErr",(function(){return m})),n.d(t,"clear",(function(){return v})),n.d(t,"clearBy",(function(){return g}));var r=n(134),o="err_new_thrown_err",a="err_new_thrown_err_batch",i="err_new_spec_err",u="err_new_spec_err_batch",s="err_new_auth_err",c="err_clear",l="err_clear_by";function f(e){return{type:o,payload:Object(r.serializeError)(e)}}function p(e){return{type:a,payload:e}}function h(e){return{type:i,payload:e}}function d(e){return{type:u,payload:e}}function m(e){return{type:s,payload:e}}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:l,payload:e}}},function(e,t,n){var r=n(31),o=n(38),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(101);e.exports=function(e){return Object(r(e))}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){var r=n(125),o=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=i),a(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){e.exports=n(809)},function(e,t,n){var r=n(161),o=n(101);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(44),o=n(317),a=n(46),i=n(162),u=Object.defineProperty;t.f=r?u:function(e,t,n){if(a(e),t=i(t),a(n),o)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(122),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(163);e.exports=function(e){if(r(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},function(e,t,n){var r=n(341),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){"use strict";function r(e){return null==e}var o={isNothing:r,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:r(e)?[]:[e]},repeat:function(e,t){var n,r="";for(n=0;nu&&(t=r-u+(a=" ... ").length),n-r>u&&(n=r+u-(i=" ...").length),{str:a+e.slice(t,n).replace(/\t/g,"→")+i,pos:r-t+a.length}}function c(e,t){return o.repeat(" ",t-e.length)+e}var l=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,a=[0],i=[],u=-1;n=r.exec(e.buffer);)i.push(n.index),a.push(n.index+n[0].length),e.position<=n.index&&u<0&&(u=a.length-2);u<0&&(u=a.length-1);var l,f,p="",h=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(u-l<0);l++)f=s(e.buffer,a[u-l],i[u-l],e.position-(a[u]-a[u-l]),d),p=o.repeat(" ",t.indent)+c((e.line-l+1).toString(),h)+" | "+f.str+"\n"+p;for(f=s(e.buffer,a[u],i[u],e.position,d),p+=o.repeat(" ",t.indent)+c((e.line+1).toString(),h)+" | "+f.str+"\n",p+=o.repeat("-",t.indent+h+3+f.pos)+"^\n",l=1;l<=t.linesAfter&&!(u+l>=i.length);l++)f=s(e.buffer,a[u+l],i[u+l],e.position-(a[u]-a[u+l]),d),p+=o.repeat(" ",t.indent)+c((e.line+l+1).toString(),h)+" | "+f.str+"\n";return p.replace(/\n$/,"")},f=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],p=["scalar","sequence","mapping"];var h=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===f.indexOf(t))throw new u('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===p.indexOf(this.kind))throw new u('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function d(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)})),n[t]=e})),n}function m(e){return this.extend(e)}m.prototype.extend=function(e){var t=[],n=[];if(e instanceof h)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new u("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof h))throw new u("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new u("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new u("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof h))throw new u("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(m.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=d(r,"implicit"),r.compiledExplicit=d(r,"explicit"),r.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),A=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var O=/^[-+]?[0-9]+e/;var C=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!A.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return n=e.toString(10),O.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),j=w.extend({implicit:[x,_,k,C]}),T=j,I=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var P=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==I.exec(e)||null!==N.exec(e))},construct:function(e){var t,n,r,o,a,i,u,s,c=0,l=null;if(null===(t=I.exec(e))&&(t=N.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,r,o));if(a=+t[4],i=+t[5],u=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(l=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(l=-l)),s=new Date(Date.UTC(n,r,o,a,i,u,c)),l&&s.setTime(s.getTime()-l),s},instanceOf:Date,represent:function(e){return e.toISOString()}});var M=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var D=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=R;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,a=R,i=0,u=[];for(t=0;t>16&255),u.push(i>>8&255),u.push(255&i)),i=i<<6|a.indexOf(r.charAt(t));return 0===(n=o%4*6)?(u.push(i>>16&255),u.push(i>>8&255),u.push(255&i)):18===n?(u.push(i>>10&255),u.push(i>>2&255)):12===n&&u.push(i>>4&255),new Uint8Array(u)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,a=e.length,i=R;for(t=0;t>18&63],r+=i[o>>12&63],r+=i[o>>6&63],r+=i[63&o]),o=(o<<8)+e[t];return 0===(n=a%3)?(r+=i[o>>18&63],r+=i[o>>12&63],r+=i[o>>6&63],r+=i[63&o]):2===n?(r+=i[o>>10&63],r+=i[o>>4&63],r+=i[o<<2&63],r+=i[64]):1===n&&(r+=i[o>>2&63],r+=i[o<<4&63],r+=i[64],r+=i[64]),r}}),L=Object.prototype.hasOwnProperty,B=Object.prototype.toString;var F=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,a,i=[],u=e;for(t=0,n=u.length;t>10),56320+(e-65536&1023))}for(var ae=new Array(256),ie=new Array(256),ue=0;ue<256;ue++)ae[ue]=re(ue)?1:0,ie[ue]=re(ue);function se(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||W,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ce(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=l(n),new u(t,n)}function le(e,t){throw ce(e,t)}function fe(e,t){e.onWarning&&e.onWarning.call(null,ce(e,t))}var pe={YAML:function(e,t,n){var r,o,a;null!==e.version&&le(e,"duplication of %YAML directive"),1!==n.length&&le(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&le(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),a=parseInt(r[2],10),1!==o&&le(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&fe(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,o;2!==n.length&&le(e,"TAG directive accepts exactly two arguments"),r=n[0],o=n[1],Y.test(r)||le(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,r)&&le(e,'there is a previously declared suffix for "'+r+'" tag handle'),G.test(o)||le(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){le(e,"tag prefix is malformed: "+o)}e.tagMap[r]=o}};function he(e,t,n,r){var o,a,i,u;if(t1&&(e.result+=o.repeat("\n",t-1))}function we(e,t){var n,r,o=e.tag,a=e.anchor,i=[],u=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,le(e,"tab characters must not be used in indentation")),45===r)&&ee(e.input.charCodeAt(e.position+1));)if(u=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)i.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,Ee(e,t,3,!1,!0),i.push(e.result),ge(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)le(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(g&&(i=e.line,u=e.lineStart,s=e.position),Ee(e,t,4,!0,o)&&(g?m=e.result:v=e.result),g||(me(e,p,h,d,m,v,i,u,s),d=m=v=null),ge(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)le(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===a?le(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?le(e,"repeat of an indentation width identifier"):(f=t+a-1,l=!0)}if(X(i)){do{i=e.input.charCodeAt(++e.position)}while(X(i));if(35===i)do{i=e.input.charCodeAt(++e.position)}while(!Z(i)&&0!==i)}for(;0!==i;){for(ve(e),e.lineIndent=0,i=e.input.charCodeAt(e.position);(!l||e.lineIndentf&&(f=e.lineIndent),Z(i))p++;else{if(e.lineIndent0){for(o=i,a=0;o>0;o--)(i=ne(u=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+i:le(e,"expected hexadecimal character");e.result+=oe(a),e.position++}else le(e,"unknown escape sequence");n=r=e.position}else Z(u)?(he(e,n,r,!0),be(e,ge(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ye(e)?le(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}le(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?g=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!ee(r)&&!te(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&le(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),H.call(e.anchorMap,n)||le(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var r,o,a,i,u,s,c,l,f=e.kind,p=e.result;if(ee(l=e.input.charCodeAt(e.position))||te(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(ee(r=e.input.charCodeAt(e.position+1))||n&&te(r)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,i=!1;0!==l;){if(58===l){if(ee(r=e.input.charCodeAt(e.position+1))||n&&te(r))break}else if(35===l){if(ee(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&ye(e)||n&&te(l))break;if(Z(l)){if(u=e.line,s=e.lineStart,c=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){i=!0,l=e.input.charCodeAt(e.position);continue}e.position=a,e.line=u,e.lineStart=s,e.lineIndent=c;break}}i&&(he(e,o,a,!1),be(e,e.line-u),o=a=e.position,i=!1),X(l)||(a=e.position+1),l=e.input.charCodeAt(++e.position)}return he(e,o,a,!1),!!e.result||(e.kind=f,e.result=p,!1)}(e,h,1===n)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||le(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(g=s&&we(e,d))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&le(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c"),null!==e.result&&p.kind!==e.kind&&le(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):le(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function Se(e){var t,n,r,o,a=e.position,i=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(i=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&le(e,"directive name must not be less than one character in length");0!==o;){for(;X(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!Z(o));break}if(Z(o))break;for(t=e.position;0!==o&&!ee(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==o&&ve(e),H.call(pe,n)?pe[n](e,n,r):fe(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):i&&le(e,"directives end mark is expected"),Ee(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&J.test(e.input.slice(a,e.position))&&fe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ye(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&r<=56319&&t+1=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function Ue(e){return/^\n* /.test(e)}function Ve(e,t,n,r,o,a,i,u){var s,c,l=0,f=null,p=!1,h=!1,d=-1!==r,m=-1,v=Be(c=qe(e,0))&&c!==je&&!Le(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!Le(e)&&58!==e}(qe(e,e.length-1));if(t||i)for(s=0;s=65536?s+=2:s++){if(!Be(l=qe(e,s)))return 5;v=v&&ze(l,f,u),f=l}else{for(s=0;s=65536?s+=2:s++){if(10===(l=qe(e,s)))p=!0,d&&(h=h||s-m-1>r&&" "!==e[m+1],m=s);else if(!Be(l))return 5;v=v&&ze(l,f,u),f=l}h=h||d&&s-m-1>r&&" "!==e[m+1]}return p||h?n>9&&Ue(e)?5:i?2===a?5:2:h?4:3:!v||i||o(e)?2===a?5:2:1}function We(e,t,n,r,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Ie.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(Ve(t,s,e.indent,i,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+He(t,e.indent)+$e(Re(function(e,t){var n,r,o=/(\n+)([^\n]*)/g,a=(u=e.indexOf("\n"),u=-1!==u?u:e.length,o.lastIndex=u,Je(e.slice(0,u),t)),i="\n"===e[0]||" "===e[0];var u;for(;r=o.exec(e);){var s=r[1],c=r[2];n=" "===c[0],a+=s+(i||n||""===c?"":"\n")+Je(c,t),i=n}return a}(t,i),a));case 5:return'"'+function(e){for(var t,n="",r=0,o=0;o=65536?o+=2:o++)r=qe(e,o),!(t=Te[r])&&Be(r)?(n+=e[o],r>=65536&&(n+=e[o+1])):n+=t||Pe(r);return n}(t)+'"';default:throw new u("impossible error: invalid scalar style")}}()}function He(e,t){var n=Ue(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function $e(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Je(e,t){if(""===e||" "===e[0])return e;for(var n,r,o=/ [^ ]/g,a=0,i=0,u=0,s="";n=o.exec(e);)(u=n.index)-a>t&&(r=i>a?i:u,s+="\n"+e.slice(a,r),a=r+1),i=u;return s+="\n",e.length-a>t&&i>a?s+=e.slice(a,i)+"\n"+e.slice(i+1):s+=e.slice(a),s.slice(1)}function Ke(e,t,n,r){var o,a,i,u="",s=e.tag;for(o=0,a=n.length;o tag resolver accepts not "'+c+'" style');r=s.represent[c](t,c)}e.dump=r}return!0}return!1}function Ge(e,t,n,r,o,a,i){e.tag=null,e.dump=n,Ye(e,n,!1)||Ye(e,n,!0);var s,c=Oe.call(e.dump),l=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var f,p,h="[object Object]"===c||"[object Array]"===c;if(h&&(p=-1!==(f=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(o=!1),p&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(h&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),"[object Object]"===c)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,i,s,c,l,f="",p=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new u("sortKeys must be a boolean or a function");for(o=0,a=h.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=De(e,t)),Ge(e,t+1,s,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",f+=l+=e.dump));e.tag=p,e.dump=f||"{}"}(e,t,e.dump,o),p&&(e.dump="&ref_"+f+e.dump)):(!function(e,t,n){var r,o,a,i,u,s="",c=e.tag,l=Object.keys(n);for(r=0,o=l.length;r1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ge(e,t,i,!1,!1)&&(s+=u+=e.dump));e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+f+" "+e.dump));else if("[object Array]"===c)r&&0!==e.dump.length?(e.noArrayIndent&&!i&&t>0?Ke(e,t-1,e.dump,o):Ke(e,t,e.dump,o),p&&(e.dump="&ref_"+f+e.dump)):(!function(e,t,n){var r,o,a,i="",u=e.tag;for(r=0,o=n.length;r",e.dump=s+" "+e.dump)}return!0}function Qe(e,t){var n,r,o=[],a=[];for(Ze(e,o,a),n=0,r=a.length;n=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,o("keys"),o("values"),o("entries")},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";(function(t){function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach((function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=o(e):n(e)?t[a]=r(e):t[a]=i({},e):t[a]=e})),t}function a(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,u=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach((function(s){"object"!=typeof s||null===s||Array.isArray(s)||Object.keys(s).forEach((function(c){return t=a(u,c),(e=a(s,c))===u?void 0:"object"!=typeof e||null===e?void(u[c]=e):Array.isArray(e)?void(u[c]=o(e)):n(e)?void(u[c]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(u[c]=i({},e)):void(u[c]=i(t,e))}))})),u}}).call(this,n(125).Buffer)},function(e,t,n){e.exports=n(595)},function(e,t,n){"use strict";var r=n(912),o=n(913);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var i=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),p=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(914);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),u=-1!==a&&a127?P+="x":P+=N[M];if(!P.match(h)){var D=T.slice(0,O),L=T.slice(O+1),B=N.match(d);B&&(D.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[_])for(O=0,I=l.length;O0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=E.slice(-1)[0],A=(n.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,O=0,C=E.length;C>=0;C--)"."===(k=E[C])?E.splice(C,1):".."===k?(E.splice(C,1),O++):O&&(E.splice(C,1),O--);if(!x&&!_)for(;O--;O)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var j,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=T?"":E.length?E.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(x=x||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",(function(){return h})),n.d(t,"AUTHORIZE",(function(){return d})),n.d(t,"LOGOUT",(function(){return m})),n.d(t,"PRE_AUTHORIZE_OAUTH2",(function(){return v})),n.d(t,"AUTHORIZE_OAUTH2",(function(){return g})),n.d(t,"VALIDATE",(function(){return y})),n.d(t,"CONFIGURE_AUTH",(function(){return b})),n.d(t,"RESTORE_AUTHORIZATION",(function(){return w})),n.d(t,"showDefinitions",(function(){return x})),n.d(t,"authorize",(function(){return _})),n.d(t,"authorizeWithPersistOption",(function(){return E})),n.d(t,"logout",(function(){return S})),n.d(t,"logoutWithPersistOption",(function(){return k})),n.d(t,"preAuthorizeImplicit",(function(){return A})),n.d(t,"authorizeOauth2",(function(){return O})),n.d(t,"authorizeOauth2WithPersistOption",(function(){return C})),n.d(t,"authorizePassword",(function(){return j})),n.d(t,"authorizeApplication",(function(){return T})),n.d(t,"authorizeAccessCodeWithFormParams",(function(){return I})),n.d(t,"authorizeAccessCodeWithBasicAuthentication",(function(){return N})),n.d(t,"authorizeRequest",(function(){return P})),n.d(t,"configureAuth",(function(){return M})),n.d(t,"restoreAuthorization",(function(){return R})),n.d(t,"persistAuthorizationIfNeeded",(function(){return D}));var r=n(18),o=n.n(r),a=n(30),i=n.n(a),u=n(20),s=n.n(u),c=n(82),l=n.n(c),f=n(25),p=n(5),h="show_popup",d="authorize",m="logout",v="pre_authorize_oauth2",g="authorize_oauth2",y="validate",b="configure_auth",w="restore_authorization";function x(e){return{type:h,payload:e}}function _(e){return{type:d,payload:e}}var E=function(e){return function(t){var n=t.authActions;n.authorize(e),n.persistAuthorizationIfNeeded()}};function S(e){return{type:m,payload:e}}var k=function(e){return function(t){var n=t.authActions;n.logout(e),n.persistAuthorizationIfNeeded()}},A=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,u=e.isValid,s=o.schema,c=o.name,l=s.get("flow");delete f.a.swaggerUIRedirectOauth2,"accessCode"===l||u||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:i()(a)}):n.authorizeOauth2WithPersistOption({auth:o,token:a})}};function O(e){return{type:g,payload:e}}var C=function(e){return function(t){var n=t.authActions;n.authorizeOauth2(e),n.persistAuthorizationIfNeeded()}},j=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,a=e.username,i=e.password,u=e.passwordType,c=e.clientId,l=e.clientSecret,f={grant_type:"password",scope:e.scopes.join(" "),username:a,password:i},h={};switch(u){case"request-body":!function(e,t,n){t&&s()(e,{client_id:t});n&&s()(e,{client_secret:n})}(f,c,l);break;case"basic":h.Authorization="Basic "+Object(p.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(u," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(p.b)(f),url:r.get("tokenUrl"),name:o,headers:h,query:{},auth:e})}};var T=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,a=e.name,i=e.clientId,u=e.clientSecret,s={Authorization:"Basic "+Object(p.a)(i+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(p.b)(c),name:a,url:r.get("tokenUrl"),auth:e,headers:s})}},I=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,u=t.clientSecret,s=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:i,client_secret:u,redirect_uri:n,code_verifier:s};return r.authorizeRequest({body:Object(p.b)(c),name:a,url:o.get("tokenUrl"),auth:t})}},N=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,u=t.clientSecret,s=t.codeVerifier,c={Authorization:"Basic "+Object(p.a)(i+":"+u)},l={grant_type:"authorization_code",code:t.code,client_id:i,redirect_uri:n,code_verifier:s};return r.authorizeRequest({body:Object(p.b)(l),name:a,url:o.get("tokenUrl"),auth:t,headers:c})}},P=function(e){return function(t){var n,r=t.fn,a=t.getConfigs,u=t.authActions,c=t.errActions,f=t.oas3Selectors,p=t.specSelectors,h=t.authSelectors,d=e.body,m=e.query,v=void 0===m?{}:m,g=e.headers,y=void 0===g?{}:g,b=e.name,w=e.url,x=e.auth,_=(h.getConfigs()||{}).additionalQueryStringParams;if(p.isOAS3()){var E=f.serverEffectiveValue(f.selectedServer());n=l()(w,E,!0)}else n=l()(w,p.url(),!0);"object"===o()(_)&&(n.query=s()({},n.query,_));var S=n.toString(),k=s()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:S,method:"post",headers:k,query:v,body:d,requestInterceptor:a().requestInterceptor,responseInterceptor:a().responseInterceptor}).then((function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:i()(t)}):u.authorizeOauth2WithPersistOption({auth:x,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})})).catch((function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})}))}};function M(e){return{type:b,payload:e}}function R(e){return{type:w,payload:e}}var D=function(){return function(e){var t=e.authSelectors;if((0,e.getConfigs)().persistAuthorization){var n=t.authorized();localStorage.setItem("authorized",i()(n.toJS()))}}}},function(e,t,n){var r=n(884);e.exports=function(e){for(var t=1;tS;S++)if((h||S in x)&&(b=_(y=x[S],S,w),e))if(t)A[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:s.call(A,y)}else switch(e){case 4:return!1;case 7:s.call(A,y)}return f?-1:c||l?l:A}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},function(e,t,n){n(72);var r=n(587),o=n(38),a=n(89),i=n(70),u=n(123),s=n(35)("toStringTag");for(var c in r){var l=o[c],f=l&&l.prototype;f&&a(f)!==s&&i(f,s,c),u[c]=u.Array}},function(e,t,n){"use strict";n.r(t),n.d(t,"lastError",(function(){return M})),n.d(t,"url",(function(){return R})),n.d(t,"specStr",(function(){return D})),n.d(t,"specSource",(function(){return L})),n.d(t,"specJson",(function(){return B})),n.d(t,"specResolved",(function(){return F})),n.d(t,"specResolvedSubtree",(function(){return z})),n.d(t,"specJsonWithResolvedSubtrees",(function(){return U})),n.d(t,"spec",(function(){return V})),n.d(t,"isOAS3",(function(){return W})),n.d(t,"info",(function(){return H})),n.d(t,"externalDocs",(function(){return $})),n.d(t,"version",(function(){return J})),n.d(t,"semver",(function(){return K})),n.d(t,"paths",(function(){return Y})),n.d(t,"operations",(function(){return G})),n.d(t,"consumes",(function(){return Q})),n.d(t,"produces",(function(){return Z})),n.d(t,"security",(function(){return X})),n.d(t,"securityDefinitions",(function(){return ee})),n.d(t,"findDefinition",(function(){return te})),n.d(t,"definitions",(function(){return ne})),n.d(t,"basePath",(function(){return re})),n.d(t,"host",(function(){return oe})),n.d(t,"schemes",(function(){return ae})),n.d(t,"operationsWithRootInherited",(function(){return ie})),n.d(t,"tags",(function(){return ue})),n.d(t,"tagDetails",(function(){return se})),n.d(t,"operationsWithTags",(function(){return ce})),n.d(t,"taggedOperations",(function(){return le})),n.d(t,"responses",(function(){return fe})),n.d(t,"requests",(function(){return pe})),n.d(t,"mutatedRequests",(function(){return he})),n.d(t,"responseFor",(function(){return de})),n.d(t,"requestFor",(function(){return me})),n.d(t,"mutatedRequestFor",(function(){return ve})),n.d(t,"allowTryItOutFor",(function(){return ge})),n.d(t,"parameterWithMetaByIdentity",(function(){return ye})),n.d(t,"parameterInclusionSettingFor",(function(){return be})),n.d(t,"parameterWithMeta",(function(){return we})),n.d(t,"operationWithMeta",(function(){return xe})),n.d(t,"getParameter",(function(){return _e})),n.d(t,"hasHost",(function(){return Ee})),n.d(t,"parameterValues",(function(){return Se})),n.d(t,"parametersIncludeIn",(function(){return ke})),n.d(t,"parametersIncludeType",(function(){return Ae})),n.d(t,"contentTypeValues",(function(){return Oe})),n.d(t,"currentProducesFor",(function(){return Ce})),n.d(t,"producesOptionsFor",(function(){return je})),n.d(t,"consumesOptionsFor",(function(){return Te})),n.d(t,"operationScheme",(function(){return Ie})),n.d(t,"canExecuteScheme",(function(){return Ne})),n.d(t,"validateBeforeExecute",(function(){return Pe})),n.d(t,"getOAS3RequiredRequestBodyContentType",(function(){return Me})),n.d(t,"isMediaTypeSchemaPropertiesEqual",(function(){return Re}));var r=n(13),o=n.n(r),a=n(14),i=n.n(a),u=n(2),s=n.n(u),c=n(19),l=n.n(c),f=n(22),p=n.n(f),h=n(17),d=n.n(h),m=n(4),v=n.n(m),g=n(12),y=n.n(g),b=n(52),w=n.n(b),x=n(28),_=n.n(x),E=n(188),S=n.n(E),k=n(67),A=n.n(k),O=n(23),C=n.n(O),j=n(16),T=n(5),I=n(1),N=["get","put","post","delete","options","head","patch","trace"],P=function(e){return e||Object(I.Map)()},M=Object(j.a)(P,(function(e){return e.get("lastError")})),R=Object(j.a)(P,(function(e){return e.get("url")})),D=Object(j.a)(P,(function(e){return e.get("spec")||""})),L=Object(j.a)(P,(function(e){return e.get("specSource")||"not-editor"})),B=Object(j.a)(P,(function(e){return e.get("json",Object(I.Map)())})),F=Object(j.a)(P,(function(e){return e.get("resolved",Object(I.Map)())})),z=function(e,t){var n;return e.getIn(s()(n=["resolvedSubtrees"]).call(n,i()(t)),void 0)},q=function e(t,n){return I.Map.isMap(t)&&I.Map.isMap(n)?n.get("$$ref")?n:Object(I.OrderedMap)().mergeWith(e,t,n):n},U=Object(j.a)(P,(function(e){return Object(I.OrderedMap)().mergeWith(q,e.get("json"),e.get("resolvedSubtrees"))})),V=function(e){return B(e)},W=Object(j.a)(V,(function(){return!1})),H=Object(j.a)(V,(function(e){return De(e&&e.get("info"))})),$=Object(j.a)(V,(function(e){return De(e&&e.get("externalDocs"))})),J=Object(j.a)(H,(function(e){return e&&e.get("version")})),K=Object(j.a)(J,(function(e){var t;return l()(t=/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e)).call(t,1)})),Y=Object(j.a)(U,(function(e){return e.get("paths")})),G=Object(j.a)(Y,(function(e){if(!e||e.size<1)return Object(I.List)();var t=Object(I.List)();return e&&p()(e)?(p()(e).call(e,(function(e,n){if(!e||!p()(e))return{};p()(e).call(e,(function(e,r){var o;d()(N).call(N,r)<0||(t=t.push(Object(I.fromJS)({path:n,method:r,operation:e,id:s()(o="".concat(r,"-")).call(o,n)})))}))})),t):Object(I.List)()})),Q=Object(j.a)(V,(function(e){return Object(I.Set)(e.get("consumes"))})),Z=Object(j.a)(V,(function(e){return Object(I.Set)(e.get("produces"))})),X=Object(j.a)(V,(function(e){return e.get("security",Object(I.List)())})),ee=Object(j.a)(V,(function(e){return e.get("securityDefinitions")})),te=function(e,t){var n=e.getIn(["resolvedSubtrees","definitions",t],null),r=e.getIn(["json","definitions",t],null);return n||r||null},ne=Object(j.a)(V,(function(e){var t=e.get("definitions");return I.Map.isMap(t)?t:Object(I.Map)()})),re=Object(j.a)(V,(function(e){return e.get("basePath")})),oe=Object(j.a)(V,(function(e){return e.get("host")})),ae=Object(j.a)(V,(function(e){return e.get("schemes",Object(I.Map)())})),ie=Object(j.a)(G,Q,Z,(function(e,t,n){return v()(e).call(e,(function(e){return e.update("operation",(function(e){if(e){if(!I.Map.isMap(e))return;return e.withMutations((function(e){return e.get("consumes")||e.update("consumes",(function(e){return Object(I.Set)(e).merge(t)})),e.get("produces")||e.update("produces",(function(e){return Object(I.Set)(e).merge(n)})),e}))}return Object(I.Map)()}))}))})),ue=Object(j.a)(V,(function(e){var t=e.get("tags",Object(I.List)());return I.List.isList(t)?y()(t).call(t,(function(e){return I.Map.isMap(e)})):Object(I.List)()})),se=function(e,t){var n,r=ue(e)||Object(I.List)();return w()(n=y()(r).call(r,I.Map.isMap)).call(n,(function(e){return e.get("name")===t}),Object(I.Map)())},ce=Object(j.a)(ie,ue,(function(e,t){return _()(e).call(e,(function(e,t){var n=Object(I.Set)(t.getIn(["operation","tags"]));return n.count()<1?e.update("default",Object(I.List)(),(function(e){return e.push(t)})):_()(n).call(n,(function(e,n){return e.update(n,Object(I.List)(),(function(e){return e.push(t)}))}),e)}),_()(t).call(t,(function(e,t){return e.set(t.get("name"),Object(I.List)())}),Object(I.OrderedMap)()))})),le=function(e){return function(t){var n,r=(0,t.getConfigs)(),o=r.tagsSorter,a=r.operationsSorter;return v()(n=ce(e).sortBy((function(e,t){return t}),(function(e,t){var n="function"==typeof o?o:T.H.tagsSorter[o];return n?n(e,t):null}))).call(n,(function(t,n){var r="function"==typeof a?a:T.H.operationsSorter[a],o=r?S()(t).call(t,r):t;return Object(I.Map)({tagDetails:se(e,n),operations:o})}))}},fe=Object(j.a)(P,(function(e){return e.get("responses",Object(I.Map)())})),pe=Object(j.a)(P,(function(e){return e.get("requests",Object(I.Map)())})),he=Object(j.a)(P,(function(e){return e.get("mutatedRequests",Object(I.Map)())})),de=function(e,t,n){return fe(e).getIn([t,n],null)},me=function(e,t,n){return pe(e).getIn([t,n],null)},ve=function(e,t,n){return he(e).getIn([t,n],null)},ge=function(){return!0},ye=function(e,t,n){var r,o,a=U(e).getIn(s()(r=["paths"]).call(r,i()(t),["parameters"]),Object(I.OrderedMap)()),u=e.getIn(s()(o=["meta","paths"]).call(o,i()(t),["parameters"]),Object(I.OrderedMap)()),c=v()(a).call(a,(function(e){var t,r,o,a=u.get(s()(t="".concat(n.get("in"),".")).call(t,n.get("name"))),i=u.get(s()(r=s()(o="".concat(n.get("in"),".")).call(o,n.get("name"),".hash-")).call(r,n.hashCode()));return Object(I.OrderedMap)().merge(e,a,i)}));return w()(c).call(c,(function(e){return e.get("in")===n.get("in")&&e.get("name")===n.get("name")}),Object(I.OrderedMap)())},be=function(e,t,n,r){var o,a,u=s()(o="".concat(r,".")).call(o,n);return e.getIn(s()(a=["meta","paths"]).call(a,i()(t),["parameter_inclusions",u]),!1)},we=function(e,t,n,r){var o,a=U(e).getIn(s()(o=["paths"]).call(o,i()(t),["parameters"]),Object(I.OrderedMap)()),u=w()(a).call(a,(function(e){return e.get("in")===r&&e.get("name")===n}),Object(I.OrderedMap)());return ye(e,t,u)},xe=function(e,t,n){var r,o=U(e).getIn(["paths",t,n],Object(I.OrderedMap)()),a=e.getIn(["meta","paths",t,n],Object(I.OrderedMap)()),i=v()(r=o.get("parameters",Object(I.List)())).call(r,(function(r){return ye(e,[t,n],r)}));return Object(I.OrderedMap)().merge(o,a).set("parameters",i)};function _e(e,t,n,r){var o;t=t||[];var a=e.getIn(s()(o=["meta","paths"]).call(o,i()(t),["parameters"]),Object(I.fromJS)([]));return w()(a).call(a,(function(e){return I.Map.isMap(e)&&e.get("name")===n&&e.get("in")===r}))||Object(I.Map)()}var Ee=Object(j.a)(V,(function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]}));function Se(e,t,n){var r;t=t||[];var o=xe.apply(void 0,s()(r=[e]).call(r,i()(t))).get("parameters",Object(I.List)());return _()(o).call(o,(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(T.A)(t,{allowHashes:!1}),r)}),Object(I.fromJS)({}))}function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("in")===t}))}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("type")===t}))}function Oe(e,t){var n,r;t=t||[];var o=U(e).getIn(s()(n=["paths"]).call(n,i()(t)),Object(I.fromJS)({})),a=e.getIn(s()(r=["meta","paths"]).call(r,i()(t)),Object(I.fromJS)({})),u=Ce(e,t),c=o.get("parameters")||new I.List,l=a.get("consumes_value")?a.get("consumes_value"):Ae(c,"file")?"multipart/form-data":Ae(c,"formData")?"application/x-www-form-urlencoded":void 0;return Object(I.fromJS)({requestContentType:l,responseContentType:u})}function Ce(e,t){var n,r;t=t||[];var o=U(e).getIn(s()(n=["paths"]).call(n,i()(t)),null);if(null!==o){var a=e.getIn(s()(r=["meta","paths"]).call(r,i()(t),["produces_value"]),null),u=o.getIn(["produces",0],null);return a||u||"application/json"}}function je(e,t){var n;t=t||[];var r=U(e),a=r.getIn(s()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var u=t,c=o()(u,1)[0],l=a.get("produces",null),f=r.getIn(["paths",c,"produces"],null),p=r.getIn(["produces"],null);return l||f||p}}function Te(e,t){var n;t=t||[];var r=U(e),a=r.getIn(s()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var u=t,c=o()(u,1)[0],l=a.get("consumes",null),f=r.getIn(["paths",c,"consumes"],null),p=r.getIn(["consumes"],null);return l||f||p}}var Ie=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),o=C()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""},Ne=function(e,t,n){var r;return d()(r=["http","https"]).call(r,Ie(e,t,n))>-1},Pe=function(e,t){var n;t=t||[];var r=e.getIn(s()(n=["meta","paths"]).call(n,i()(t),["parameters"]),Object(I.fromJS)([])),o=!0;return p()(r).call(r,(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)})),o},Me=function(e,t){var n,r,o={requestBody:!1,requestContentType:{}},a=e.getIn(s()(n=["resolvedSubtrees","paths"]).call(n,i()(t),["requestBody"]),Object(I.fromJS)([]));return a.size<1||(a.getIn(["required"])&&(o.requestBody=a.getIn(["required"])),p()(r=a.getIn(["content"]).entrySeq()).call(r,(function(e){var t=e[0];if(e[1].getIn(["schema","required"])){var n=e[1].getIn(["schema","required"]).toJS();o.requestContentType[t]=n}}))),o},Re=function(e,t,n,r){var o;if((n||r)&&n===r)return!0;var a=e.getIn(s()(o=["resolvedSubtrees","paths"]).call(o,i()(t),["requestBody","content"]),Object(I.fromJS)([]));if(a.size<2||!n||!r)return!1;var u=a.getIn([n,"schema","properties"],Object(I.fromJS)([])),c=a.getIn([r,"schema","properties"],Object(I.fromJS)([]));return!!u.equals(c)};function De(e){return I.Map.isMap(e)?e:new I.Map}},function(e,t,n){"use strict";(function(t){var r=n(816),o=n(817),a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,i=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function c(e){return(e||"").toString().replace(s,"")}var l=[["#","hash"],["?","query"],function(e,t){return h(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function p(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||r);if("blob:"===e.protocol)o=new m(unescape(e.pathname),{});else if("string"===i)for(n in o=new m(e,{}),f)delete o[n];else if("object"===i){for(n in e)n in f||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function h(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function d(e,t){e=c(e),t=t||{};var n,r=i.exec(e),o=r[1]?r[1].toLowerCase():"",a=!!r[2],u=!!r[3],s=0;return a?u?(n=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(n=r[2]+r[4],s=r[2].length):u?(n=r[3]+r[4],s=r[3].length):n=r[4],"file:"===o?s>=2&&(n=n.slice(2)):h(o)?n=r[4]:o?a&&(n=n.slice(2)):s>=2&&h(t.protocol)&&(n=r[4]),{protocol:o,slashes:a||h(o),slashesCount:s,rest:n}}function m(e,t,n){if(e=c(e),!(this instanceof m))return new m(e,t,n);var a,i,s,f,v,g,y=l.slice(),b=typeof t,w=this,x=0;for("object"!==b&&"string"!==b&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),a=!(i=d(e||"",t=p(t))).protocol&&!i.slashes,w.slashes=i.slashes||a&&t.slashes,w.protocol=i.protocol||t.protocol||"",e=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||u.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!h(w.protocol)))&&(y[3]=[/(.*)/,"pathname"]);x=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),g[r]}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),o=y(r);return o.reduce((function(e,t){return p()({},e,n[t])}),t)}function w(e){return e.join(" ")}function x(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,u=t.properties,s=t.type,c=t.tagName,l=t.value;if("text"===s)return l;if(c){var f,h=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return x({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var m=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=u.className&&u.className.includes("token")?["token"]:[],y=u.className&&g.concat(u.className.filter((function(e){return!m.includes(e)})));f=p()({},u,{className:w(y)||void 0,style:b(u.className,Object.assign({},u.style,o),n)})}else f=p()({},u,{className:w(u.className)});var _=h(t.children);return d.a.createElement(c,v()({key:i},f),_)}}var _=/\n/g;function E(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,o=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,i=void 0===a?{}:a,u=e.startingLineNumber;return d.a.createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map((function(e,t){var o=t+n;return d.a.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:i,startingLineNumber:u}))}function S(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function k(e,t,n){var r,o={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return p()({},o,a)}function A(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,u=void 0===i?{}:i,s=e.className,c=void 0===s?[]:s,l=e.showLineNumbers,f=e.wrapLongLines,h="function"==typeof u?u(n):u;if(h.className=c,n&&a){var d=k(r,n,o);t.unshift(S(n,d))}return f&l&&(h.style=p()({},h.style,{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function O(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return A({children:e,lineNumber:t,lineNumberStyle:u,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:s})}function m(e,t){if(r&&t&&o){var n=k(u,t,i);e.unshift(S(t,n))}return e}function v(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?d(e,n,r):m(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(t.match(_)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&f.length+a,u={type:"text",value:"".concat(t,"\n")};if(0===o){var s=v(l.slice(p+1,h).concat(A({children:[u],className:e.properties.className})),i);f.push(s)}else if(o===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var c=A({children:[{type:"text",value:"".concat(t)}],className:e.properties.className});l.splice(h+1,0,c)}else{var d=v([u],i,e.properties.className);f.push(d)}}else{var m=v([u],i,e.properties.className);f.push(m)}})),p=h}h++};h .hljs-title":{color:"#88C0D0"},"hljs-keyword":{color:"#81A1C1"},"hljs-literal":{color:"#81A1C1"},"hljs-symbol":{color:"#81A1C1"},"hljs-number":{color:"#B48EAD"},"hljs-regexp":{color:"#EBCB8B"},"hljs-string":{color:"#A3BE8C"},"hljs-title":{color:"#8FBCBB"},"hljs-params":{color:"#D8DEE9"},"hljs-bullet":{color:"#81A1C1"},"hljs-code":{color:"#8FBCBB"},"hljs-emphasis":{fontStyle:"italic"},"hljs-formula":{color:"#8FBCBB"},"hljs-strong":{fontWeight:"bold"},"hljs-link:hover":{textDecoration:"underline"},"hljs-quote":{color:"#4C566A"},"hljs-comment":{color:"#4C566A"},"hljs-doctag":{color:"#8FBCBB"},"hljs-meta":{color:"#5E81AC"},"hljs-meta-keyword":{color:"#5E81AC"},"hljs-meta-string":{color:"#A3BE8C"},"hljs-attr":{color:"#8FBCBB"},"hljs-attribute":{color:"#D8DEE9"},"hljs-builtin-name":{color:"#81A1C1"},"hljs-name":{color:"#81A1C1"},"hljs-section":{color:"#88C0D0"},"hljs-tag":{color:"#81A1C1"},"hljs-variable":{color:"#D8DEE9"},"hljs-template-variable":{color:"#D8DEE9"},"hljs-template-tag":{color:"#5E81AC"},"abnf .hljs-attribute":{color:"#88C0D0"},"abnf .hljs-symbol":{color:"#EBCB8B"},"apache .hljs-attribute":{color:"#88C0D0"},"apache .hljs-section":{color:"#81A1C1"},"arduino .hljs-built_in":{color:"#88C0D0"},"aspectj .hljs-meta":{color:"#D08770"},"aspectj > .hljs-title":{color:"#88C0D0"},"bnf .hljs-attribute":{color:"#8FBCBB"},"clojure .hljs-name":{color:"#88C0D0"},"clojure .hljs-symbol":{color:"#EBCB8B"},"coq .hljs-built_in":{color:"#88C0D0"},"cpp .hljs-meta-string":{color:"#8FBCBB"},"css .hljs-built_in":{color:"#88C0D0"},"css .hljs-keyword":{color:"#D08770"},"diff .hljs-meta":{color:"#8FBCBB"},"ebnf .hljs-attribute":{color:"#8FBCBB"},"glsl .hljs-built_in":{color:"#88C0D0"},"groovy .hljs-meta:not(:first-child)":{color:"#D08770"},"haxe .hljs-meta":{color:"#D08770"},"java .hljs-meta":{color:"#D08770"},"ldif .hljs-attribute":{color:"#8FBCBB"},"lisp .hljs-name":{color:"#88C0D0"},"lua .hljs-built_in":{color:"#88C0D0"},"moonscript .hljs-built_in":{color:"#88C0D0"},"nginx .hljs-attribute":{color:"#88C0D0"},"nginx .hljs-section":{color:"#5E81AC"},"pf .hljs-built_in":{color:"#88C0D0"},"processing .hljs-built_in":{color:"#88C0D0"},"scss .hljs-keyword":{color:"#81A1C1"},"stylus .hljs-keyword":{color:"#81A1C1"},"swift .hljs-meta":{color:"#D08770"},"vim .hljs-built_in":{color:"#88C0D0",fontStyle:"italic"},"yaml .hljs-meta":{color:"#D08770"}},obsidian:{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#282b2e",color:"#e0e2e4"},"hljs-keyword":{color:"#93c763",fontWeight:"bold"},"hljs-selector-tag":{color:"#93c763",fontWeight:"bold"},"hljs-literal":{color:"#93c763",fontWeight:"bold"},"hljs-selector-id":{color:"#93c763"},"hljs-number":{color:"#ffcd22"},"hljs-attribute":{color:"#668bb0"},"hljs-code":{color:"white"},"hljs-class .hljs-title":{color:"white"},"hljs-section":{color:"white",fontWeight:"bold"},"hljs-regexp":{color:"#d39745"},"hljs-link":{color:"#d39745"},"hljs-meta":{color:"#557182"},"hljs-tag":{color:"#8cbbad"},"hljs-name":{color:"#8cbbad",fontWeight:"bold"},"hljs-bullet":{color:"#8cbbad"},"hljs-subst":{color:"#8cbbad"},"hljs-emphasis":{color:"#8cbbad"},"hljs-type":{color:"#8cbbad",fontWeight:"bold"},"hljs-built_in":{color:"#8cbbad"},"hljs-selector-attr":{color:"#8cbbad"},"hljs-selector-pseudo":{color:"#8cbbad"},"hljs-addition":{color:"#8cbbad"},"hljs-variable":{color:"#8cbbad"},"hljs-template-tag":{color:"#8cbbad"},"hljs-template-variable":{color:"#8cbbad"},"hljs-string":{color:"#ec7600"},"hljs-symbol":{color:"#ec7600"},"hljs-comment":{color:"#818e96"},"hljs-quote":{color:"#818e96"},"hljs-deletion":{color:"#818e96"},"hljs-selector-class":{color:"#A082BD"},"hljs-doctag":{fontWeight:"bold"},"hljs-title":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"}},"tomorrow-night":{"hljs-comment":{color:"#969896"},"hljs-quote":{color:"#969896"},"hljs-variable":{color:"#cc6666"},"hljs-template-variable":{color:"#cc6666"},"hljs-tag":{color:"#cc6666"},"hljs-name":{color:"#cc6666"},"hljs-selector-id":{color:"#cc6666"},"hljs-selector-class":{color:"#cc6666"},"hljs-regexp":{color:"#cc6666"},"hljs-deletion":{color:"#cc6666"},"hljs-number":{color:"#de935f"},"hljs-built_in":{color:"#de935f"},"hljs-builtin-name":{color:"#de935f"},"hljs-literal":{color:"#de935f"},"hljs-type":{color:"#de935f"},"hljs-params":{color:"#de935f"},"hljs-meta":{color:"#de935f"},"hljs-link":{color:"#de935f"},"hljs-attribute":{color:"#f0c674"},"hljs-string":{color:"#b5bd68"},"hljs-symbol":{color:"#b5bd68"},"hljs-bullet":{color:"#b5bd68"},"hljs-addition":{color:"#b5bd68"},"hljs-title":{color:"#81a2be"},"hljs-section":{color:"#81a2be"},"hljs-keyword":{color:"#b294bb"},"hljs-selector-tag":{color:"#b294bb"},hljs:{display:"block",overflowX:"auto",background:"#1d1f21",color:"#c5c8c6",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}},X=o()(Z),ee=function(e){return i()(X).call(X,e)?Z[e]:(console.warn("Request style '".concat(e,"' is not available, returning default instead")),Q)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Blob=t.FormData=void 0;const r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window;t.FormData=r.FormData,t.Blob=r.Blob,t.File=r.File},function(e,t){e.exports=!0},function(e,t){},function(e,t,n){var r=n(212),o=n(62).f,a=n(70),i=n(51),u=n(470),s=n(35)("toStringTag");e.exports=function(e,t,n,c){if(e){var l=n?e:e.prototype;i(l,s)||o(l,s,{configurable:!0,value:t}),c&&!r&&a(l,"toString",u)}}},function(e,t,n){var r=n(212),o=n(139),a=n(35)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:i?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){var r=n(639);e.exports=function(e){return null==e?"":r(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(108),o=n(48);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){e.exports=n(632)},function(e,t,n){e.exports=n(885)},function(e,t,n){"use strict";function r(e){return function(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?"json":null}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(628)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return a})),n.d(t,"UPDATE_MODE",(function(){return i})),n.d(t,"SHOW",(function(){return u})),n.d(t,"updateLayout",(function(){return s})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return f}));var r=n(5),o="layout_update_layout",a="layout_update_filter",i="layout_update_mode",u="layout_show";function s(e){return{type:o,payload:e}}function c(e){return{type:a,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.v)(e),{type:u,payload:{thing:e,shown:t}}}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.v)(e),{type:i,payload:{thing:e,mode:t}}}},function(e,t,n){var r=n(382),o=n(149),a=n(145),i=n(47),u=n(109),s=n(146),c=n(176),l=n(177),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(u(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||l(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(56);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(69);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r,o=n(46),a=n(206),i=n(209),u=n(144),s=n(321),c=n(204),l=n(165),f=l("IE_PROTO"),p=function(){},h=function(e){return" - - - - diff --git a/emass_client/eMASSRestOpenApi.yaml b/emass_client/eMASSRestOpenApi.yaml deleted file mode 100644 index 1f70f87..0000000 --- a/emass_client/eMASSRestOpenApi.yaml +++ /dev/null @@ -1,5698 +0,0 @@ -# eMass Rest Open API specification ---- -openapi: 3.0.3 -#------------------------------------------------------------------------------- -# I N F O - API metadata -#------------------------------------------------------------------------------- -info: - title: Enterprise Mission Assurance Support Service (eMASS) - description: | - The Enterprise Mission Assurance Support Service (eMASS) Representational State - Transfer (REST) Application Programming Interface (API) enables users to perform - assessments and complete actions associated with system records. - - The `emasser` is a command-line interface (CLI) tool that implements all of the - eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

- - Register CLI
- New users will need to register an API key with the eMASS development team prior to - accessing the site for the first time. The eMASS REST API requires a client certificate - (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client - certificate.

- - Every call to the eMASS REST API will require the use of the agreed upon public key - certificate and API key. The API key must be provided in the request header for all - endpoint calls (api-key). If the service receives an untrusted certificate or API key, a - 401 error response code will be returned along with an error message.

- - Available Request Headers:
- - - - - - - - - - - - - - - - - - - - -
keyExample ValueDescription
`api-key`api-key-provided-by-emassThis API key must be provided in the request header for all endpoint calls
`user-uid`USER.UID.KEYThis User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
- Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC -
- -
Approve API Client for Actionable Requests
- Users are required to log-in to eMASS and grant permissions for a client to update data - within eMASS on their behalf. This is only required for actionable requests (PUT, POST, - DELETE). The Registration Endpoint and all GET requests can be accessed without - completing this process with the correct permissions. Please note that leaving a field - parameter blank (for PUT/POST requests) has the potential to clear information in the - active eMASS records. - - To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - contact: - name: eMASS Tier III support - url: 'https://www.dcsa.mil/is/emass/' - email: disa.meade.id.mbx.emass-tier-iii-support@mail.mil - - version: 'v3.2' - -externalDocs: - description: eMASS New User Registration (requires CAC authentication) - url: 'https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf' -#------------------------------------------------------------------------------- -# S E R V E R S - Array of Server Objects which provide connectivity information -# to target servers. -#------------------------------------------------------------------------------- -servers: - - url: "http://localhost:4010" - description: Use localhost mock server - - url: "https://stoplight.io/mocks/mitre/emasser/32836028" - description: Use the hosted Prism mock server - #- dst: "what" -#------------------------------------------------------------------------------- -# T A G S - A list of tags used by the specification with additional metadata. -#------------------------------------------------------------------------------- -tags: - - name: Test - description: > - The Test Connection endpoint provides the ability to verify connection to the web service. - - name: Registration - description: > - The Registration endpoint provides the ability to register a certificate & obtain an API-key. - - name: Systems - description: | - The Systems endpoints provide the ability to view system information. - - **Notes** - - If a system is dual-policy enabled, the returned system details default to the RMF policy information unless otherwise specified for an individual system. - - Certain fields are instance specific and may not be returned in GET request. - - name: System Roles - description: | - The System Roles endpoints provides the ability to access user data assigned to systems. - - **Notes:** - - The endpoint can access three different role categories: PAC, CAC, and Other. - - If a system is dual-policy enabled, the returned system role information will default to the RMF policy information unless otherwise specified. - - name: Controls - description: "The Controls endpoints provide the ability to view, add, and update - Security Control information to a system for both the Implementation Plan and - Risk Assessment." - - name: Test Results - description: > - The Test Results endpoints provide the ability to view and add test results for a system's - Assessment Procedures (CCIs) which determine Security Control compliance. - - name: POAM - description: > - The POA&Ms endpoints provide the ability to view, add, update, and remove Plan of Action - and Milestones (POA&M) items and associated milestones for a system. - - name: Milestones - description: > - The Milestones endpoints provide the ability to view, add, update, and remove milestones - that are associated with Plan of Action and Milestones (POA&M) items for a system. - - name: Artifacts - description: > - The Artifacts endpoints provide the ability to view, add, update, and remove artifacts - (supporting documentation/evidence) and associated files for a system. - - name: Artifacts Export - description: > - The Artifacts Export endpoint provides the ability to download artifact files for a system. - - name: CAC - description: | - The Control Approval Chain (CAC) endpoints provide the ability to view the status of - Security Controls and submit them to the second stage in the Control Approval Chain. - - **Notes:** - - POST requests will only yield successful results if the Security Control is at the - first stage of the CAC. If the control is not at the first stage, an error will be returned. - - name: PAC - description: | - The Package Approval Chain (PAC) endpoints provide the ability to view the status of - existing workflows and initiate new workflows for a system. - - **Notes:** - - If the indicated system has any active workflows, the response will include information - such as the workflow type and the current stage of each workflow. - - If there are no active workflows, then a null data member will be returned. - - name: CMMC Assessments - description: > - The Cybersecurity Maturity Model Certification (CMMC) Assessments endpoint provides the - ability to view CMMC assessment information. It is available to CMMC eMASS only. - - name: Static Code Scans - description: > - The Static Code Scans endpoint provides the ability to upload application scan findings - into a system's assets module. Application findings can also be cleared from the system. - - name: Workflow Definitions - description: > - The Workflow Definitions endpoint provides the ability to view all workflow schemas - available on the eMASS instance. Every transition for each workflow stage is included. - - name: Workflow Instances - description: > - The Workflow Instances endpoint provides the ability to view detailed information on - all active and historical workflows for a system. - -#------------------------------------------------------------------------------- -# P A T H S - The available paths and operations for the API endpoints -#------------------------------------------------------------------------------- -paths: - #---------------------------------------------------------------------------- - # Test endpoint - #---------------------------------------------------------------------------- - /api: - get: - tags: - - Test - summary: "Test connection to the API" - description: "Returns endpoint call status" - operationId: testConnection - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/Test" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Register endpoint - #---------------------------------------------------------------------------- - /api/api-key: - post: - tags: - - Registration - summary: "Register user certificate and obtain an API key" - description: "Returns the api-key - This API key must be provided in the request header for all endpoint calls (api-key)." - operationId: registerUser - requestBody: - description: "User certificate previously provided by eMASS." - content: - application/json: - schema: - "$ref": "#/components/schemas/RegisterUserRequestPostBody" - required: true - responses: - '200': - description: "Request has succeeded" - content: - application/json: - schema: - "$ref": "#/components/schemas/Register" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Systems endpoint - #---------------------------------------------------------------------------- - /api/systems: - get: - tags: - - Systems - summary: "Get system information" - description: "Returns all system(s) that match the query parameters" - operationId: getSystems - parameters: - - $ref: '#/components/parameters/includePackage' - - $ref: '#/components/parameters/registrationType' - - $ref: '#/components/parameters/ditprId' - - $ref: '#/components/parameters/coamsId' - - $ref: '#/components/parameters/policy' - - $ref: '#/components/parameters/includeDitprMetrics' - - $ref: '#/components/parameters/includeDecommissioned' - - $ref: '#/components/parameters/reportsForScorecard' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/SystemResponse" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - /api/systems/{systemId}: - get: - tags: - - Systems - summary: "Get system information for a specific system" - description: "Returns the system matching provided parameters" - operationId: getSystem - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/includePackage' - - $ref: '#/components/parameters/policy' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/SystemResponse" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # System Roles endpoint - #---------------------------------------------------------------------------- - /api/system-roles: - get: - tags: - - System Roles - summary: "Get available roles" - description: "Returns all available roles" - operationId: getSystemRoles - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/SystemRolesResponse" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - /api/system-roles/{roleCategory}: - get: - tags: - - System Roles - summary: "Get system roles" - description: "Returns the role(s) data matching parameters." - operationId: getSystemRolesByCategoryId - parameters: - - $ref: '#/components/parameters/roleCategory' - - $ref: '#/components/parameters/role' - - $ref: '#/components/parameters/policy' - - $ref: '#/components/parameters/includeDecommissioned' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/SystemRolesCategoryResponse" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Control endpoint - #---------------------------------------------------------------------------- - /api/systems/{systemId}/controls: - get: - tags: - - Controls - summary: "Get control information in a system for one or many controls" - description: |- - Returns system control information for matching `systemId` path parameter - operationId: getSystemControls - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/acronyms' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/ControlsResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - put: - tags: - - Controls - summary: "Update control information in a system for one or many controls" - description: |- - - Update a Control for given `systemId`
- - **Request Body Required Fields** - - `acronym` - - `responsibleEntities` - - `controlDesignation` - - `estimatedCompletionDate` - - `implementationNarrative` - - The following optional fields are required based on the Implementation Status `implementationStatus` value
- | Value | Required Fields - |--------------------------|--------------------------------------------------- - | Planned or Implemented | `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` - | Not Applicable | `naJustification`, `responsibleEntities` - | Manually Inherited | `commonControlProvider`, `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` - - If the Implementation Status `implementationStatus` value is "Inherited", only the following fields can be updated: - - `controlDesignation` - - `commonnControlProvider` - operationId: updateControlBySystemId - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "Update an existing control by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/ControlsRequestPutBody" - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - "$ref": "#/components/schemas/ControlsResponsePut" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Test Results endpoint - #---------------------------------------------------------------------------- - /api/systems/{systemId}/test-results: - get: - tags: - - Test Results - summary: "Get one or many test results in a system" - description: |- - Returns system test results information for matching parameters.
- operationId: getSystemTestResults - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/controlAcronyms' - - $ref: '#/components/parameters/ccis' - - $ref: '#/components/parameters/latestOnly' - responses: - '200': - description: "Successful Response" - content: - application/json: - schema: - "$ref": "#/components/schemas/TestResultsResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - post: - tags: - - Test Results - summary: "Add one or many test results in a system" - description: |- - Adds test results for given `systemId` - - **Request Body Required Fields** - - `cci` - - `testedBy` - - `testDate` - - `description` - - `complianceStatus` - - operationId: addTestResultsBySystemId - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "Update an existing control by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/TestResultsRequestPostBody" - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/TestResultsResponsePost" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # POA&Ms endpoint - #---------------------------------------------------------------------------- - /api/systems/{systemId}/poams: - get: - tags: - - POAM - summary: "Get one or many POA&M items in a system" - description: "Returns system(s) containing POA&M items for matching parameters." - operationId: getSystemPoams - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/scheduledCompletionDateStart' - - $ref: '#/components/parameters/scheduledCompletionDateEnd' - - $ref: '#/components/parameters/controlAcronyms' - - $ref: '#/components/parameters/ccis' - - $ref: '#/components/parameters/systemOnly' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - post: - tags: - - POAM - summary: "Add one or many POA&M items in a system" - description: |- - Add a POA&M for given `systemId`
- - **Request Body Required Fields** - - `status` - - `vulnerabilityDescription` - - `sourceIdentVuln` - - `pocOrganization` - - `resources` - - **Note**
- If a POC email is supplied, the application will attempt to locate a user already - registered within the application and pre-populate any information not explicitly supplied - in the request. If no such user is found, these fields are **required** within the request.
- `pocFirstName`, `pocLastName`, `pocPhoneNumber`
- operationId: addPoamBySystemId - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "Update an existing control by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamRequestPostBody" - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamResponsePost" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - put: - tags: - - POAM - summary: "Update one or many POA&M items in a system" - description: |- - Update a POA&M for given `systemId`
- - **Request Body Required Fields** - - `poamId` - - `displayPoamId` - - `status` - - `vulnerabilityDescription` - - `sourceIdentVuln` - - `pocOrganization` - - `reviewStatus` - - **Notes** - - If a POC email is supplied, the application will attempt to locate a user already - registered within the application and pre-populate any information not explicitly supplied - in the request. If no such user is found, these fields are **required** within the request.
- `pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`
- - - To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`. - operationId: updatePoamBySystemId - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "Update an existing control by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamRequestPutBody" - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamResponsePut" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - delete: - tags: - - POAM - summary: "Remove one or many POA&M items in a system" - description: |- - Remove the POA&M matching `systemId` path parameter and `poamId` query parameter
- operationId: deletePoam - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "Delete the given POA&M Id" - content: - application/json: - schema: - title: DeletePoam - type: object - required: - - poamId - additionalProperties: false - properties: - poamId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 45 - minimum: 1 - maximum: 300 - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamResponseDelete" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - /api/systems/{systemId}/poams/{poamId}: - get: - tags: - - POAM - summary: "Get POA&M item by ID in a system" - description: "Returns system(s) containing POA&M items for matching parameters." - operationId: getSystemPoamsByPoamId - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/poamId' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/PoamResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Milestones endpoint - #---------------------------------------------------------------------------- - /api/systems/{systemId}/poams/{poamId}/milestones: - get: - tags: - - Milestones - summary: "Get milestones in one or many POA&M items in a system" - description: |- - Returns system containing milestones for matching parameters. - operationId: getSystemMilestonesByPoamId - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/poamId' - - $ref: '#/components/parameters/scheduledCompletionDateStart' - - $ref: '#/components/parameters/scheduledCompletionDateEnd' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/MilestoneResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - post: - tags: - - Milestones - summary: "Add milestones to one or many POA&M items in a system" - description: |- - Adds a milestone for given `systemId` and `poamId` path parameters - - **Request Body Required Fields** - - `description` - - `scheduledCompletionDate` - - operationId: addMilestoneBySystemIdAndPoamId - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/poamId' - requestBody: - description: "Update an existing milestone" - content: - application/json: - schema: - "$ref": "#/components/schemas/MilestonesRequestPostBody" - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/MilestoneResponsePost" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - put: - tags: - - Milestones - summary: "Update one or many POA&M items in a system" - description: |- - Updates a milestone for given `systemId` and `poamId` path parameters - - **Request Body Required Fields** - - `milestoneId` - - `description` - - `scheduledCompletionDate` - operationId: updateMilestoneBySystemIdAndPoamId - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/poamId' - requestBody: - description: "Update an existing control by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/MilestonesRequestPutBody" - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - "$ref": "#/components/schemas/MilestoneResponsePut" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - delete: - tags: - - Milestones - summary: "Remove milestones in a system for one or many POA&M items" - description: |- - Remove the POA&M matching `systemId` path parameter
- **Notes**
- To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). - operationId: deleteMilestone - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/poamId' - requestBody: - description: "Delete the given Milestone Id" - content: - application/json: - schema: - title: DeleteMilestone - type: object - required: - - milestoneId - additionalProperties: false - properties: - milestoneId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 19 - minimum: 1 - maximum: 300 - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - #"$ref": "#/components/schemas/MilestonesDelete" - "$ref": "#/components/schemas/Empty200Response" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - /api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId}: - get: - tags: - - Milestones - summary: "Get milestone by ID in POA&M item in a system" - description: |- - Returns systems containing milestones for matching parameters. - operationId: getSystemMilestonesByPoamIdAndMilestoneId - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/poamId' - - $ref: '#/components/parameters/milestoneId' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/MilestoneResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Artifacts endpoint - #---------------------------------------------------------------------------- - /api/systems/{systemId}/artifacts: - get: - tags: - - Artifacts - summary: "Get one or many artifacts in a system" - description: |- - Returns selected artifacts matching parameters to include the file name containing the artifacts. - operationId: getSystemArtifacts - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/filename' - - $ref: '#/components/parameters/controlAcronyms' - - $ref: '#/components/parameters/ccis' - - $ref: '#/components/parameters/systemOnly' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/ArtifactsResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - post: - tags: - - Artifacts - summary: "Add one or many artifacts in a system" - description: |- - Information
- The request body of a POST request through the Artifact Endpoint accepts a single binary file - with file extension ".zip" only. This accepted .zip file should contain one or more files - corresponding to existing artifacts or new artifacts that will be created upon successful receipt. - Filename uniqueness throughout eMASS will be enforced by the API.

- Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact - existing within the application, the file associated with the artifact will be updated. If no artifact - is matched via filename to the application, a new artifact will be created with the following - default values. Any values not specified below will be blank. -
    -
  • isTemplate: false
  • -
  • type: other
  • -
  • category: evidence
  • -
- To update values other than the file itself, please submit a PUT request.
- - Zip file information
- Upload a zip file contain one or more files corresponding to existing artifacts - or new artifacts that will be created upon successful receipt.

- Business Rules
- Artifact cannot be saved if the file does not have the following file extensions: - - .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, - .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, - .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx - - Artifact version cannot be saved if an Artifact with the same file name already exist in the system. - - Artifact cannot be saved if the file size exceeds 30MB. - operationId: addArtifactsBySystemId - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "See `Information` posted above for additional instructions" - content: - multipart/form-data: - schema: - type: object - required: [Zipper] - properties: - isTemplate: - type: boolean - example: false - type: - type: string - enum: - - Procedure - - Diagram - - Policy - - Labor - - Document - - Image - - Other - - Scan Result - - Auditor Report - example: "Other" - category: - type: string - enum: - - Implementation Guidance - - Evidence - example: Evidence - Zipper: - type: string - format: binary - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/ArtifactsResponsePutPost" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - put: - tags: - - Artifacts - summary: "Update one or many artifacts in a system" - description: |- - Updates an artifact for given `systemId` path parameter

- - **Request Body Required Fields** - - `filename` - - `isTemplate` - - `type` - - `category` - - operationId: updateArtifactBySystemId - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "See `information` above for additional instructions" - content: - application/json: - schema: - "$ref": "#/components/schemas/ArtifactsRequestPutBody" - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - "$ref": "#/components/schemas/ArtifactsResponsePutPost" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - delete: - tags: - - Artifacts - summary: "Remove one or many artifacts in a system" - description: |- - Remove the Artifact(s) matching `systemId` path parameter and request body artifact(s) file name

- Note: - Multiple files can be deleted by providing multiple file names at the CL (comma delimited) - - Example: --files file1.txt, file2.txt - operationId: deleteArtifact - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "See notes above for additional information" - content: - application/json: - schema: - "$ref": "#/components/schemas/ArtifactsDelete" - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - "$ref": "#/components/schemas/ArtifactsResponseDel" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Artifacts Export endpoint - #---------------------------------------------------------------------------- - /api/systems/{systemId}/artifacts-export: - get: - tags: - - Artifacts Export - summary: "Get the file of an artifact in a system" - description: |- - Sample Responce
- Binary file associated with given filename.
- If `compress` parameter is specified, zip archive of binary file associated with given filename. - operationId: getSystemArtifactsExport - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/exportfilename' - - $ref: '#/components/parameters/compress' - responses: - '200': - description: "Successful retrieved Artifacts file" - content: - text/plain: - schema: - type: string - example: "The requested file contents" - application/octet-stream: - schema: - description: "Artifacts file ready for download" - type: string - format: binary - example: "Binary file content for given filename" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # CAC endpoints - #---------------------------------------------------------------------------- - /api/systems/{systemId}/approval/cac: - get: - tags: - - CAC - summary: "Get location of one or many controls in CAC" - description: |- - Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter - operationId: getSystemCac - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/controlAcronyms' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/CacResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - post: - tags: - - CAC - summary: "Submit control to second role of CAC" - description: |- - Adds a Control Approval Chain (CAC) for given `systemId` path parameter

- 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. - operationId: addSystemCac - parameters: - - $ref: '#/components/parameters/systemId' - requestBody: - description: "Update an existing Artifact by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/CacRequestPostBody" - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/CacResponsePost" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # PAC endpoints - #---------------------------------------------------------------------------- - /api/systems/{systemId}/approval/pac: - get: - tags: - - PAC - summary: "Get location of system package in PAC" - description: |- - Returns the location of a system's package in the Package Approval Chain (PAC) - for matching `systemId` path parameter - operationId: getSystemPac - parameters: - - $ref: '#/components/parameters/systemId' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/PacResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - post: - tags: - - PAC - summary: "Submit system package for review" - description: |- - Adds a Package Approval Chain (PAC) for given `systemId` path parameter - operationId: addSystemPac - parameters: - - $ref: "#/components/parameters/systemId" - requestBody: - description: "Update an existing Artifact by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/PacRequestPostBody" - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/PacResponsePost" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # CMMC Assessments endpoints - #---------------------------------------------------------------------------- - /api/cmmc-assessments: - get: - tags: - - CMMC Assessments - summary: "Get CMMC assessment information" - description: |- - Get all CMMC assessment after the given date `sinceDate` parameter. It is available - to CMMC eMASS only. - operationId: getCmmcAssessments - parameters: - - $ref: '#/components/parameters/sinceDate' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/CmmcResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Static Code Scans endpoints - #---------------------------------------------------------------------------- - /api/systems/{systemId}/static-code-scans: - post: - tags: - - Static Code Scans - summary: "Upload static code scans or Clear static code scans" - description: |- - Upload or clear application scan findings into a system's `systemId` assets module. - - **Note:** To clear an application's findings, use only the field `clearFindings` as - the Request body and set it to true. - operationId: addStaticCodeScansBySystemId - parameters: - - $ref: "#/components/parameters/systemId" - requestBody: - description: "Update an existing Artifact by Id" - content: - application/json: - schema: - "$ref": "#/components/schemas/StaticCodeRequestPostBody" - required: true - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/Success200Response" - '201': - description: "Created" - content: - application/json: - schema: - "$ref": "#/components/schemas/201" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '411': - description: "Length Required" - content: - application/json: - schema: - "$ref": "#/components/schemas/411" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Workflow Definitions endpoints - #---------------------------------------------------------------------------- - /api/workflow-definitions: - get: - tags: - - Workflow Definitions - summary: "Get workflow definitions in a site" - description: |- - View all workflow schemas available on the eMASS instance filtered by - status `includeInactive` and registration type `registrationType`. - operationId: getWorkflowDefinitions - parameters: - - $ref: '#/components/parameters/includeInactive' - - $ref: '#/components/parameters/registrationType' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/WorkflowDefinitionResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - #---------------------------------------------------------------------------- - # Workflow Instances endpoints - #---------------------------------------------------------------------------- - /api/systems/{systemId}/workflow-instances: - get: - tags: - - Workflow Instances - summary: "Get workflow instances in a system" - description: |- - View detailed information on all active and historical workflows for a system - `systemId` and filtered by provided parameters. - operationId: getSystemWorkflowInstances - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/includeComments' - - $ref: '#/components/parameters/pageIndex' - - $ref: '#/components/parameters/optionalSinceDate' - - $ref: '#/components/parameters/status' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/WorkflowInstancesResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - - /api/systems/{systemId}/workflow-instances/{workflowInstanceId}: - get: - tags: - - Workflow Instances - summary: "Get workflow instance by ID in a system" - description: |- - View detailed information on all active and historical workflows for a system - `systemId` and `workflowInstanceId`. - operationId: getSystemWorkflowInstancesByWorkflowInstanceId - parameters: - - $ref: '#/components/parameters/systemId' - - $ref: '#/components/parameters/workflowInstanceId' - responses: - '200': - description: "Successful response" - content: - application/json: - schema: - "$ref": "#/components/schemas/WorkflowInstancesResponseGet" - '400': - description: "Bad Request" - content: - application/json: - schema: - "$ref": "#/components/schemas/400" - '401': - description: "Unauthorized" - content: - application/json: - schema: - "$ref": "#/components/schemas/401" - '403': - description: "Forbidden" - content: - application/json: - schema: - "$ref": "#/components/schemas/403" - '404': - description: "Not Found" - content: - application/json: - schema: - "$ref": "#/components/schemas/404" - '405': - description: "Method Not Allowed" - content: - application/json: - schema: - "$ref": "#/components/schemas/405" - '490': - description: "API Rule Failed" - content: - application/json: - schema: - "$ref": "#/components/schemas/490" - '500': - description: "Internal Server Error" - content: - application/json: - schema: - "$ref": "#/components/schemas/500" - -#------------------------------------------------------------------------------- -# C O M P O N E N T S -#------------------------------------------------------------------------------- -components: - #---------------------------------------------------------------------------- - # Parameters - #---------------------------------------------------------------------------- - parameters: - #-------------------------------------------------------------------------- - # Path - #-------------------------------------------------------------------------= - roleCategory: - name: roleCategory - in: path - description: "**Role Category**: The system role category been queried" - required: true - schema: - type: string - enum: ["CAC","PAC","Other"] - default: "PAC" - systemId: - name: systemId - in: path - description: "**System Id**: The unique system record identifier." - required: true - schema: - type: integer - x-faker: random.number - example: 35 - poamId: - name: poamId - in: path - description: "**POA&M Id**: The unique POA&M record identifier." - required: true - schema: - type: integer - x-faker: random.number - example: 45 - milestoneId: - name: milestoneId - in: path - description: "**Milestone Id**: The unique milestone record identifier." - required: true - schema: - type: integer - x-faker: random.number - example: 77 - workflowInstanceId: - name: workflowInstanceId - in: path - description: "**Workflow Instance Id**: The unique milestone record identifier." - required: true - schema: - type: integer - x-faker: random.number - example: 123 - #-------------------------------------------------------------------------- - # Query - Required -------------------------------------------------------- - role: - name: role - in: query - description: "**Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA." - required: true - schema: - type: string - enum: ["AO","Auditor","Artifact Manager","C&A Team","IAO","ISSO","PM/IAM","SCA","User Rep", "Validator"] - default: "IAO" - exportfilename: - name: filename - in: query - required: true - description: "**File Name**: The file name (to include file-extension)." - schema: - type: string - example: ArtifactsExporFile.pdf - sinceDate: - name: sinceDate - in: query - required: true - description: "**Date** CMMC date (Unix date format)" - schema: - type: string - example: "1638764040" - #-------------------------------------------------------------------------- - # Query - Optional -------------------------------------------------------- - includePackage: - name: includePackage - in: query - description: "**Include Package**: Indicates if additional packages information is retrieved for queried system." - schema: - type: boolean - enum: [true, false] - default: true - registrationType: - name: registrationType - in: query - description: | - **Registration Type**: Filter record by selected registration type (single value or comma delimited values). - - *Available values:* assessAndAuthorize, assessOnly, guest, regular, - functional, cloudServiceProvider, commonControlProvider - schema: - type: string - default: "regular" - ditprId: - name: ditprId - in: query - description: "**DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR)." - schema: - type: string - coamsId: - name: coamsId - in: query - description: "**COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS)." - schema: - type: string - policy: - name: policy - in: query - description: "**System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information." - schema: - type: string - enum: ["diacap", "rmf", "reporting"] - default: "rmf" - acronyms: - name: acronyms - in: query - description: "**Acronym**: The system acronym(s) being queried (single value or comma delimited values)." - schema: - type: string - default: "PM-6" - includeDitprMetrics: - name: includeDitprMetrics - in: query - description: |- - **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:
-
    -
  • registrationType
  • -
  • policy
  • -
- schema: - type: boolean - enum: [true, false] - default: false - includeDecommissioned: - name: includeDecommissioned - in: query - description: "**Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems." - schema: - type: boolean - enum: [true, false] - default: true - reportsForScorecard: - name: reportsForScorecard - in: query - description: "**DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard." - schema: - type: boolean - enum: [true, false] - default: true - filename: - name: filename - in: query - description: "**File Name**: The file name (to include file-extension)." - schema: - type: string - example: ArtifactsExporFile.pdf - compress: - name: compress - in: query - description: "**Compress File**: Determines if returned file is compressed." - schema: - type: boolean - enum: [true, false] - default: true - controlAcronyms: - name: controlAcronyms - in: query - description: "**System Acronym**: Filter query by given system acronym (single or comma separated)." - schema: - type: string - ccis: - name: ccis - in: query - description: "**CCI System**: Filter query by Control Correlation Identifiers (CCIs)." - schema: - type: string - latestOnly: - name: latestOnly - in: query - description: "**Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated)." - schema: - type: boolean - enum: [true, false] - default: true - scheduledCompletionDateStart: - name: scheduledCompletionDateStart - in: query - description: "**Date Started**: Filter query by the scheduled completion start date (Unix date format)." - schema: - type: string - scheduledCompletionDateEnd: - name: scheduledCompletionDateEnd - in: query - description: "**Date Ended**: Filter query by the scheduled completion start date (Unix date format)." - schema: - type: string - systemOnly: - name: systemOnly - in: query - description: "**Systems Only**: Indicates that only system(s) information is retrieved." - schema: - type: boolean - enum: [true, false] - default: true - description: - name: description - in: query - description: "**Description**: Milestone description information." - schema: - type: string - scheduledCompletionDate: - name: scheduledCompletionDate - in: query - description: "**Completion Date**: Schedule completion date for milestone (Unix date format)." - schema: - type: string - includeInactive: - name: includeInactive - in: query - description: "**Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions." - schema: - type: boolean - enum: [true, false] - default: true - includeComments: - name: includeComments - in: query - description: | - **Include Comments**: If no value is specified, the default returns true to not include - transition comments. - - Note: Corresponds to the Comments textbox that is required at most workflow transitions. - Does not include other text input fields such as Terms / Conditions for Authorization. - - schema: - type: boolean - enum: [true, false] - default: true - pageIndex: - name: pageIndex - in: query - description: "**Page Index**: If no value is specified, the default returns true to not include transition comments." - schema: - type: integer - default: 0 - optionalSinceDate: - name: sinceDate - in: query - description: | - **Date**: Filter on authorization/assessment date (Unix date format). - - Note: Filters off the lastEditedDate field. - - Note: The authorization/assessment decisions on completed workflows - can be edited for up to 30 days after the initial decision is made. - schema: - type: string - example: "1638764040" - status: - name: status - in: query - description: | - **Status**: Filter by status. - - If no value is specified, the default returns all to include both active and inactive workflows. - - Note: Any workflows at a current stage of Complete or Cancelled are inactive. - Ongoing workflows currently at other stages are active. - schema: - type: string - enum: ["active", "inactive", "all"] - default: "all" - - #---------------------------------------------------------------------------- - # Schemas - #---------------------------------------------------------------------------- - schemas: - #---------------------------------------------------------------------------- - # Request Body for (POSTs & PUTs) - #---------------------------------------------------------------------------- - RegisterUserRequestPostBody: - required: [user-uid] - type: object - properties: - user-uid: - type: string - example: "MY.USERUUID.KEY" - ControlsRequestPutBody: - title: Controls Query Body - type: object - required: - - acronym - - responsibleEntities - - controlDesignation - - estimatedCompletionDate - - implementationNarrative - additionalProperties: false - properties: - acronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Required] Required to match the NIST SP 800-53 Revision 4." - example: "AC-3" - responsibleEntities: - type: string - description: "[Required] Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000." - x-faker: random.words - example: "Unknown" - implementationStatus: - type: string - description: "[Optional] Implementation Status of the Security Control for the information system." - example: "Planned" - enum: ["Planned", "Implemented", "Inherited", "Not Applicable", "Manually Inherited"] - commonControlProvider: - type: string - description: "[Conditional] Indicate the type of Common Control Provider for an “Inherited” Security Control." - example: "DoD" - enum: ["DoD", "Component", "Enclave"] - naJustification: - type: string - description: "[Conditional] Provide justification for Security Controls deemed Not Applicable to the system." - example: "System EOL within 120 days" - controlDesignation: - type: string - description: "[Required] Control designations" - example: "Common" - enum: ["Common", "System-Specific", "Hybrid"] - testMethod: - type: string - description: "[Optional] Identifies the assessment method / combination that will determine if the security requirements are implemented correctly." - example: "Test" - enum: ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine','Test, Interview, Examine'] - estimatedCompletionDate: - type: integer - description: "[Required] Field is required for Implementation Plan." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - implementationNarrative: - type: string - description: "[Required] Includes security control comments. Character Limit = 2,000." - x-faker: random.words - example: "Test Imp. Narrative" - slcmCriticality: - type: string - description: "[Conditional] Criticality of Security Control regarding SLCM. Character Limit = 2,000." - x-faker: random.word - example: "Test Criticality" - slcmFrequency: - type: string - description: "[Conditional] SLCM frequency" - example: "Annually" - enum: ["Constantly", "Daily", "Weekly", "Monthly", "Quarterly", "Semi-Annually", "Annually", "Every Two Years", "Every Three Years", "Undetermined"] - slcmMethod: - type: string - description: "[Conditional] SLCM method utilized" - example: "Automated" - enum: ["Automated", "Semi-Automated", "Manual", "Undetermined"] - slcmReporting: - type: string - description: "[Conditional] Method for reporting Security Control for SLCM. Character Limit = 2,000." - x-faker: random.word - example: "Test Reporting" - slcmTracking: - type: string - description: "[Conditional] How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000." - x-faker: random.word - example: "Test Tracking" - slcmComments: - type: string - description: "[Conditional] Additional comments for Security Control regarding SLCM. Character Limit = 4,000." - x-faker: random.word - example: "Test SLCM Comments" - severity: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - vulnerabiltySummary: - type: string - description: "[Optional] Include vulnerability summary. Character Limit = 2,000." - x-faker: random.words - example: "Test Vulnerability Summary" - recommendations: - type: string - description: "[Optional] Include recommendations. Character Limit = 2,000." - x-faker: random.words - example: "Test Recommendations" - relevanceOfThreat: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - likelihood: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - impact: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - impactDescription: - type: string - description: "[Optional] Include description of Security Control's impact." - x-faker: random.words - example: "Impact text" - residualRiskLevel: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - TestResultsRequestPostBody: - title: Test Results Query Body - type: object - required: - - cci - - testedBy - - testDate - - description - - complianceStatus - additionalProperties: false - properties: - cci: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Required] CCI associated with test result." - example: "000001,000002" - testedBy: - type: string - description: "[Required] Last Name, First Name. 100 Characters." - x-faker: name.findName - example: "Smith, Joe" - testDate: - type: integer - format: int64 - description: "[Required] Unix time format." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - description: - type: string - description: "[Required] Include description of test result. 4000 Characters." - x-faker: random.words - example: "Test result description" - complianceStatus: - type: string - description: "[Required] Test result compliance status" - example: "Compliant" - enum: ["Compliant", "Non-Compliant", "Not Applicable"] - PoamRequestPostBody: - title: POAM POST Query Body - type: object - required: - - status - - vulnerabilityDescription - - sourceIdentVuln - - pocOrganization - - resources - additionalProperties: false - "$ref": "#/components/schemas/PoamRequiredPost" - PoamRequestPutBody: - title: POAM PUT Query Body - type: object - required: - - poamId - - displayPoamId - - status - - vulnerabilityDescription - - sourceIdentVuln - - pocOrganization - - reviewStatus - additionalProperties: false - "$ref": "#/components/schemas/PoamRequiredPut" - MilestonesRequestPostBody: - title: Milestones POST Query Body - type: object - required: - - poamId - - description - - scheduledCompletionDate - additionalProperties: false - properties: - poamId: - type: integer - format: int64 - description: "[Required] Unique POA&M item identifier." - example: 45 - minimum: 1 - maximum: 300 - description: - type: string - description: "[Required] Provide a description of the milestone." - x-faker: random.words - example: "Description text" - scheduledCompletionDate: - type: integer - format: int64 - description: "[Required] Unix date format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - MilestonesRequestPutBody: - title: Milestones PUT Query Body - type: object - required: - - milestoneId - - description - - scheduledCompletionDate - additionalProperties: false - properties: - milestoneId: - type: integer - format: int64 - description: "[Required] Unique milestone identifier." - example: 19 - minimum: 1 - maximum: 300 - description: - type: string - description: "[Required] Provide a description of the milestone." - x-faker: random.words - example: "Description text" - scheduledCompletionDate: - type: integer - format: int64 - description: "[Required] Unix date format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - ArtifactsRequestPutBody: - title: Artifacts PUT Query Body - type: object - required: - - filename - - isTemplate - - type - - category - additionalProperties: false - properties: - # Required fields - filename: - type: string - description: "[Required] File name should match exactly one file within the provided zip file. 1000 Characters." - x-faker: system.commonFileName - example: "AutorizationGuidance.pdf" - isTemplate: - type: boolean - description: "[Required] Indicates it is an artifact template." - x-faker: random.boolean - example: false - type: - type: string - description: "[Required] Artifact type options" - example: "Policy" - enum: ["Procedure", "Diagram", "Policy", "Labor", "Document", "Image", "Other", "Scan Result"] - category: - type: string - description: "[Required] Artifact category options" - example: "Change Request" - enum: ["Implementation Guidance", "Evidence"] - # Optional fields - description: - type: string - description: "[Optional] Artifact description. 2000 Characters." - x-faker: random.words - example: "Artifact description text" - refPageNumber: - type: string - description: "[Optional] Artifact reference page number. 50 Characters." - x-faker: random.words - example: "Reference page number" - ccis: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Required] CCI associated with test result." - example: "000001,000002" - controls: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Optional] Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined." - example: "AC-8,AC-2(4)" - artifactExpirationDate: - type: integer - format: int64 - description: "[Optional] Date Artifact expires and requires review. In Unix Date format." - example: 1549036928 - minimum: 1500000000 - maximum: 1900000000 - lastReviewedDate: - type: integer - format: int64 - description: "[Optional]] Date Artifact was last reviewed.. Unix time format." - example: 1549036928 - minimum: 1500000000 - maximum: 1900000000 - CacRequestPostBody: - title: CAC POST Query Body - type: object - additionalProperties: false - properties: - controlAcronym: - type: string - description: "[Required] System acronym name." - x-faker: finance.bic - example: "AC-3" - comments: - type: string - description: "[Conditional] Control Approval Chain comments - 2000 Characters." - x-faker: random.words - example: "Control Approval Chain comments text." - PacRequestPostBody: - title: PAC POST Query Body - type: object - properties: - workflow: - type: string - description: "[Required] The PAC workflow" - example: "Assess and Authorize" - enum: ["Assess and Authorize", "Assess Only", "Security Plan Approval"] - name: - type: string - description: "[Required] Package name. 100 Characters." - x-faker: random.word - example: "Package name text" - comments: - type: string - description: "[Required] Character Limit = 4,000." - x-faker: random.words - example: "Comments text." - StaticCodeRequestPostBody: - title: Static Code PUT Query Body - type: object - additionalProperties: false - $ref: "#/components/schemas/StaticCodeRequiredPost" - - #---------------------------------------------------------------------------- - # Request Body supporting fields for (POSTs & PUTs) - #---------------------------------------------------------------------------- - PoamRequiredPost: - title: POAM POST Required Fields - type: object - additionalProperties: false - properties: - # Required fields - status: - type: string - description: "[Required] Values include the following: (Ongoing,Risk Accepted,Completed,Not Applicable" - example: "Completed" - enum: - - "Ongoing" - - "Risk Accepted" - - "Completed" - - "Not Applicable" - vulnerabilityDescription: - type: string - description: "[Required] Provide a description of the POA&M Item. 2000 Characters." - x-faker: random.words - example: "Description text" - sourceIdentVuln: - type: string - description: "[Required] Include Source Identifying Vulnerability text. 2000 Characters." - x-faker: random.words - example: "Source Indentifying Vulnerability text" - pocOrganization: - type: string - description: "[Required] Organization/Office represented. 100 Characters." - x-faker: company.companyName - example: "Army" - resources: - type: string - description: "[Required] List of resources used. 250 Characters." - x-faker: random.words - example: "Resource text." - # Optional/Required fields (REQ based on business rules) - pocFirstName: - type: string - description: "[Required] First name of POC. 100 Characters." - x-faker: name.firstName - example: "John" - pocLastName: - type: string - description: "[Required] Last name of POC. 100 Characters." - x-faker: name.lastName - example: "Smith" - pocEmail: - type: string - description: "[Required] Email address of POC. 100 Characters." - x-faker: internet.email - example: "smith@ah.com" - pocPhoneNumber: - type: string - description: "[Required] Phone number of POC (area code) ***-**** format. 100 Characters." - x-faker: phone.phoneNumber.email - example: "555-555-5555" - # Optional Fields - externalUid: - type: string - description: "[Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters." - x-faker: random.uuid - example: "d6d98b88-c866-4496-9bd4-de7ba48d0f52" - controlAcronym: - type: string - description: "[Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined." - x-faker: finance.bic - example: “AC-3” - cci: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Optional] CCI associated with POA&M." - example: "000001,000002" - securityChecks: - type: string - description: "[Optional] Security Checks that are associated with the POA&M." - x-faker: random.words - example: "SV-25123r1_rule,2016-A-0279" - rawSeverity: - type: string - description: "[Optional] Values include the following options (I,II,III)" - example: "I" - enum: - - "I" - - "II" - - "III" - relevanceOfThreat: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: - - "Very Low" - - "Low" - - "Moderate" - - "High" - - "Very High" - likelihood: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: - - "Very Low" - - "Low" - - "Moderate" - - "High" - - "Very High" - impact: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: - - "Very Low" - - "Low" - - "Moderate" - - "High" - - "Very High" - impactDescription: - type: string - description: "[Optional] Include description of Security Control’s impact." - x-faker: random.words - example: "Impact text" - residualRiskLevel: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: - - "Very Low" - - "Low" - - "Moderate" - - "High" - - "Very High" - recommendations: - type: string - description: "[Optional] Include recommendations. Character Limit = 2,000." - x-faker: random.words - example: "Recommendations text" - mitigation: - type: string - description: "[Optional] Include mitigation explanation. 2000 Characters." - x-faker: random.words - example: "Mitigation text" - # Conditional Fields - severity: - type: string - description: "[Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: - - "Very Low" - - "Low" - - "Moderate" - - "High" - - "Very High" - scheduledCompletionDate: - type: integer - format: int64 - description: "[Conditional] Required for ongoing and completed POA&M items. Unix time format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - comments: - type: string - description: "[Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters" - x-faker: random.words - example: "Comments text." - completionDate: - type: integer - format: int64 - description: "[Conditional] Field is required for completed POA&M items. Unix time format." - example: 1505916276 - minimum: 1500000000 - maximum: 1900000000 - milestones: - type: array - minimum: 1 - maxItems: 3 - items: - $ref: "#/components/schemas/MilestonesRequiredPost" - PoamRequiredPut: - title: POAM PUT Required Fields - type: object - additionalProperties: false - properties: - # Required fields - poamId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 45 - minimum: 1 - maximum: 300 - displayPoamId: - type: integer - format: int64 - description: "[Required] Globally unique identifier for individual POA&M Items, seen on the front-end as “ID”." - example: 100000010 - minimum: 100000000 - maximum: 101003239 - status: - type: string - description: "[Required] The POA&M status" - example: "Completed" - enum: ["Ongoing","Risk Accepted","Completed","Not Applicable"] - vulnerabilityDescription: - type: string - description: "[Required] Provide a description of the POA&M Item. 2000 Characters." - x-faker: random.words - example: "Description text" - sourceIdentVuln: - type: string - description: "[Required] Include Source Identifying Vulnerability text. 2000 Characters." - x-faker: random.words - example: "Source Indentifying Vulnerability text" - pocOrganization: - type: string - description: "[Required] Organization/Office represented. 100 Characters." - x-faker: company.companyName - example: "Army" - resources: - type: string - description: "[Required] List of resources used. 250 Characters." - x-faker: random.words - example: "Resource text." - # Optional Fields - externalUid: - type: string - description: "[Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters." - x-faker: random.uuid - example: "d6d98b88-c866-4496-9bd4-de7ba48d0f52" - controlAcronym: - type: string - description: "[Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined." - x-faker: finance.bic - example: “AC-3” - cci: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "CCI associated with POA&M." - example: "000001,000002" - securityChecks: - type: string - description: "[Optional] Security Checks that are associated with the POA&M." - x-faker: random.words - example: "SV-25123r1_rule,2016-A-0279" - rawSeverity: - type: string - description: "[Optional] Values include the following options (I,II,III)" - example: "I" - enum: ["I","II","III"] - relevanceOfThreat: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low","Low", "Moderate","High","Very High"] - likelihood: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low","Low", "Moderate","High","Very High"] - impact: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low","Low", "Moderate","High","Very High"] - impactDescription: - type: string - description: "[Optional] Include description of Security Control’s impact." - x-faker: random.words - example: "Impact text" - residualRiskLevel: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low","Low", "Moderate","High","Very High"] - recommendations: - type: string - description: "[Optional] Include recommendations. Character Limit = 2,000." - x-faker: random.words - example: "Recommendations text" - mitigation: - type: string - description: "[Optional] Include mitigation explanation. 2000 Characters." - x-faker: random.words - example: "Mitigation text" - # Conditional Fields - pocFirstName: - type: string - description: "[Conditional] First name of POC. 100 Characters." - x-faker: name.firstName - example: "John" - pocLastName: - type: string - description: "[Conditional] Last name of POC. 100 Characters." - x-faker: name.lastName - example: "Smith" - pocEmail: - type: string - description: "[Conditional] Email address of POC. 100 Characters." - x-faker: internet.email - example: "smith@ah.com" - pocPhoneNumber: - type: string - description: "[Conditional] Phone number of POC (area code) ***-**** format. 100 Characters." - x-faker: phone.phoneNumber.email - example: "555-555-5555" - severity: - type: string - description: "[Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low","Low", "Moderate","High","Very High"] - scheduledCompletionDate: - type: integer - format: int64 - description: "[Conditional] Required for ongoing and completed POA&M items. Unix time format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - completionDate: - type: integer - format: int64 - description: "[Conditional] Field is required for completed POA&M items. Unix time format." - example: 1505916276 - minimum: 1500000000 - maximum: 1900000000 - comments: - type: string - description: "[Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters" - x-faker: random.words - example: "Comments text." - isActive: - type: boolean - description: "[Conditional] Optionally used in PUT to delete milestones when updating a POA&M." - x-faker: random.boolean - example: true - milestones: - type: array - minimum: 1 - maxItems: 3 - items: - $ref: "#/components/schemas/MilestonesRequiredPut" - MilestonesRequiredPost: - title: Milestones - type: object - required: - - description - - scheduledCompletionDate - additionalProperties: false - properties: - description: - type: string - description: "[Required] Include milestone description." - x-faker: random.words - example: "Description text" - scheduledCompletionDate: - type: integer - format: int64 - description: "[Required] Required for ongoing and completed POA&M items. Unix time format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - MilestonesRequiredPut: - title: Milestones - type: object - required: - - milestoneId - - description - - scheduledCompletionDate - additionalProperties: false - properties: - milestoneId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 19 - minimum: 1 - maximum: 300 - description: - type: string - description: "[Required] Include milestone description." - x-faker: random.words - example: "Description text" - scheduledCompletionDate: - type: integer - format: int64 - description: "[Required] Shecdule completion date. Unix time format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - StaticCodeRequiredPost: - title: StaticCode - type: object - additionalProperties: false - properties: - application: - type: object - properties: - applicationName: - type: string - description: "[Required] Name of the software application that was assessed." - x-faker: company.companyName - example: 'Artemis' - version: - type: string - description: "[Required] The version of the application." - x-faker: system.semver - example: 'Version 5.0' - applicationFindings: - type: array - minimum: 1 - maxItems: 3 - items: - $ref: "#/components/schemas/StaticCodeApplication" - StaticCodeApplication: - title: Static Code Application POST object" - type: object - additionalProperties: false - properties: - rawSeverity: - type: string - description: "[Optional] Scan vulnerability ratting" - example: "Moderate" - enum: [Low, Medium, Moderate, High, Critical] - codeCheckName: - type: string - description: "[Required] Name of the software vulnerability or weakness." - example: "Hidden Field" - enum: ['Hidden Field', 'Redundant Check', 'Invalid Field', 'Vulnerable Field'] - count: - type: integer - format: int64 - description: "[Optional] Number of instances observed for a specified finding." - example: 14 - minimum: 1 - maximum: 50 - scanDate: - type: integer - format: int64 - description: "[Required] The date of the scan. Unix date format." - example: 1625070000 - minimum: 1500000000 - maximum: 1900000000 - cweId: - type: string - description: '[Required] The Common Weakness Enumerator (CWE) identifier.' - x-faker: number.number - example: '155' - clearFindings: - type: boolean - description: "[Optional] When used by itself, can clear out all application findings for a single application/version pairing." - x-faker: random.boolean - example: false - #---------------------------------------------------------------------------- - # 200 Responses - #---------------------------------------------------------------------------- - Test: - title: "api GET response schema" - type: object - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: object - additionalProperties: false - properties: - success: - type: boolean - x-faker: random.boolean - example: true - Register: - title: "api-key POST response schema" - type: object - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: object - additionalProperties: false - properties: - apikey: - type: string - x-faker: random.uuid - example: f32516cc-57d3-43f5-9e16-8f86780a4cce - SystemResponse: - title: "Systems GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/Systems" - SystemRolesResponse: - title: "Roles GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - items: - type: object - properties: - roleCategory: - type: string - x-faker: random.word - default: "PAC" - role: - type: string - x-faker: random.words - default: "PM/IAM" - SystemRolesCategoryResponse: - title: "Roles by category GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 4 - items: - $ref: "#/components/schemas/RoleCategory" - ControlsResponseGet: - title: "Controls GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 5 - items: - $ref: '#/components/schemas/ControlsGet' - ControlsResponsePut: - title: "Controls PUT response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/ControlsPut" - TestResultsResponseGet: - title: "Test Results GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 5 - items: - $ref: "#/components/schemas/TestResultsGet" - TestResultsResponsePost: - title: "Test Results POST response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/TestResultsPost" - PoamResponseGet: - title: "POAMS GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 5 - items: - $ref: "#/components/schemas/PoamGet" - PoamResponsePost: - title: "POAMS POST response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/PoamPost" - PoamResponsePut: - title: "POAMS PUT response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/PoamPut" - PoamResponseDelete: - title: "POAMS DELETE response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/PoamDelete" - MilestoneResponseGet: - title: "Milestones GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 10 - items: - $ref: "#/components/schemas/MilestonesGet" - MilestoneResponsePost: - title: "Milestones POST response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/MilestonesPost" - MilestoneResponsePut: - title: "Milestones PUT response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/MilestonesPut" - ArtifactsResponseGet: - title: "Artifacts GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 10 - type: array - items: - $ref: '#/components/schemas/ArtifactsGet' - ArtifactsResponseDel: - title: "Artifacts DELETE response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 1 - minItems: 1 - type: array - items: - additionalProperties: false - properties: - filename: - type: string - description: "[Required] File name should match exactly one file within the provided zip file. 1000 Characters." - x-faker: system.commonFileName - example: "AutorizationGuidance.pdf" - success: - type: boolean - x-faker: random.boolean - example: true - systemId: - type: integer - format: int64 - example: 35 - minimum: 1 - maximum: 3000 - ArtifactsResponsePutPost: - title: "Artifacts POST and PUT response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 1 - minItems: 1 - type: array - items: - type: object - additionalProperties: false - properties: - filename: - type: string - description: "[Required] File name should match exactly one file within the provided zip file. 1000 Characters." - x-faker: system.commonFileName - example: "AutorizationGuidance.pdf" - success: - type: boolean - x-faker: random.boolean - example: true - systemId: - type: integer - format: int64 - example: 35 - minimum: 1 - maximum: 3000 - CacResponseGet: - title: "CAC GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 10 - type: array - items: - $ref: '#/components/schemas/CacGet' - CacResponsePost: - title: "CAC POST response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 1 - minItems: 1 - type: array - items: - type: object - additionalProperties: false - properties: - controlAcronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Required] System acronym name." - example: "AC-3" - success: - type: boolean - x-faker: random.boolean - example: true - systemId: - type: integer - format: int64 - example: 35 - minimum: 1 - maximum: 3000 - PacResponseGet: - title: "PAC GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 10 - type: array - items: - $ref: '#/components/schemas/PacGet' - PacResponsePost: - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 1 - minItems: 1 - type: array - items: - $ref: '#/components/schemas/PacPost' - CmmcResponseGet: - title: "CMMC GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 2 - type: array - items: - $ref: '#/components/schemas/CmmcGet' - WorkflowDefinitionResponseGet: - title: "Workflow Definition GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 1 - type: array - items: - $ref: '#/components/schemas/WorkflowDefinitionGet' - WorkflowInstancesResponseGet: - title: "Workflow Instances GET response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 2 - type: array - items: - $ref: '#/components/schemas/WorkflowInstancesGet' - Success200Response: - title: "Default success response schema" - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/200" - data: - maxItems: 1 - minItems: 1 - type: array - items: - type: object - additionalProperties: false - properties: - - success: - type: boolean - x-faker: random.boolean - example: true - Empty200Response: - type: object - - #---------------------------------------------------------------------------- - # Supporting 200 Responses - Endpoint response - returned values - #---------------------------------------------------------------------------- - # System Response for both cases: - # (includeDitprMetrics=true) or (includePackage=true, includeDecommissioned=false) - Systems: - title: "Systems - return query from the server for the GET call" - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Read-only] Unique system record identifier." - example: 35 - minimum: 1 - maximum: 3000 - policy: - type: string - description: "[Read-only] RMF/DIACAP Policy identifier for the system record." - example: RMF - enum: ["RMF", "DIACAP"] - registrationType: - type: string - description: "[Read-Only] Registration types parameters (assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider.)" - example: "Assess and Authorize" - enum: ["Assess and Authorize", "Assess Only", "Guest", "Regular", "Functional", "Cloud Service Provider", "Common Control Provider"] - name: - type: string - description: "[Read-only] Name of the system record." - x-faker: company.companyName - example: "System XYZ" - acronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Read-only] Acronym of the system record." - example: "PM-6" - description: - type: string - description: "[Read-only] Description of the system record." - x-faker: random.words - example: "This is a test system for the eMASS API documentation" - systemOwner: - type: string - description: "[Read-only] Owning organization of the system record." - x-faker: company.companyName - example: "DISA" - organizationName: - type: string - description: "[Read-only] Name of the top-level component that owns the system (e.g. Navy, Air Force, Army, etc..)." - example: "Defense Information Systems Agency" - enum: ["Army", "Navy", "Air Force", "Marines", "DoD", "Defense Information Systems Agency"] - secondaryOrganization: - type: string - description: "[Read-only] Secondary organization that owns the system record (i.e. Sub-Organization-level." - x-faker: company.companyName - example: "ID31" - versionReleaseNo: - type: string - description: "[Read-only] Version/Release Number of system record." - x-faker: system.semver - example: "V1" - systemType: - type: string - description: "[Read-only] Type of the system record. RMF values include the following options (IS Major Application, IS Enclave, Platform IT System). DIACAP values include the following options (Platform IT, Interconnection, AIS Application)" - example: "IS Major Application" - enum: ["IS Major Application", "IS Enclave", "Platform IT", "Platform IT System", "Platform IT Interconnection", "AIS Application", "Outsourced IT-Based Process (DoD-controlled)", "Enclave", "Outsourced IT-Based Process (service provider shared)"] - isNSS: - type: boolean - description: "[Read-only] Is the system record a National Security System?" - x-faker: random.boolean - example: true - isPublicFacing: - type: boolean - description: "[Read-only] Does the system record have a public facing component/presence." - x-faker: random.boolean - example: true - coamsId: - type: integer - format: int64 - description: "[Read-only] Corresponding Cyber Operational Attributes Management System (COAMS) identifier for the system record." - example: 93054 - minimum: 40000 - maximum: 98536 - isTypeAuthorization: - type: boolean - description: "[Read-only] Identifies if system is a Type Authorization." - x-faker: random.boolean - example: true - ditprId: - type: string - pattern: '^\d{5}' - description: "[Read-only] DITPR ID of the system record." - example: "30498" - authorizationStatus: - type: string - description: "[Read-only] Authorization Status of the system record." - example: "Authority to Operate (ATO)" - enum: ["Authority to Operate (ATO)", "Authority to Operate with Conditions (ATO) w/Conditions)", - "Interim Authority to Test (IATT)", "Interim Authority to Operate (IATO)", - "Denied Authority to Operate (DATO)", "Not Yet Authorized", "Unaccredited", "Decommissioned"] - authorizationDate: - type: integer - description: "[Read-only] Authorization Date of the system record." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - authorizationTerminationDate: - type: integer - description: "[Read-only] Authorization Termination Date of the system record." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - authorizationLength: - type: integer - description: "[Read-only] Length of system’s Authorization. Calculated based off of Authorization Date & Authorization Termination Date." - example: 365 - minimum: 30 - maximum: 1825 - termsForAuth: - type: string - description: "[Read-only] Terms/Conditions for receiving and maintaining the system’s Authorization. Assigned by the Authorizing Official." - x-faker: company.bs - example: "Terms/Conditions to maintain a valid ATO" - securityPlanApprovalStatus: - type: string - description: "[Read-only] Status of the approval of the system’s RMF Security Plan. Values include the following options (Approved, Denied, Not Yet Approved)." - example: "Approved" - enum: ["Approved", "Not Yet Approved", "Denied"] - securityPlanApprovalDate: - type: integer - description: "[Read-only] Approval date of the system’s RMF Security Plan." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - missionCriticality: - type: string - description: "[Read-only] Mission Criticality of the system record. Values include the following options (Mission Critical (MC), Mission Essential (ME), Mission Support (MS)." - example: "Mission Support (MS)" - enum: ["Mission Critical (MC)", "Mission Essential (ME)", "Mission Support (MS)"] - geographicalAssociation: - type: string - description: "[Read-only] Geographical Association of the system record (VA only)." - example: "VA Operated IS" - enum: ["VA Operated IS", "non-VA Operated IS"] - systemOwnership: - type: string - description: "[Read-only] Ownership of the system record (VA only)." - example: "Region 1" - enum: ["Region 1", "Region 2", "Region 3", "Region 4"] - governingMissionArea: - type: string - description: "[Read-only] Governing Mission Area of the system record." - example: "DoD portion of the Intelligence MA (DIMA)" - enum: ["Business MA (BMA)", "DoD portion of the Intelligence MA (DIMA)", "Enterprise Information Environment MA (EIEMA)", "Warfighting MA (WMA)"] - primaryFunctionalArea: - type: string - description: "[Read-only] Primary functional area of the system record." - example: "Health/Medical" - enum: ["Allies", "CBRNE", "Civilian Personnel & Readiness", "Command and Control", "Communications", "Communications Security (COMSEC)", - "Economic", "Environmental Security", "Facilities", "Finance", "Health/Medical", "Human Resources", "Information Management", - "Inspector General", "Intelligence", "Logistics", "Military Personnel and Readiness", "Nuclear", "Nuclear, Chemical, and Biological", - "Operations", "Personnel and Readiness", "Procurement/Acquisition", "Reserve Components", "Scientific and Engineering", "Space and Weather", - "Test and Evaluation", "Trainers", "Weapons", "Legal", "Transportation", "Not Applicable (N/A)", "Integration and Testing"] - secondaryFunctionalArea: - type: string - description: "[Read-only] Secondary functional area of the system record." - example: "Logistics" - enum: ["Allies", "CBRNE", "Civilian Personnel & Readiness", "Command and Control", "Communications", "Communications Security (COMSEC)", - "Economic", "Environmental Security", "Facilities", "Finance", "Health/Medical", "Human Resources", "Information Management", - "Inspector General", "Intelligence", "Logistics", "Military Personnel and Readiness", "Nuclear", "Nuclear, Chemical, and Biological", - "Operations", "Personnel and Readiness", "Procurement/Acquisition", "Reserve Components", "Scientific and Engineering", "Space and Weather", - "Test and Evaluation", "Trainers", "Weapons", "Legal", "Transportation", "Not Applicable (N/A)", "Integration and Testing"] - primaryControlSet: - type: string - description: "[Read-only] Primary Control Set of the system record. RMF values include the following options (NIST SP 800-53 Revision 4), DIACAP values include the following options (DoDI 8500.2)" - example: "NIST SP 800-53 Revision 4" - enum: ["NIST SP 800-53 Revision 4", "DoDI 8500.2"] - confidentiality: - type: string - description: "[Read-only] Confidentiality of the system record. RMF values include the following options (High, Moderate, Low)" - example: "Low" - enum: ["High", "Moderate", "Low"] - integrity: - type: string - description: "[Read-only] Integrity of the system record. RMF values include the following options (High, Moderate, Low)" - example: "Moderate" - enum: ["High", "Moderate", "Low"] - availability: - type: string - description: "[Read-only] Availability of the system record. RMF values include the following options (High, Moderate, Low)" - example: "High" - enum: ["High", "Moderate", "Low"] - appliedOverlays: - type: string - description: "[Read-only] Overlays applied to the system record." - example: "Classified Information" - enum: ["Classified Information", "Privacy", "Cross Domain Solution (CDS)", "Financial Management", - "Intelligence", "Nuclear Command, Communication, Control Systems (NC3)", "Cloud Service Provider (CSP)"] - rmfActivity: - type: string - description: "[Read-only] RMF Activity of the system record." - example: "Maintain ATO and conduct reviews" - enum: ["Initiate and plan C&A", "Initiate and plan cybersecurity Assessment Authorization", - "Implement and validate assigned security controls", "Make assessment determination and authorization decision", - "Maintain ATO and conduct reviews", "Decommission"] - crossDomainTicket: - type: string - description: "[Read-only] Cross Domain Tickets of the system record." - x-faker: random.words - example: "Cross Domain Ticket test" - ditprDonId: - type: string - description: "[Read-Only] DITPR-DON identifier of the system record." - x-faker: random.alphaNumeric - example: "5910, 1234, 8765" - mac: - type: string - description: "[Read-Only] MAC level of the system record." - example: "II" - enum: [ "I", "II", "III"] - dodConfidentiality: - type: string - description: "[Read-Only] DoD Confidentiality level of the system record." - example: "Public" - enum: ["Public", "Sensitive", "Classified"] - contingencyPlanTested: - type: boolean - description: "[Read-only] Has the system record’s Contingency Plan been tested?" - x-faker: random.boolean - example: true - contingencyPlanTestDate: - type: integer - description: "[Read-only] Date the system record’s Contingency Plan was tested." - example: 1426957321 - minimum: 1500000000 - maximum: 1900000000 - securityReviewDate: - type: integer - description: "[Read-only] Date the system record’s Annual Security Review was conducted." - example: 1531958400 - minimum: 1500000000 - maximum: 1900000000 - hasOpenPoamItem: - type: boolean - description: "[Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item?" - x-faker: random.boolean - example: true - hasOpenPoamItem90to120PastScheduledCompletionDate: - type: boolean - description: "[Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item 90 to 120 days past its Scheduled Completion Date?" - x-faker: random.boolean - example: false - hasOpenPoamItem120PlusPastScheudledCompletionDate: - type: boolean - description: "[Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item 120 days past its Scheduled Completion Date?" - x-faker: random.boolean - example: false - impact: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["low", "Moderate", "High"] - hasCUI: - type: boolean - description: "[Read-only] Does the system record contain and/or process Controlled Unclassified information?" - x-faker: random.boolean - example: false - hasPII: - type: boolean - description: "[Read-only] Does the system record contain and/or process Personally Identifiable Information?" - x-faker: random.boolean - example: false - hasPHI: - type: boolean - description: "[Read-only] Does the system record contain and/or process Personal Health Information?" - x-faker: random.boolean - example: false - ppsmRegistryNumber: - type: string - description: "[Read-only] Unique identifier for the DoD’s Ports, Protocols, and Services Management Registry system." - x-faker: random.words - example: "Test PPSM Registry Number" - interconnectedInformationSystemAndIdentifiers: - type: string - description: "[Read-only] Identify the interconnected information systems and corresponding identifiers within control CA-3." - x-faker: random.word - example: "Test" - isPiaRequired: - type: boolean - description: "[Read-only] Does the system require a Privacy Impact Assessment?" - x-faker: random.boolean - example: true - piaStatus: - type: string - description: "[Read-only] Status of the PIA, availability values include the following options (Not Started, In Progress, Completed)" - example: "Not Started" - enum: ["Not Started", "In Progress", "Completed"] - piaDate: - type: integer - description: "[Read-only] Date in which the system’s PIA took place." - example: 1622048629 - minimum: 1500000000 - maximum: 1900000000 - userDefinedField1: - type: string - description: "[Read-only] User-defined field to augment Ad Hoc Reporting." - x-faker: random.words - example: "Test User-defined Field 1" - userDefinedField2: - type: string - description: "[Read-only] User-defined field to augment Ad Hoc Reporting." - x-faker: random.words - example: "Test User-defined Field 2" - userDefinedField3: - type: string - description: "[Read-only] User-defined field to augment Ad Hoc Reporting." - x-faker: random.words - example: "Test User-defined Field 3" - userDefinedField4: - type: string - description: "[Read-only] User-defined field to augment Ad Hoc Reporting." - x-faker: random.words - example: "Test User-defined Field 4" - userDefinedField5: - type: string - description: "[Read-only] User-defined field to augment Ad Hoc Reporting." - x-faker: random.words - example: "Test User-defined Field 5" - currentRmfLifecycleStep: - type: string - description: "[Read-only] Displays the system’s current step within the RMF Lifecycle." - example: "4 – Assess" - enum: ["1 – Categorize", "2 – Select", "3 – Implement", "4 – Assess", "5 – Authorize", "6 – Monitor"] - otherInformation: - type: string - description: "[Read-only] Include any additional information required by the organization." - x-faker: random.words - example: "Additional Comments" - reportsForScorecard: - type: boolean - description: "[Read-only] Indicates if the system reports to the DoD Cyber Hygiene Scorecard." - x-faker: random.boolean - example: true - package: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/PacGet" - connectivityCcsd: - type: array - maxItems: 2 - items: - $ref: "#/components/schemas/ConnectivityCcsd" - ConnectivityCcsd: - title: System CCSD Connectivity - type: object - additionalProperties: false - properties: - ccsdNumber: - type: string - description: "[Read-Only] Identifier for specific connections to the system." - x-faker: random.word - example: "CCSD Number" - connectivity: - type: string - description: "[Read-Only] Choose connection type for the system." - x-faker: random.word - example: "Test Connectivity" - RoleCategory: - title: System Roles Gategories - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Read-only] Unique system record identifier." - example: 35 - minimum: 1 - maximum: 3000 - systemName: - type: string - description: "[Read-only] Name of the system record." - example: "Test system 1" - enum: ["Test system 1", "Test system 2", "Test system 3", "Test system 4"] - systemAcronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Read-only] Acronym of the system record." - example: "S-XYZ" - roles: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/Roles" - Roles: - title: System Role - type: object - additionalProperties: false - properties: - roleCategory: - type: string - description: "[Required] System role categories" - example: "PAC" - enum: ["CAC","PAC","Other"] - role: - type: string - description: "[Required] System role description" - example: "AO" - enum: ["PM/IAM", "SCA", "AO", "ISSO", "IAO", "Validator (IV&V)", "User Rep (View Only)", "Auditor", "Artifact Manager","C&A Team"] - users: - type: array - maxItems: 1 - items: - $ref: "#/components/schemas/Users" - Users: - title: System role users - type: object - additionalProperties: false - properties: - firstName: - type: string - x-faker: name.firstName - example: "John" - lastName: - type: string - x-faker: name.lastName - example: "Smith" - email: - type: string - format: email - x-faker: internet.email - example: "John.Smith@hb.com" - ControlsGet: - title: Controls - server returned data from the GET call - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique system record identifier." - example: 35 - minimum: 1 - maximum: 3000 - name: - type: string - description: "[Read-only] Name of the system record." - x-faker: random.word - example: "System XYZ" - acronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Required] Acronym of the system record." - example: "AC-3" - ccis: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Read-only] Comma separated list of CCIs associated with the control." - example: "000001,000002" - isInherited: - type: boolean - description: "[Read-only] Indicates whether a control is inherited." - x-faker: random.boolean - example: true - modifiedByOverlays: - type: string - description: "[Read-only] List of overlays that affect the control." - example: "Requirements" - enum: ["Privacy", "Requirements", "Concurrency"] - includedStatus: - type: string - description: "[Read-only] Indicates the manner by which a control was included in the system’s categorization." - example: "Manually" - complianceStatus: - type: string - description: "[Read-only] Compliance of the control." - x-faker: random.word - example: "Status" - responsibleEntities: - type: string - description: "[Required] Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000." - example: "Unknown" - implementationStatus: - type: string - description: "[Optional] Implementation Status of the Security Control for the information system." - example: "Planned" - enum: ["Planned", "Implemented", "Inherited", "Not Applicable", "Manually Inherited"] - commonControlProvider: - type: string - description: "[Conditional] Indicate the type of Common Control Provider for an “Inherited” Security Control." - example: "DoD" - enum: ["DoD", "Component", "Enclave"] - naJustification: - type: string - description: "[Conditional] Provide justification for Security Controls deemed Not Applicable to the system." - example: "System EOL within 120 days" - controlDesignation: - type: string - description: "[Required] Control designations" - example: "Common" - enum: ["Common", "System-Specific", "Hybrid"] - estimatedCompletionDate: - type: integer - description: "[Required] Field is required for Implementation Plan." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - implementationNarrative: - type: string - description: "[Required] Includes security control comments. Character Limit = 2,000." - x-faker: random.words - example: "Test Imp. Narrative" - slcmCriticality: - type: string - description: "[Conditional] Criticality of Security Control regarding SLCM. Character Limit = 2,000." - x-faker: random.word - example: "Test Criticality" - slcmFrequency: - type: string - description: "[Conditional] SLCM frequency" - example: "Annually" - enum: ["Constantly", "Daily", "Weekly", "Monthly", "Quarterly", "Semi-Annually", "Annually", "Every Two Years", "Every Three Years", "Undetermined"] - slcmMethod: - type: string - description: "[Conditional] SLCM method utilized" - example: "Automated" - enum: ["Automated", "Semi-Automated", "Manual", "Undetermined"] - slcmReporting: - type: string - description: "[Conditional] Method for reporting Security Control for SLCM. Character Limit = 2,000." - x-faker: random.word - example: "Test Reporting" - slcmTracking: - type: string - description: "[Conditional] How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000." - x-faker: random.word - example: "Test Tracking" - slcmComments: - type: string - description: "[Conditional] Additional comments for Security Control regarding SLCM. Character Limit = 4,000." - x-faker: random.word - example: "Test SLCM Comments" - severity: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - vulnerabiltySummary: - type: string - description: "[Optional] Include vulnerability summary. Character Limit = 2,000." - x-faker: random.words - example: "Test Vulnerability Summary" - recommendations: - type: string - description: "[Optional] Include recommendations. Character Limit = 2,000." - x-faker: random.words - example: "Test Recommendations" - relevanceOfThreat: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - likelihood: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - impact: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - impactDescription: - type: string - description: "[Optional] Include description of Security Control’s impact." - x-faker: random.words - example: "Impact text" - residualRiskLevel: - type: string - description: "[Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - testMethod: - type: string - description: "[Optional] Identifies the assessment method / combination that will determine if the security requirements are implemented correctly." - example: "Test" - enum: ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine','Test, Interview, Examine'] - ControlsPut: - title: Controls - return query from the server for the PUT call - type: object - additionalProperties: false - properties: - acronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "Acronym of the system record." - example: "AC-3" - success: - type: boolean - description: "Indicates if operations result (success/fail)" - x-faker: random.boolean - example: true - systemId: - type: integer - format: int64 - description: "The system identifier for the system being updated." - example: 33 - minimum: 10 - maximum: 3000 - TestResultsGet: - title: Test Results - server returned data from the GET call - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique eMASS identifier. Will need to provide correct number" - example: 35 - minimum: 1 - maximum: 3000 - control: - type: string - description: "[Read-Only] Control acronym associated with the test result. NIST SP 800-53 Revision 4 defined." - x-faker: finance.bic - example: “AC-3” - cci: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Required] CCI associated with test result." - example: "000001,000002" - isInherited: - type: boolean - description: "[Read-only] Indicates whether a test result is inherited." - x-faker: random.boolean - example: true - testedBy: - type: string - description: "[Required] Last Name, First Name. 100 Characters." - x-faker: name.findName - example: "Smith, Joe" - testDate: - type: integer - format: int64 - description: "[Required] Unix time format." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - description: - type: string - description: "[Required] Include description of test result. 4000 Characters." - x-faker: random.words - example: "Test result description" - type: - type: string - description: "[Read-Only] Indicates the location in the Control Approval Chain when the test result is submitted." - example: "Self-Assessment" - enum: ["Self-Assessment", "Schedule-Assessment", "Deep Evaluation"] - complianceStatus: - type: string - description: "[Required] Test result compliance status" - example: "Compliant" - enum: ["Compliant", "Non-Compliant", "Not Applicable"] - TestResultsPost: - title: Test Results - return query from the server for the POST call - type: object - additionalProperties: false - properties: - cci: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "CCI associated with test result." - example: "000001,000002" - success: - type: boolean - description: "Indicates if operations result (success/fail)" - x-faker: random.boolean - example: true - systemId: - type: integer - format: int64 - description: "The system identifier for the system being updated." - example: 35 - minimum: 10 - maximum: 3000 - PoamGet: - title: POAM - return query from the server for the GET call - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique eMASS system identifier." - example: 830 - minimum: 1 - maximum: 3000 - poamId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 45 - minimum: 1 - maximum: 300 - displayPoamId: - type: integer - format: int64 - description: "[Required] Globally unique identifier for individual POA&M Items, seen on the front-end as “ID”." - example: 100000010 - minimum: 100000000 - maximum: 101003239 - isInherited: - type: boolean - description: "[Read-only] Indicates whether a test result is inherited." - x-faker: random.boolean - example: true - externalUid: - type: string - description: "[Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters." - x-faker: random.uuid - example: "d6d98b88-c866-4496-9bd4-de7ba48d0f52" - controlAcronyms: - type: string - description: "[Optional] System acronym name." - x-faker: finance.bic - example: “AC-3” - cci: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Optional] CCI associated with POA&M Item.." - example: "000001,000002" - status: - type: string - description: "[Required] Values include the following: (Ongoing,Risk Accepted,Completed,Not Applicable" - example: "Completed" - enum: ["Ongoing", "Risk Accepted", "Completed", "Not Applicable"] - reviewStatus: - type: string - description: "[Read-Only] Values include the following options: (Not Approved,Under Review,Approved)" - example: "Under Review" - enum: ["Not Approved", "Under Review", "Approved"] - vulnerabilityDescription: - type: string - description: "[Required] Provide a description of the POA&M Item. 2000 Characters." - x-faker: random.words - example: "Description text" - sourceIdentVuln: - type: string - description: "[Required] Include Source Identifying Vulnerability text. 2000 Characters." - x-faker: random.words - example: "Source Indentifying Vulnerability text" - securityChecks: - type: string - description: "[Optional] Security Checks that are associated with the POA&M." - x-faker: random.words - example: "SV-25123r1_rule,2016-A-0279" - milestones: - type: array - maxItems: 3 - items: - $ref: "#/components/schemas/MilestonesGet" - pocOrganization: - type: string - description: "[Required] Organization/Office represented. 100 Characters." - x-faker: company.companyName - example: "Army" - pocFirstName: - type: string - description: "[Conditional] First name of POC. 100 Characters." - x-faker: name.firstName - example: "John" - pocLastName: - type: string - description: "[Conditional] Last name of POC. 100 Characters." - x-faker: name.lastName - example: "Smith" - pocEmail: - type: string - description: "[Conditional] Email address of POC. 100 Characters." - x-faker: internet.email - example: "smith@ah.com" - pocPhoneNumber: - type: string - description: "[Conditional] Phone number of POC (area code) ***-**** format. 100 Characters." - x-faker: phone.phoneNumber.email - example: "555-555-5555" - severity: - type: string - description: "[Conditional] Required for approved items. Values include the following options (Very Low,Low,Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - rawSeverity: - type: string - description: "[Optional] Values include the following options (I,II,III)" - example: "I" - enum: ["I", "II", "III"] - relevanceOfThreat: - type: string - description: "[Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High)" - example: "Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - likelihood: - type: string - description: "[Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High)" - example: "Moderate" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - impact: - type: string - description: "[Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High)" - example: "High" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - impactDescription: - type: string - description: "[Optional] Include description of Security Control’s impact." - x-faker: random.words - example: "Impact Description text" - residualRiskLevel: - type: string - description: "[Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High)" - example: "Very Low" - enum: ["Very Low", "Low", "Moderate", "High", "Very High"] - recommendations: - type: string - description: "[Optional] Include recommendations. Character Limit = 2,000." - x-faker: random.words - example: "Recommendations text" - resources: - type: string - description: "[Required] List of resources used. 250 Characters." - x-faker: random.words - example: "Resource text." - scheduledCompletionDate: - type: integer - format: int64 - description: "[Conditional] Required for ongoing and completed POA&M items. Unix time format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - completionDate: - type: integer - format: int64 - description: "[Conditional] Field is required for completed POA&M items. Unix time format." - example: 1505916276 - minimum: 1500000000 - maximum: 1900000000 - extensionDate: - type: integer - format: int64 - description: > - [Read-Only] Value returned for a POA&M Item with review status - Approved” and has a milestone with a scheduled completion date - that extends beyond the POA&M Item’s scheduled completion date. - example: 1505916298 - minimum: 1500000000 - maximum: 1900000000 - comments: - type: string - description: "[Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters" - x-faker: random.words - example: "Comments text." - mitigation: - type: string - description: "[Optional] Include mitigation explanation. 2000 Characters." - x-faker: random.words - example: "Mitigation text" - isActive: - type: boolean - description: "[Conditional] Optionally used in PUT to delete milestones when updating a POA&M." - x-faker: random.boolean - example: true - PoamPost: - title: POAM - return query from the server for the POST call - type: object - additionalProperties: false - "$ref": "#/components/schemas/PoamPostPutDel" - PoamPut: - title: POAM - return query from the server for the PUT call - type: object - additionalProperties: false - "$ref": "#/components/schemas/PoamPostPutDel" - PoamDelete: - title: POAM - return query from the server for the DELETE call - type: object - additionalProperties: false - "$ref": "#/components/schemas/PoamPostPutDel" - PoamPostPutDel: - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "The system identifier for the system being updated." - example: 33 - minimum: 10 - maximum: 3000 - poamId: - type: integer - format: int64 - description: "The newly created POAM identifier" - example: 45 - minimum: 1 - maximum: 300 - externalUid: - type: string - description: "The unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters." - x-faker: random.uuid - example: "d6d98b88-c866-4496-9bd4-de7ba48d0f52" - success: - type: boolean - description: "Indicates if operations result (success/fail)" - x-faker: random.boolean - example: true - MilestonesGet: - title: Milestones - return query from the server for the GET call - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique eMASS system identifier." - example: 830 - minimum: 1 - maximum: 3000 - milestoneId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 19 - minimum: 1 - maximum: 300 - poamId: - type: integer - format: int64 - description: "[Required] Unique item identifier" - example: 45 - minimum: 1 - maximum: 300 - description: - type: string - description: "[Required] Include milestone description." - x-faker: random.words - example: "Description text" - scheduledCompletionDate: - type: integer - format: int64 - description: "[Required] Required for ongoing and completed POA&M items. Unix time format." - example: 1599644800 - minimum: 1500000000 - maximum: 1900000000 - reviewStatus: - type: string - description: "[Read-Only] Values include the following options: (Not Approved,Under Review,Approved)" - example: "Under Review" - enum: ["Not Approved", "Under Review", "Approved"] - MilestonesPost: - title: Milestones - return query from the server for the POST call - type: object - additionalProperties: false - "$ref": "#/components/schemas/MilestonesPutPostDelete" - MilestonesPut: - title: Milestones - return query from the server for the PUT call - type: object - additionalProperties: false - "$ref": "#/components/schemas/MilestonesPutPostDelete" - MilestonesDelete: - title: Milestones - return query from the server for the DELETE call - type: object - additionalProperties: false - "$ref": "#/components/schemas/MilestonesPutPostDelete" - MilestonesPutPostDelete: - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "The system identifier that the POAM was added." - example: 35 - minimum: 10 - maximum: 3000 - poamId: - type: integer - format: int64 - description: "The newly created POAM identifier" - example: 45 - minimum: 1 - maximum: 300 - milestoneId: - type: integer - format: int64 - description: "The Milestone unique item identifier" - example: 77 - minimum: 1 - maximum: 300 - externalUid: - type: string - description: "The unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters." - x-faker: random.uuid - example: "d6d98b88-c866-4496-9bd4-de7ba48d0f52" - success: - type: boolean - description: "Indicates if operations result (success/fail)" - x-faker: random.boolean - example: true - ArtifactsGet: - title: Artifacts - return query from the server for the GET call - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique eMASS system identifier." - example: 35 - minimum: 1 - maximum: 3000 - filename: - type: string - description: "[Required] File name should match exactly one file within the provided zip file. 1000 Characters." - x-faker: system.commonFileName - example: "AutorizationGuidance.pdf" - isInherited: - type: boolean - description: "[Read-only] Indicates whether an artifact is inherited." - x-faker: random.boolean - example: true - isTemplate: - type: boolean - description: "[Read-only] Indicates whether an artifact template." - x-faker: random.boolean - example: false - type: - type: string - description: "[Required] Artifact type options" - example: "Policy" - enum: ["Procedure", "Diagram", "Policy", "Labor", "Document", "Image", "Other", "Scan Result", "Auditor Report"] - category: - type: string - description: "[Required] Artifact category options" - example: "Change Request" - enum: ["Implementation Guidance", "Evidence"] - description: - type: string - description: "[Optional] Artifact description. 2000 Characters." - x-faker: random.words - example: "Artifact description text" - refPageNumber: - type: string - description: "[Optional] Artifact reference page number. 50 Characters." - x-faker: random.words - example: "Reference page number" - ccis: - type: string - pattern: '^\d{5,6},\d{5,6}' - description: "[Optional] CCI associated with test result." - example: "000001,000002" - controls: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Optional] Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined." - example: "AC-8,AC-2(4)" - mimeContentType: - type: string - description: "[Read-Only] Standard MIME content type derived from file extension." - x-faker: system.mimeType - example: "application/zip" - fileSize: - type: string - description: "[Read-Only] File size of attached artifact." - x-faker: random.number - example: "4MB" - artifactExpirationDate: - type: integer - format: int64 - description: "[Optional] Date Artifact expires and requires review. In Unix Date format." - example: 1549036926 - minimum: 1500000000 - maximum: 1900000000 - lastReviewedDate: - type: integer - format: int64 - description: "[Conditional] Date Artifact was last reviewed.. Unix time format." - example: 1549036928 - minimum: 1500000000 - maximum: 1900000000 - ArtifactsDelete: - title: Artifacts - return query from the server for the DELETE call - type: array - maxItems: 4 - items: - type: object - additionalProperties: false - properties: - filename: - type: string - description: "[Required] File name should match exactly one file within the provided zip file. 1000 Characters." - x-faker: system.commonFileName - example: "AutorizationGuidance.pdf" - CacGet: - title: CAC - return query from the server for the GET call - type: object - additionalProperties: false - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique eMASS system identifier." - example: 35 - minimum: 1 - maximum: 3000 - controlAcronym: - type: string - pattern: '^[A-Z0-9-]{3,6}' - description: "[Required] System acronym name." - example: "AC-3" - complianceStatus: - type: string - description: "[Read-only] Compliance status of the control." - example: "Compliant" - enum: ["Compliant", "Not Compliant", "No Status", "Not Applicable"] - currentStageName: - type: string - description: "[Read-Only] Role in current stage." - x-faker: random.word - example: "SCA-V" - currentStage: - type: integer - description: "[Read-Only] Current step in the Control Approval Chain." - example: 2 - minimum: 1 - maximum: 20 - totalStages: - type: integer - description: "[Read-Only] Total number of steps in Control Approval Chain." - example: 2 - minimum: 1 - maximum: 10 - comments: - type: string - description: "[Conditional] Control Approval Chain comments - 2000 Characters." - x-faker: random.words - example: "Control Approval Chain comments text." - PacGet: - title: PAC - return query from the server for the GET call - type: object - properties: - systemId: - type: integer - format: int64 - description: "[Required] Unique eMASS system identifier." - example: 35 - minimum: 1 - maximum: 3000 - workflow: - type: string - description: "[Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval)" - example: "Assess and Authorize" - enum: ["Assess and Authorize", "Assess Only", "Security Plan Approval"] - name: - type: string - description: "[Required] Package name. 100 Characters." - x-faker: random.word - example: "Package name text" - currentStageName: - type: string - description: "[Read-Only] Name of the current stage in the active workflow." - x-faker: random.word - example: "SCA-R" - currentStage: - type: integer - description: "[Read-Only] Number of the current stage in the active workflow." - example: 4 - minimum: 2 - maximum: 20 - totalStages: - type: integer - description: "[Read-Only] Total number of stages in the active workflow." - example: 6 - minimum: 2 - maximum: 25 - daysAtCurrentStage: - type: integer - description: "[Read-Only] Indicates the number of days at current workflow stage." - example: 2 - minimum: 1 - maximum: 30 - comments: - type: string - description: "[Required] Comments related to package approval chain. Character Limit = 4,000." - x-faker: random.words - example: "Comments text." - PacPost: - title: PAC - return query from the server for the POST call - type: object - properties: - workflow: - type: string - description: "[Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval)" - example: "Assess and Authorize" - enum: ["Assess and Authorize", "Assess Only", "Security Plan Approval"] - success: - type: boolean - x-faker: random.boolean - example: true - systemId: - type: integer - format: int64 - example: 35 - minimum: 1 - maximum: 3000 - CmmcGet: - title: CMMC - return query from the server for the GET call - type: object - additionalProperties: false - properties: - operation: - type: string - description: "[Read-Only] Indicates the action that should be taken on the assessment record since the provided sinceDate." - example: "UPDATED" - enum: ["ADDED", "UPDATED", "DELETED"] - hqOrganizationName: - type: string - description: "[Read-Only] The name of the DIB Company." - x-faker: company.companyName - example: "Army" - duns: - type: string - description: "[Read-Only] The Data Universal Numbering System (DUNS) number." - x-faker: finance.account - example: "852159753" - uniqueEntityIdentifier: - type: string - description: "[Read-Only] The Unique Entity Identifier assigned to the DIB Company." - x-faker: finance.account - example: "9809123" - cageCodes: - type: string - description: "[Read-Only] The five position code(s) associated with the Organization Seeking Certification (OSC)." - example: "89ED9; 99D8B" - enum: ["89ED9; 99D8B", "34TH5; 23YH6", "75F8H; 2GH5I", "45RF9", "58H9L; 45UH8; 75F8H; 2GH5I"] - oscName: - type: string - description: "[Read-Only] The name of the Organization Seeking Certification." - x-faker: company.companyName - example: "UC Labs" - scope: - type: string - description: "[Read-Only] The scope of the OSC assessment." - example: "Enterprise" - enum: ["Enterprise", "Non-Enterprise"] - scopeDescription: - type: string - description: "[Read-Only] Brief description of the scope of the OSC assessment" - x-faker: random.words - example: "Assessment of UC's Lab" - awardedCMMCLevel: - type: string - description: "[Read-Only] The CMMC award level." - example: "Not Certified" - enum: ["Not Certified", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5"] - expirationDate: - type: integer - format: int64 - description: "[Read-Only] Expiration date of the awarded CMMC certification." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - certificateId: - type: string - description: "[Read-Only] Unique identifier for the assessment/certificate." - x-faker: random.uuid - example: "41b89528-a7a8-470a-90f4-c3fd1267d6f7" - modelVersion: - type: string - description: "[Read-Only] Version of the CMMC Model used as part of the assessment." - x-faker: system.semver - example: "1.12" - ssps: - maxItems: 4 - type: array - items: - $ref: '#/components/schemas/Ssps' - Ssps: - title: System Role - type: object - additionalProperties: false - properties: - sspName: - type: string - description: "[Read-Only] Name of the System Security Plan." - x-faker: company.companyName - example: "UC Lab" - sspVersion: - type: string - description: "[Read-Only] Version of the System Security Plan." - x-faker: system.semver - example: "4.3.0" - sspDate: - type: integer - format: int64 - description: "Date of the System Security Plan. Unix date format." - example: 1638741660 - minimum: 1500000000 - maximum: 1900000000 - WorkflowDefinitionGet: - title: Workflow Definition - return query from the server for the GET call - type: object - properties: - description: - type: string - description: "[Read-Only] Description of the workflow or the stage transition. For stage transitions, this matches the action dropdown that appears for PAC users." - x-faker: lorem.sentence - example: "The workflow description" - isActive: - type: boolean - description: "[Read-Only] Returns true if the workflow is available to the site." - x-faker: random.boolean - example: false - version: - type: string - description: "[Read-Only] Version of the workflow definition." - x-faker: system.semver - example: "4" - workflow: - type: string - description: "[Read-Only] The workflow type." - example: "RMF Step 1: Security Category" - enum: ["RMF Step 1: Security Category", "RMF Step 2: Security Category", "RMF Step 3: Security Category"] - stages: - maxItems: 2 - type: array - items: - $ref: '#/components/schemas/Stage' - Stage: - title: Workflow Definition Stage - type: object - additionalProperties: false - properties: - name: - type: string - description: "[Read-Only] Name of the stage." - example: "Not Started" - enum: ["Not Started","Categorize System","Submit Categorization","Approval","Complete"] - transitions: - maxItems: 4 - type: array - items: - $ref: '#/components/schemas/DefinitionTransitions' - DefinitionTransitions: - title: Workflow Definition Transition - type: object - additionalProperties: false - properties: - endStage: - type: string - description: "[Read-Only] The landing stage that is active after performing a transition." - example: "Submit Categorization" - enum: ["Categorize System","Submit Categorization","Cancelled","Cancel","Complete"] - description: - type: string - description: "[Read-Only] Description of the workflow or the stage transition. For stage transitions, this matches the action dropdown that appears for PAC users." - example: "Initiate Workflow" - enum: ["Initiate Workflow","Approve","Disapprove and Move Forward","Cancel","Deny"] - roles: - type: array - items: - type: string - example: ["PM/ISO", "System Admin", "eMASS System Admin", "ISSE", "ISSM", "IO"] - enum: ["PM/ISO", "System Admin", "eMASS System Admin", "ISSE", "ISSM", "IO","Other","Unknown"] - minItems: 1 - maxItems: 6 - WorkflowInstancesGet: - title: Workflow Instances - return query from the server for the GET call - type: object - properties: - createdDate: - type: integer - format: int64 - description: "[Read-Only] Date the workflow instance or the workflow transition was created." - example: 1636124623 - minimum: 1500000000 - maximum: 1900000000 - currentStage: - type: string - description: "[Read-Only] Name of the current stage." - example: "Echelon II" - enum: ["Echelon I","Echelon II","Echelon III","Categorize System","Submit Categorization","Approval","Cancel","Complete"] - lastEditedBy: - type: string - description: "[Read-Only] User that last acted on the workflow." - x-faker: internet.email - example: "john.doe.ctr@mail.mil" - lastEditedDate: - type: integer - format: int64 - description: "[Read-Only] Date the workflow was last acted on." - example: 1631130837 - minimum: 1500000000 - maximum: 1900000000 - packageName: - type: string - description: "[Read-Only] The package name." - example: "Test RMF Step 1 package" - enum: ["Test POA&M Approval","Test RMF Step 1 package","Test RMF Step 2 package","Test RMF Step 3 package"] - systemName: - type: string - description: "[Read-Only] The system name." - example: "Test system 1" - enum: ["Test system 1", "Test system 2", "Test system 3", "Test system 4"] - version: - type: string - description: "[Read-Only] Version of the workflow definition." - x-faker: system.semver - example: "4" - workflow: - type: string - description: "[Read-Only] The workflow type." - example: "RMF Step 1: Security Category" - enum: ["POA&M Approval", "RMF Step 1: Security Category", "RMF Step 2: Security Category", "RMF Step 3: Security Category"] - workflowInstanceId: - type: integer - format: int64 - description: "[Read-Only] Unique workflow instance identifier." - example: 35 - minimum: 10 - maximum: 3000 - transitions: - maxItems: 4 - type: array - items: - $ref: '#/components/schemas/InstancesTransitions' - InstancesTransitions: - title: Workflow Instances Transition - type: object - additionalProperties: false - properties: - comments: - type: string - description: "[Read-Only] Comments entered by the user when performing the transition." - example: "Approved the categorization" - enum: ["Approved the categorization","Submitted the categorization","Categorized the system as HMM","Selected POA&M Items"] - createdBy: - type: string - description: "[Read-Only] User that performed the workflow transition." - x-faker: internet.email - example: "john.doe.ctr@mail.mil" - createdDate: - type: integer - format: int64 - description: "[Read-Only] Date the workflow instance or the workflow transition was created." - example: 1636124623 - minimum: 1500000000 - maximum: 1900000000 - description: - type: string - description: "[Read-Only] Description of the stage transition. This matches the action dropdown that appears for PAC users." - example: "Submit New Package" - enum: ["Initiate Workflow","Approve","Submit New Package","Disapprove and Move Forward","Cancel","Deny"] - endStage: - type: string - description: "[Read-Only] The landing stage that is active after performing a transition." - example: "Submit Categorization" - enum: ["PM/ISO","Echelon I","Echelon II","Echelon III", "Categorize System","Submit Categorization","Approval","Complete"] - startStage: - type: string - description: "[Read-Only] The beginning stage that is active before performing a transition." - example: "Not Started" - enum: ["Not Started","PM/ISO","Categorize System","Submit Categorization","Approval","Deny"] - - #---------------------------------------------------------------------------- - # 400 Responses - #---------------------------------------------------------------------------- - 400Response: - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/400" - 404Response: - type: object - additionalProperties: false - properties: - meta: - "$ref": "#/components/schemas/404" - - #---------------------------------------------------------------------------- - # HTTP response status code values - #---------------------------------------------------------------------------- - "200": - title: OK - type: object - additionalProperties: false - properties: - code: - type: integer - format: int32 - minimum: 200 - maximum: 200 - default: 200 - "201": - title: "Created" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 201 - maximum: 201 - default: 201 - message: - type: string - default: "Request was fulfilled and resulted in on or more new resources being successfully created on the server." - "400": - title: "Bad Request" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 400 - maximum: 400 - default: 400 - errorMessage: - type: string - default: "Request could not be understood by the server due to incorrect syntax or an unexpected format" - "401": - title: "Unauthorized" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 401 - maximum: 401 - default: 401 - errorMessage: - type: string - default: "Request has failed to provide suitable authentication from the client" - "403": - title: "Forbidden" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 403 - maximum: 403 - default: 403 - errorMessage: - type: string - default: "Request was blocked by the application due to a lack of client permissions to the API or to a specific endpoint" - "404": - title: "Not Found" - type: object - additionalProperties: false - properties: - code: - type: integer - format: int32 - minimum: 404 - maximum: 404 - default: 404 - errorMessage: - type: string - default: "Request has failed because the URL provided in the request did not match any available endpoint locations" - "405": - title: "Method Not Allowed" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 405 - maximum: 405 - default: 405 - errorMessage: - type: string - default: "Request was made with a verb (GET, POST, etc.) that is not permitted for the endpoint" - "411": - title: "Length Required" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 411 - maximum: 411 - default: 411 - errorMessage: - type: string - default: "Request was of type POST and failed to provide the server information about the data/content length being submitted" - "490": - title: "API Rule Failed" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 490 - maximum: 490 - default: 490 - errorMessage: - type: string - default: "Request has failed because too much data was requested in a single batch. This error is specific to eMASS" - "500": - title: "Internal Server Error" - type: object - additionalProperties: false - properties: - meta: - type: object - properties: - code: - type: integer - format: int32 - minimum: 500 - maximum: 500 - default: 500 - errorMessage: - type: string - default: "Server encountered an unexpected condition which prevented it from fulfilling the request" - - #---------------------------------------------------------------------------- - # Schema for error response body - #---------------------------------------------------------------------------- - Error: - title: "ResponseDefaultError" - type: object - properties: - code: - type: string - message: - type: string - required: - - code - - message - - #---------------------------------------------------------------------------- - # Security schemes - #---------------------------------------------------------------------------- - securitySchemes: - apikey: - type: apiKey - in: header - name: api-key - description: > - The API key must be provided in the request header for all eMASS endpoint calls.

- **For connecting to a mock server, any value is acceptable, e.g., 123** - userid: - type: apiKey - in: header - name: user-uid - description: > - This User unique identifier key must be provided in the request header for all PUT, - POST, and DELETE endpoint calls.
- Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC.

- **For connecting to a mock server, any value is acceptable, e.g., 123** - mockType: - type: apiKey - in: header - name: Prefer - description: > - This header parameter is ony utilized when interacting with the mock server.
- Options are (enter in the **Value** textbox): - - For random response values `code=200, dynamic=true` - - For static response values `code=200` -#------------------------------------------------------------------------------- -# S E C U R I T Y -#------------------------------------------------------------------------------- -security: - - apikey: [] - - userid: [] - - mockType: [] -... diff --git a/emass_client/ruby_client/.gitignore b/emass_client/ruby_client/.gitignore deleted file mode 100644 index c021594..0000000 --- a/emass_client/ruby_client/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# - -*.gem -*.rbc -/.config -/coverage/ -/InstalledFiles -/pkg/ -/spec/reports/ -/spec/examples.txt -/test/tmp/ -/test/version_tmp/ -/tmp/ - -## Specific to RubyMotion: -.dat* -.repl_history -build/ - -## Documentation cache and generated files: -/.yardoc/ -/_yardoc/ -/doc/ -/rdoc/ - -## Environment normalization: -/.bundle/ -/vendor/bundle -/lib/bundler/man/ - -# for a library or gem, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# Gemfile.lock -# .ruby-version -# .ruby-gemset - -# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: -.rvmrc diff --git a/emass_client/ruby_client/.rspec b/emass_client/ruby_client/.rspec deleted file mode 100644 index 83e16f8..0000000 --- a/emass_client/ruby_client/.rspec +++ /dev/null @@ -1,2 +0,0 @@ ---color ---require spec_helper diff --git a/emass_client/ruby_client/.rubocop.yml b/emass_client/ruby_client/.rubocop.yml deleted file mode 100644 index 19a777e..0000000 --- a/emass_client/ruby_client/.rubocop.yml +++ /dev/null @@ -1,154 +0,0 @@ -# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) -# Automatically generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen) -AllCops: - TargetRubyVersion: 2.2 - # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop - # to ignore them, so only the ones explicitly set in this file are enabled. - DisabledByDefault: true - Exclude: - - '**/templates/**/*' - - '**/vendor/**/*' - - 'actionpack/lib/action_dispatch/journey/parser.rb' - -# Prefer &&/|| over and/or. -Style/AndOr: - Enabled: true - -# Do not use braces for hash literals when they are the last argument of a -# method call. -Style/BracesAroundHashParameters: - Enabled: true - EnforcedStyle: context_dependent - -# Align `when` with `case`. -Layout/CaseIndentation: - Enabled: true - -# Align comments with method definitions. -Layout/CommentIndentation: - Enabled: true - -Layout/ElseAlignment: - Enabled: true - -Layout/EmptyLineAfterMagicComment: - Enabled: true - -# In a regular class definition, no empty lines around the body. -Layout/EmptyLinesAroundClassBody: - Enabled: true - -# In a regular method definition, no empty lines around the body. -Layout/EmptyLinesAroundMethodBody: - Enabled: true - -# In a regular module definition, no empty lines around the body. -Layout/EmptyLinesAroundModuleBody: - Enabled: true - -Layout/FirstParameterIndentation: - Enabled: true - -# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. -Style/HashSyntax: - Enabled: false - -# Method definitions after `private` or `protected` isolated calls need one -# extra level of indentation. -Layout/IndentationConsistency: - Enabled: true - EnforcedStyle: rails - -# Two spaces, no tabs (for indentation). -Layout/IndentationWidth: - Enabled: true - -Layout/LeadingCommentSpace: - Enabled: true - -Layout/SpaceAfterColon: - Enabled: true - -Layout/SpaceAfterComma: - Enabled: true - -Layout/SpaceAroundEqualsInParameterDefault: - Enabled: true - -Layout/SpaceAroundKeyword: - Enabled: true - -Layout/SpaceAroundOperators: - Enabled: true - -Layout/SpaceBeforeComma: - Enabled: true - -Layout/SpaceBeforeFirstArg: - Enabled: true - -Style/DefWithParentheses: - Enabled: true - -# Defining a method with parameters needs parentheses. -Style/MethodDefParentheses: - Enabled: true - -Style/FrozenStringLiteralComment: - Enabled: false - EnforcedStyle: always - -# Use `foo {}` not `foo{}`. -Layout/SpaceBeforeBlockBraces: - Enabled: true - -# Use `foo { bar }` not `foo {bar}`. -Layout/SpaceInsideBlockBraces: - Enabled: true - -# Use `{ a: 1 }` not `{a:1}`. -Layout/SpaceInsideHashLiteralBraces: - Enabled: true - -Layout/SpaceInsideParens: - Enabled: true - -# Check quotes usage according to lint rule below. -#Style/StringLiterals: -# Enabled: true -# EnforcedStyle: single_quotes - -# Detect hard tabs, no hard tabs. -Layout/Tab: - Enabled: true - -# Blank lines should not have any spaces. -Layout/TrailingBlankLines: - Enabled: true - -# No trailing whitespace. -Layout/TrailingWhitespace: - Enabled: false - -# Use quotes for string literals when they are enough. -Style/UnneededPercentQ: - Enabled: true - -# Align `end` with the matching keyword or starting expression except for -# assignments, where it should be aligned with the LHS. -Lint/EndAlignment: - Enabled: true - EnforcedStyleAlignWith: variable - AutoCorrect: true - -# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. -Lint/RequireParentheses: - Enabled: true - -Style/RedundantReturn: - Enabled: true - AllowMultipleReturnValues: true - -Style/Semicolon: - Enabled: true - AllowAsExpressionSeparator: true diff --git a/emass_client/ruby_client/.swagger-codegen-ignore b/emass_client/ruby_client/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/emass_client/ruby_client/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/emass_client/ruby_client/.swagger-codegen/VERSION b/emass_client/ruby_client/.swagger-codegen/VERSION deleted file mode 100644 index 38be3a7..0000000 --- a/emass_client/ruby_client/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.26 \ No newline at end of file diff --git a/emass_client/ruby_client/Gemfile b/emass_client/ruby_client/Gemfile deleted file mode 100644 index c2e3127..0000000 --- a/emass_client/ruby_client/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source 'https://rubygems.org' - -gemspec - -group :development, :test do - gem 'rake', '~> 13.0.1' - gem 'pry-byebug' - gem 'rubocop', '~> 0.66.0' -end diff --git a/emass_client/ruby_client/README.md b/emass_client/ruby_client/README.md deleted file mode 100644 index 215531a..0000000 --- a/emass_client/ruby_client/README.md +++ /dev/null @@ -1,1284 +0,0 @@ -# emass_client - -EmassClient - the Ruby gem for the Enterprise Mission Assurance Support Service (eMASS) - -The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: v3.2 -- Package version: 1.0.1 -- Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen -For more information, please visit [https://www.dcsa.mil/is/emass/](https://www.dcsa.mil/is/emass/) - -## Installation - -### Build a gem - -To build the Ruby code into a gem: - -```shell -gem build emass_client.gemspec -``` - -Then either install the gem locally: - -```shell -gem install ./emass_client-1.0.1.gem -``` -(for development, run `gem install --dev ./emass_client-1.0.1.gem` to install the development dependencies) - -or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). - -Finally add this to the Gemfile: - - gem 'emass_client', '~> 1.0.1' - -### Install from Git - -If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: - - gem 'emass_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' - -### Include the Ruby code directly - -Include the Ruby code directly using `-I` as follows: - -```shell -ruby -Ilib script.rb -``` - -## Getting Started - -Please follow the [installation](#installation) procedure and then run the following code: -```ruby -# Load the gem -require 'emass_client' -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -is_template = true # BOOLEAN | -type = 'type_example' # String | -category = 'category_example' # String | -zipper = 'zipper_example' # String | -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Add one or many artifacts in a system - result = api_instance.add_artifacts_by_system_id(is_template, type, category, zipper, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->add_artifacts_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -body = [EmassClient::ArtifactsDeleteInner.new] # Array | See notes above for additional information -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Remove one or many artifacts in a system - result = api_instance.delete_artifact(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->delete_artifact: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - filename: 'filename_example', # String | **File Name**: The file name (to include file-extension). - control_acronyms: 'control_acronyms_example', # String | **System Acronym**: Filter query by given system acronym (single or comma separated). - ccis: 'ccis_example', # String | **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - system_only: true # BOOLEAN | **Systems Only**: Indicates that only system(s) information is retrieved. -} - -begin - #Get one or many artifacts in a system - result = api_instance.get_system_artifacts(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->get_system_artifacts: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -body = EmassClient::ArtifactsRequestPutBody.new # ArtifactsRequestPutBody | See `information` above for additional instructions -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Update one or many artifacts in a system - result = api_instance.update_artifact_by_system_id(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->update_artifact_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsExportApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -filename = 'filename_example' # String | **File Name**: The file name (to include file-extension). -opts = { - compress: true # BOOLEAN | **Compress File**: Determines if returned file is compressed. -} - -begin - #Get the file of an artifact in a system - result = api_instance.get_system_artifacts_export(system_id, filename, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsExportApi->get_system_artifacts_export: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::CACApi.new -body = EmassClient::CacRequestPostBody.new # CacRequestPostBody | Update an existing Artifact by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Submit control to second role of CAC - result = api_instance.add_system_cac(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling CACApi->add_system_cac: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::CACApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - control_acronyms: 'control_acronyms_example' # String | **System Acronym**: Filter query by given system acronym (single or comma separated). -} - -begin - #Get location of one or many controls in CAC - result = api_instance.get_system_cac(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling CACApi->get_system_cac: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::CMMCAssessmentsApi.new -since_date = 'since_date_example' # String | **Date** CMMC date (Unix date format) - - -begin - #Get CMMC assessment information - result = api_instance.get_cmmc_assessments(since_date) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling CMMCAssessmentsApi->get_cmmc_assessments: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ControlsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - acronyms: 'PM-6' # String | **Acronym**: The system acronym(s) being queried (single value or comma delimited values). -} - -begin - #Get control information in a system for one or many controls - result = api_instance.get_system_controls(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ControlsApi->get_system_controls: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ControlsApi.new -body = EmassClient::ControlsRequestPutBody.new # ControlsRequestPutBody | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Update control information in a system for one or many controls - result = api_instance.update_control_by_system_id(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ControlsApi->update_control_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -body = EmassClient::MilestonesRequestPostBody.new # MilestonesRequestPostBody | Update an existing milestone -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Add milestones to one or many POA&M items in a system - result = api_instance.add_milestone_by_system_id_and_poam_id(body, system_id, poam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->add_milestone_by_system_id_and_poam_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -body = EmassClient::DeleteMilestone.new # DeleteMilestone | Delete the given Milestone Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Remove milestones in a system for one or many POA&M items - result = api_instance.delete_milestone(body, system_id, poam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->delete_milestone: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. -opts = { - scheduled_completion_date_start: 'scheduled_completion_date_start_example', # String | **Date Started**: Filter query by the scheduled completion start date (Unix date format). - scheduled_completion_date_end: 'scheduled_completion_date_end_example' # String | **Date Ended**: Filter query by the scheduled completion start date (Unix date format). -} - -begin - #Get milestones in one or many POA&M items in a system - result = api_instance.get_system_milestones_by_poam_id(system_id, poam_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->get_system_milestones_by_poam_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. -milestone_id = 56 # Integer | **Milestone Id**: The unique milestone record identifier. - - -begin - #Get milestone by ID in POA&M item in a system - result = api_instance.get_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->get_system_milestones_by_poam_id_and_milestone_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -body = EmassClient::MilestonesRequestPutBody.new # MilestonesRequestPutBody | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Update one or many POA&M items in a system - result = api_instance.update_milestone_by_system_id_and_poam_id(body, system_id, poam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->update_milestone_by_system_id_and_poam_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::PACApi.new -body = EmassClient::PacRequestPostBody.new # PacRequestPostBody | Update an existing Artifact by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Submit system package for review - result = api_instance.add_system_pac(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling PACApi->add_system_pac: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::PACApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Get location of system package in PAC - result = api_instance.get_system_pac(system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling PACApi->get_system_pac: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -body = EmassClient::PoamRequiredPost.new # PoamRequiredPost | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Add one or many POA&M items in a system - result = api_instance.add_poam_by_system_id(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->add_poam_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -body = EmassClient::DeletePoam.new # DeletePoam | Delete the given POA&M Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Remove one or many POA&M items in a system - result = api_instance.delete_poam(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->delete_poam: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - scheduled_completion_date_start: 'scheduled_completion_date_start_example', # String | **Date Started**: Filter query by the scheduled completion start date (Unix date format). - scheduled_completion_date_end: 'scheduled_completion_date_end_example', # String | **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - control_acronyms: 'control_acronyms_example', # String | **System Acronym**: Filter query by given system acronym (single or comma separated). - ccis: 'ccis_example', # String | **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - system_only: true # BOOLEAN | **Systems Only**: Indicates that only system(s) information is retrieved. -} - -begin - #Get one or many POA&M items in a system - result = api_instance.get_system_poams(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->get_system_poams: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Get POA&M item by ID in a system - result = api_instance.get_system_poams_by_poam_id(system_id, poam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->get_system_poams_by_poam_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -body = EmassClient::PoamRequiredPut.new # PoamRequiredPut | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Update one or many POA&M items in a system - result = api_instance.update_poam_by_system_id(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->update_poam_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::RegistrationApi.new -body = EmassClient::RegisterUserRequestPostBody.new # RegisterUserRequestPostBody | User certificate previously provided by eMASS. - - -begin - #Register user certificate and obtain an API key - result = api_instance.register_user(body) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling RegistrationApi->register_user: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::StaticCodeScansApi.new -body = EmassClient::StaticCodeRequiredPost.new # StaticCodeRequiredPost | Update an existing Artifact by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Upload static code scans or Clear static code scans - result = api_instance.add_static_code_scans_by_system_id(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling StaticCodeScansApi->add_static_code_scans_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemRolesApi.new - -begin - #Get available roles - result = api_instance.get_system_roles - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemRolesApi->get_system_roles: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemRolesApi.new -role_category = 'role_category_example' # String | **Role Category**: The system role category been queried -role = 'IAO' # String | **Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA. -opts = { - policy: 'rmf', # String | **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - include_decommissioned: true # BOOLEAN | **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. -} - -begin - #Get system roles - result = api_instance.get_system_roles_by_category_id(role_category, role, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemRolesApi->get_system_roles_by_category_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - include_package: true, # BOOLEAN | **Include Package**: Indicates if additional packages information is retrieved for queried system. - policy: 'rmf' # String | **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. -} - -begin - #Get system information for a specific system - result = api_instance.get_system(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemsApi->get_system: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemsApi.new -opts = { - include_package: true, # BOOLEAN | **Include Package**: Indicates if additional packages information is retrieved for queried system. - registration_type: 'regular', # String | **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider - ditpr_id: 'ditpr_id_example', # String | **DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR). - coams_id: 'coams_id_example', # String | **COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS). - policy: 'rmf', # String | **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - include_ditpr_metrics: false, # BOOLEAN | **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:
  • registrationType
  • policy
- include_decommissioned: true, # BOOLEAN | **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. - reports_for_scorecard: true # BOOLEAN | **DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard. -} - -begin - #Get system information - result = api_instance.get_systems(opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemsApi->get_systems: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::TestApi.new - -begin - #Test connection to the API - result = api_instance.test_connection - p result -rescue EmassClient::ApiError => e - puts "Exception when calling TestApi->test_connection: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::TestResultsApi.new -body = EmassClient::TestResultsRequestPostBody.new # TestResultsRequestPostBody | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Add one or many test results in a system - result = api_instance.add_test_results_by_system_id(body, system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling TestResultsApi->add_test_results_by_system_id: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::TestResultsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - control_acronyms: 'control_acronyms_example', # String | **System Acronym**: Filter query by given system acronym (single or comma separated). - ccis: 'ccis_example', # String | **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - latest_only: true # BOOLEAN | **Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated). -} - -begin - #Get one or many test results in a system - result = api_instance.get_system_test_results(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling TestResultsApi->get_system_test_results: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::WorkflowDefinitionsApi.new -opts = { - include_inactive: true, # BOOLEAN | **Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions. - registration_type: 'regular' # String | **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider -} - -begin - #Get workflow definitions in a site - result = api_instance.get_workflow_definitions(opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling WorkflowDefinitionsApi->get_workflow_definitions: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::WorkflowInstancesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - include_comments: true, # BOOLEAN | **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. - page_index: 0, # Integer | **Page Index**: If no value is specified, the default returns true to not include transition comments. - since_date: 'since_date_example', # String | **Date**: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. - status: 'all' # String | **Status**: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. -} - -begin - #Get workflow instances in a system - result = api_instance.get_system_workflow_instances(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling WorkflowInstancesApi->get_system_workflow_instances: #{e}" -end -# Setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::WorkflowInstancesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -workflow_instance_id = 56 # Integer | **Workflow Instance Id**: The unique milestone record identifier. - - -begin - #Get workflow instance by ID in a system - result = api_instance.get_system_workflow_instances_by_workflow_instance_id(system_id, workflow_instance_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling WorkflowInstancesApi->get_system_workflow_instances_by_workflow_instance_id: #{e}" -end -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:4010* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*EmassClient::ArtifactsApi* | [**add_artifacts_by_system_id**](docs/ArtifactsApi.md#add_artifacts_by_system_id) | **POST** /api/systems/{systemId}/artifacts | Add one or many artifacts in a system -*EmassClient::ArtifactsApi* | [**delete_artifact**](docs/ArtifactsApi.md#delete_artifact) | **DELETE** /api/systems/{systemId}/artifacts | Remove one or many artifacts in a system -*EmassClient::ArtifactsApi* | [**get_system_artifacts**](docs/ArtifactsApi.md#get_system_artifacts) | **GET** /api/systems/{systemId}/artifacts | Get one or many artifacts in a system -*EmassClient::ArtifactsApi* | [**update_artifact_by_system_id**](docs/ArtifactsApi.md#update_artifact_by_system_id) | **PUT** /api/systems/{systemId}/artifacts | Update one or many artifacts in a system -*EmassClient::ArtifactsExportApi* | [**get_system_artifacts_export**](docs/ArtifactsExportApi.md#get_system_artifacts_export) | **GET** /api/systems/{systemId}/artifacts-export | Get the file of an artifact in a system -*EmassClient::CACApi* | [**add_system_cac**](docs/CACApi.md#add_system_cac) | **POST** /api/systems/{systemId}/approval/cac | Submit control to second role of CAC -*EmassClient::CACApi* | [**get_system_cac**](docs/CACApi.md#get_system_cac) | **GET** /api/systems/{systemId}/approval/cac | Get location of one or many controls in CAC -*EmassClient::CMMCAssessmentsApi* | [**get_cmmc_assessments**](docs/CMMCAssessmentsApi.md#get_cmmc_assessments) | **GET** /api/cmmc-assessments | Get CMMC assessment information -*EmassClient::ControlsApi* | [**get_system_controls**](docs/ControlsApi.md#get_system_controls) | **GET** /api/systems/{systemId}/controls | Get control information in a system for one or many controls -*EmassClient::ControlsApi* | [**update_control_by_system_id**](docs/ControlsApi.md#update_control_by_system_id) | **PUT** /api/systems/{systemId}/controls | Update control information in a system for one or many controls -*EmassClient::MilestonesApi* | [**add_milestone_by_system_id_and_poam_id**](docs/MilestonesApi.md#add_milestone_by_system_id_and_poam_id) | **POST** /api/systems/{systemId}/poams/{poamId}/milestones | Add milestones to one or many POA&M items in a system -*EmassClient::MilestonesApi* | [**delete_milestone**](docs/MilestonesApi.md#delete_milestone) | **DELETE** /api/systems/{systemId}/poams/{poamId}/milestones | Remove milestones in a system for one or many POA&M items -*EmassClient::MilestonesApi* | [**get_system_milestones_by_poam_id**](docs/MilestonesApi.md#get_system_milestones_by_poam_id) | **GET** /api/systems/{systemId}/poams/{poamId}/milestones | Get milestones in one or many POA&M items in a system -*EmassClient::MilestonesApi* | [**get_system_milestones_by_poam_id_and_milestone_id**](docs/MilestonesApi.md#get_system_milestones_by_poam_id_and_milestone_id) | **GET** /api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId} | Get milestone by ID in POA&M item in a system -*EmassClient::MilestonesApi* | [**update_milestone_by_system_id_and_poam_id**](docs/MilestonesApi.md#update_milestone_by_system_id_and_poam_id) | **PUT** /api/systems/{systemId}/poams/{poamId}/milestones | Update one or many POA&M items in a system -*EmassClient::PACApi* | [**add_system_pac**](docs/PACApi.md#add_system_pac) | **POST** /api/systems/{systemId}/approval/pac | Submit system package for review -*EmassClient::PACApi* | [**get_system_pac**](docs/PACApi.md#get_system_pac) | **GET** /api/systems/{systemId}/approval/pac | Get location of system package in PAC -*EmassClient::POAMApi* | [**add_poam_by_system_id**](docs/POAMApi.md#add_poam_by_system_id) | **POST** /api/systems/{systemId}/poams | Add one or many POA&M items in a system -*EmassClient::POAMApi* | [**delete_poam**](docs/POAMApi.md#delete_poam) | **DELETE** /api/systems/{systemId}/poams | Remove one or many POA&M items in a system -*EmassClient::POAMApi* | [**get_system_poams**](docs/POAMApi.md#get_system_poams) | **GET** /api/systems/{systemId}/poams | Get one or many POA&M items in a system -*EmassClient::POAMApi* | [**get_system_poams_by_poam_id**](docs/POAMApi.md#get_system_poams_by_poam_id) | **GET** /api/systems/{systemId}/poams/{poamId} | Get POA&M item by ID in a system -*EmassClient::POAMApi* | [**update_poam_by_system_id**](docs/POAMApi.md#update_poam_by_system_id) | **PUT** /api/systems/{systemId}/poams | Update one or many POA&M items in a system -*EmassClient::RegistrationApi* | [**register_user**](docs/RegistrationApi.md#register_user) | **POST** /api/api-key | Register user certificate and obtain an API key -*EmassClient::StaticCodeScansApi* | [**add_static_code_scans_by_system_id**](docs/StaticCodeScansApi.md#add_static_code_scans_by_system_id) | **POST** /api/systems/{systemId}/static-code-scans | Upload static code scans or Clear static code scans -*EmassClient::SystemRolesApi* | [**get_system_roles**](docs/SystemRolesApi.md#get_system_roles) | **GET** /api/system-roles | Get available roles -*EmassClient::SystemRolesApi* | [**get_system_roles_by_category_id**](docs/SystemRolesApi.md#get_system_roles_by_category_id) | **GET** /api/system-roles/{roleCategory} | Get system roles -*EmassClient::SystemsApi* | [**get_system**](docs/SystemsApi.md#get_system) | **GET** /api/systems/{systemId} | Get system information for a specific system -*EmassClient::SystemsApi* | [**get_systems**](docs/SystemsApi.md#get_systems) | **GET** /api/systems | Get system information -*EmassClient::TestApi* | [**test_connection**](docs/TestApi.md#test_connection) | **GET** /api | Test connection to the API -*EmassClient::TestResultsApi* | [**add_test_results_by_system_id**](docs/TestResultsApi.md#add_test_results_by_system_id) | **POST** /api/systems/{systemId}/test-results | Add one or many test results in a system -*EmassClient::TestResultsApi* | [**get_system_test_results**](docs/TestResultsApi.md#get_system_test_results) | **GET** /api/systems/{systemId}/test-results | Get one or many test results in a system -*EmassClient::WorkflowDefinitionsApi* | [**get_workflow_definitions**](docs/WorkflowDefinitionsApi.md#get_workflow_definitions) | **GET** /api/workflow-definitions | Get workflow definitions in a site -*EmassClient::WorkflowInstancesApi* | [**get_system_workflow_instances**](docs/WorkflowInstancesApi.md#get_system_workflow_instances) | **GET** /api/systems/{systemId}/workflow-instances | Get workflow instances in a system -*EmassClient::WorkflowInstancesApi* | [**get_system_workflow_instances_by_workflow_instance_id**](docs/WorkflowInstancesApi.md#get_system_workflow_instances_by_workflow_instance_id) | **GET** /api/systems/{systemId}/workflow-instances/{workflowInstanceId} | Get workflow instance by ID in a system - -## Documentation for Models - - - [EmassClient::ArtifactsDelete](docs/ArtifactsDelete.md) - - [EmassClient::ArtifactsDeleteInner](docs/ArtifactsDeleteInner.md) - - [EmassClient::ArtifactsGet](docs/ArtifactsGet.md) - - [EmassClient::ArtifactsRequestPutBody](docs/ArtifactsRequestPutBody.md) - - [EmassClient::ArtifactsResponseDel](docs/ArtifactsResponseDel.md) - - [EmassClient::ArtifactsResponseDelData](docs/ArtifactsResponseDelData.md) - - [EmassClient::ArtifactsResponseGet](docs/ArtifactsResponseGet.md) - - [EmassClient::ArtifactsResponsePutPost](docs/ArtifactsResponsePutPost.md) - - [EmassClient::CacGet](docs/CacGet.md) - - [EmassClient::CacRequestPostBody](docs/CacRequestPostBody.md) - - [EmassClient::CacResponseGet](docs/CacResponseGet.md) - - [EmassClient::CacResponsePost](docs/CacResponsePost.md) - - [EmassClient::CacResponsePostData](docs/CacResponsePostData.md) - - [EmassClient::CmmcGet](docs/CmmcGet.md) - - [EmassClient::CmmcResponseGet](docs/CmmcResponseGet.md) - - [EmassClient::ConnectivityCcsd](docs/ConnectivityCcsd.md) - - [EmassClient::ControlsGet](docs/ControlsGet.md) - - [EmassClient::ControlsPut](docs/ControlsPut.md) - - [EmassClient::ControlsRequestPutBody](docs/ControlsRequestPutBody.md) - - [EmassClient::ControlsResponseGet](docs/ControlsResponseGet.md) - - [EmassClient::ControlsResponsePut](docs/ControlsResponsePut.md) - - [EmassClient::DefinitionTransitions](docs/DefinitionTransitions.md) - - [EmassClient::DeleteMilestone](docs/DeleteMilestone.md) - - [EmassClient::DeletePoam](docs/DeletePoam.md) - - [EmassClient::Empty200Response](docs/Empty200Response.md) - - [EmassClient::Error](docs/Error.md) - - [EmassClient::InstancesTransitions](docs/InstancesTransitions.md) - - [EmassClient::MilestoneResponseGet](docs/MilestoneResponseGet.md) - - [EmassClient::MilestoneResponsePost](docs/MilestoneResponsePost.md) - - [EmassClient::MilestoneResponsePut](docs/MilestoneResponsePut.md) - - [EmassClient::MilestonesDelete](docs/MilestonesDelete.md) - - [EmassClient::MilestonesGet](docs/MilestonesGet.md) - - [EmassClient::MilestonesPost](docs/MilestonesPost.md) - - [EmassClient::MilestonesPut](docs/MilestonesPut.md) - - [EmassClient::MilestonesPutPostDelete](docs/MilestonesPutPostDelete.md) - - [EmassClient::MilestonesRequestPostBody](docs/MilestonesRequestPostBody.md) - - [EmassClient::MilestonesRequestPutBody](docs/MilestonesRequestPutBody.md) - - [EmassClient::MilestonesRequiredPost](docs/MilestonesRequiredPost.md) - - [EmassClient::MilestonesRequiredPut](docs/MilestonesRequiredPut.md) - - [EmassClient::Model200](docs/Model200.md) - - [EmassClient::Model201](docs/Model201.md) - - [EmassClient::Model201Meta](docs/Model201Meta.md) - - [EmassClient::Model400](docs/Model400.md) - - [EmassClient::Model400Meta](docs/Model400Meta.md) - - [EmassClient::Model400Response](docs/Model400Response.md) - - [EmassClient::Model401](docs/Model401.md) - - [EmassClient::Model401Meta](docs/Model401Meta.md) - - [EmassClient::Model403](docs/Model403.md) - - [EmassClient::Model403Meta](docs/Model403Meta.md) - - [EmassClient::Model404](docs/Model404.md) - - [EmassClient::Model404Response](docs/Model404Response.md) - - [EmassClient::Model405](docs/Model405.md) - - [EmassClient::Model405Meta](docs/Model405Meta.md) - - [EmassClient::Model411](docs/Model411.md) - - [EmassClient::Model411Meta](docs/Model411Meta.md) - - [EmassClient::Model490](docs/Model490.md) - - [EmassClient::Model490Meta](docs/Model490Meta.md) - - [EmassClient::Model500](docs/Model500.md) - - [EmassClient::Model500Meta](docs/Model500Meta.md) - - [EmassClient::PacGet](docs/PacGet.md) - - [EmassClient::PacPost](docs/PacPost.md) - - [EmassClient::PacRequestPostBody](docs/PacRequestPostBody.md) - - [EmassClient::PacResponseGet](docs/PacResponseGet.md) - - [EmassClient::PacResponsePost](docs/PacResponsePost.md) - - [EmassClient::PoamDelete](docs/PoamDelete.md) - - [EmassClient::PoamGet](docs/PoamGet.md) - - [EmassClient::PoamPost](docs/PoamPost.md) - - [EmassClient::PoamPostPutDel](docs/PoamPostPutDel.md) - - [EmassClient::PoamPut](docs/PoamPut.md) - - [EmassClient::PoamRequestPostBody](docs/PoamRequestPostBody.md) - - [EmassClient::PoamRequestPutBody](docs/PoamRequestPutBody.md) - - [EmassClient::PoamRequiredPost](docs/PoamRequiredPost.md) - - [EmassClient::PoamRequiredPut](docs/PoamRequiredPut.md) - - [EmassClient::PoamResponseDelete](docs/PoamResponseDelete.md) - - [EmassClient::PoamResponseGet](docs/PoamResponseGet.md) - - [EmassClient::PoamResponsePost](docs/PoamResponsePost.md) - - [EmassClient::PoamResponsePut](docs/PoamResponsePut.md) - - [EmassClient::Register](docs/Register.md) - - [EmassClient::RegisterData](docs/RegisterData.md) - - [EmassClient::RegisterUserRequestPostBody](docs/RegisterUserRequestPostBody.md) - - [EmassClient::RoleCategory](docs/RoleCategory.md) - - [EmassClient::Roles](docs/Roles.md) - - [EmassClient::Ssps](docs/Ssps.md) - - [EmassClient::Stage](docs/Stage.md) - - [EmassClient::StaticCodeApplication](docs/StaticCodeApplication.md) - - [EmassClient::StaticCodeRequestPostBody](docs/StaticCodeRequestPostBody.md) - - [EmassClient::StaticCodeRequiredPost](docs/StaticCodeRequiredPost.md) - - [EmassClient::StaticCodeRequiredPostApplication](docs/StaticCodeRequiredPostApplication.md) - - [EmassClient::Success200Response](docs/Success200Response.md) - - [EmassClient::SystemIdArtifactsBody](docs/SystemIdArtifactsBody.md) - - [EmassClient::SystemResponse](docs/SystemResponse.md) - - [EmassClient::SystemRolesCategoryResponse](docs/SystemRolesCategoryResponse.md) - - [EmassClient::SystemRolesResponse](docs/SystemRolesResponse.md) - - [EmassClient::SystemRolesResponseData](docs/SystemRolesResponseData.md) - - [EmassClient::Systems](docs/Systems.md) - - [EmassClient::Test](docs/Test.md) - - [EmassClient::TestData](docs/TestData.md) - - [EmassClient::TestResultsGet](docs/TestResultsGet.md) - - [EmassClient::TestResultsPost](docs/TestResultsPost.md) - - [EmassClient::TestResultsRequestPostBody](docs/TestResultsRequestPostBody.md) - - [EmassClient::TestResultsResponseGet](docs/TestResultsResponseGet.md) - - [EmassClient::TestResultsResponsePost](docs/TestResultsResponsePost.md) - - [EmassClient::Users](docs/Users.md) - - [EmassClient::WorkflowDefinitionGet](docs/WorkflowDefinitionGet.md) - - [EmassClient::WorkflowDefinitionResponseGet](docs/WorkflowDefinitionResponseGet.md) - - [EmassClient::WorkflowInstancesGet](docs/WorkflowInstancesGet.md) - - [EmassClient::WorkflowInstancesResponseGet](docs/WorkflowInstancesResponseGet.md) - -## Documentation for Authorization - - -### apikey - -- **Type**: API key -- **API key parameter name**: api-key -- **Location**: HTTP header - -### mockType - -- **Type**: API key -- **API key parameter name**: Prefer -- **Location**: HTTP header - -### userid - -- **Type**: API key -- **API key parameter name**: user-uid -- **Location**: HTTP header - diff --git a/emass_client/ruby_client/Rakefile b/emass_client/ruby_client/Rakefile deleted file mode 100644 index d52c3e3..0000000 --- a/emass_client/ruby_client/Rakefile +++ /dev/null @@ -1,8 +0,0 @@ -begin - require 'rspec/core/rake_task' - - RSpec::Core::RakeTask.new(:spec) - task default: :spec -rescue LoadError - # no rspec available -end diff --git a/emass_client/ruby_client/docs/ArtifactsApi.md b/emass_client/ruby_client/docs/ArtifactsApi.md deleted file mode 100644 index 8a6aff2..0000000 --- a/emass_client/ruby_client/docs/ArtifactsApi.md +++ /dev/null @@ -1,284 +0,0 @@ -# EmassClient::ArtifactsApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_artifacts_by_system_id**](ArtifactsApi.md#add_artifacts_by_system_id) | **POST** /api/systems/{systemId}/artifacts | Add one or many artifacts in a system -[**delete_artifact**](ArtifactsApi.md#delete_artifact) | **DELETE** /api/systems/{systemId}/artifacts | Remove one or many artifacts in a system -[**get_system_artifacts**](ArtifactsApi.md#get_system_artifacts) | **GET** /api/systems/{systemId}/artifacts | Get one or many artifacts in a system -[**update_artifact_by_system_id**](ArtifactsApi.md#update_artifact_by_system_id) | **PUT** /api/systems/{systemId}/artifacts | Update one or many artifacts in a system - -# **add_artifacts_by_system_id** -> ArtifactsResponsePutPost add_artifacts_by_system_id(is_templatetypecategoryzippersystem_id) - -Add one or many artifacts in a system - -Information
The request body of a POST request through the Artifact Endpoint accepts a single binary file with file extension \".zip\" only. This accepted .zip file should contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt. Filename uniqueness throughout eMASS will be enforced by the API.

Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact existing within the application, the file associated with the artifact will be updated. If no artifact is matched via filename to the application, a new artifact will be created with the following default values. Any values not specified below will be blank.
  • isTemplate: false
  • type: other
  • category: evidence
To update values other than the file itself, please submit a PUT request.
Zip file information
Upload a zip file contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt.

Business Rules
Artifact cannot be saved if the file does not have the following file extensions: .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx Artifact version cannot be saved if an Artifact with the same file name already exist in the system. Artifact cannot be saved if the file size exceeds 30MB. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -is_template = true # BOOLEAN | -type = 'type_example' # String | -category = 'category_example' # String | -zipper = 'zipper_example' # String | -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Add one or many artifacts in a system - result = api_instance.add_artifacts_by_system_id(is_templatetypecategoryzippersystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->add_artifacts_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **is_template** | **BOOLEAN**| | - **type** | **String**| | - **category** | **String**| | - **zipper** | **String**| | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**ArtifactsResponsePutPost**](ArtifactsResponsePutPost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - - - -# **delete_artifact** -> ArtifactsResponseDel delete_artifact(bodysystem_id) - -Remove one or many artifacts in a system - -Remove the Artifact(s) matching `systemId` path parameter and request body artifact(s) file name

Note: Multiple files can be deleted by providing multiple file names at the CL (comma delimited) Example: --files file1.txt, file2.txt - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -body = [EmassClient::ArtifactsDeleteInner.new] # Array | See notes above for additional information -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Remove one or many artifacts in a system - result = api_instance.delete_artifact(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->delete_artifact: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Array<ArtifactsDeleteInner>**](ArtifactsDeleteInner.md)| See notes above for additional information | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**ArtifactsResponseDel**](ArtifactsResponseDel.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_system_artifacts** -> ArtifactsResponseGet get_system_artifacts(system_id, opts) - -Get one or many artifacts in a system - -Returns selected artifacts matching parameters to include the file name containing the artifacts. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - filename: 'filename_example', # String | **File Name**: The file name (to include file-extension). - control_acronyms: 'control_acronyms_example', # String | **System Acronym**: Filter query by given system acronym (single or comma separated). - ccis: 'ccis_example', # String | **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - system_only: true # BOOLEAN | **Systems Only**: Indicates that only system(s) information is retrieved. -} - -begin - #Get one or many artifacts in a system - result = api_instance.get_system_artifacts(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->get_system_artifacts: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **filename** | **String**| **File Name**: The file name (to include file-extension). | [optional] - **control_acronyms** | **String**| **System Acronym**: Filter query by given system acronym (single or comma separated). | [optional] - **ccis** | **String**| **CCI System**: Filter query by Control Correlation Identifiers (CCIs). | [optional] - **system_only** | **BOOLEAN**| **Systems Only**: Indicates that only system(s) information is retrieved. | [optional] [default to true] - -### Return type - -[**ArtifactsResponseGet**](ArtifactsResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **update_artifact_by_system_id** -> ArtifactsResponsePutPost update_artifact_by_system_id(bodysystem_id) - -Update one or many artifacts in a system - -Updates an artifact for given `systemId` path parameter

**Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category` - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsApi.new -body = EmassClient::ArtifactsRequestPutBody.new # ArtifactsRequestPutBody | See `information` above for additional instructions -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Update one or many artifacts in a system - result = api_instance.update_artifact_by_system_id(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsApi->update_artifact_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ArtifactsRequestPutBody**](ArtifactsRequestPutBody.md)| See `information` above for additional instructions | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**ArtifactsResponsePutPost**](ArtifactsResponsePutPost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/ArtifactsDelete.md b/emass_client/ruby_client/docs/ArtifactsDelete.md deleted file mode 100644 index bf5e8bd..0000000 --- a/emass_client/ruby_client/docs/ArtifactsDelete.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::ArtifactsDelete - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/ArtifactsDeleteInner.md b/emass_client/ruby_client/docs/ArtifactsDeleteInner.md deleted file mode 100644 index 35b61b9..0000000 --- a/emass_client/ruby_client/docs/ArtifactsDeleteInner.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::ArtifactsDeleteInner - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filename** | **String** | [Required] File name should match exactly one file within the provided zip file. 1000 Characters. | [optional] - diff --git a/emass_client/ruby_client/docs/ArtifactsExportApi.md b/emass_client/ruby_client/docs/ArtifactsExportApi.md deleted file mode 100644 index 68a20bf..0000000 --- a/emass_client/ruby_client/docs/ArtifactsExportApi.md +++ /dev/null @@ -1,76 +0,0 @@ -# EmassClient::ArtifactsExportApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_system_artifacts_export**](ArtifactsExportApi.md#get_system_artifacts_export) | **GET** /api/systems/{systemId}/artifacts-export | Get the file of an artifact in a system - -# **get_system_artifacts_export** -> String get_system_artifacts_export(system_id, filename, opts) - -Get the file of an artifact in a system - -Sample Responce
Binary file associated with given filename.
If `compress` parameter is specified, zip archive of binary file associated with given filename. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ArtifactsExportApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -filename = 'filename_example' # String | **File Name**: The file name (to include file-extension). -opts = { - compress: true # BOOLEAN | **Compress File**: Determines if returned file is compressed. -} - -begin - #Get the file of an artifact in a system - result = api_instance.get_system_artifacts_export(system_id, filename, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ArtifactsExportApi->get_system_artifacts_export: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **filename** | **String**| **File Name**: The file name (to include file-extension). | - **compress** | **BOOLEAN**| **Compress File**: Determines if returned file is compressed. | [optional] [default to true] - -### Return type - -**String** - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/plain, application/octet-stream, application/json - - - diff --git a/emass_client/ruby_client/docs/ArtifactsGet.md b/emass_client/ruby_client/docs/ArtifactsGet.md deleted file mode 100644 index 0f85c0c..0000000 --- a/emass_client/ruby_client/docs/ArtifactsGet.md +++ /dev/null @@ -1,20 +0,0 @@ -# EmassClient::ArtifactsGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique eMASS system identifier. | [optional] -**filename** | **String** | [Required] File name should match exactly one file within the provided zip file. 1000 Characters. | [optional] -**is_inherited** | **BOOLEAN** | [Read-only] Indicates whether an artifact is inherited. | [optional] -**is_template** | **BOOLEAN** | [Read-only] Indicates whether an artifact template. | [optional] -**type** | **String** | [Required] Artifact type options | [optional] -**category** | **String** | [Required] Artifact category options | [optional] -**description** | **String** | [Optional] Artifact description. 2000 Characters. | [optional] -**ref_page_number** | **String** | [Optional] Artifact reference page number. 50 Characters. | [optional] -**ccis** | **String** | [Optional] CCI associated with test result. | [optional] -**controls** | **String** | [Optional] Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined. | [optional] -**mime_content_type** | **String** | [Read-Only] Standard MIME content type derived from file extension. | [optional] -**file_size** | **String** | [Read-Only] File size of attached artifact. | [optional] -**artifact_expiration_date** | **Integer** | [Optional] Date Artifact expires and requires review. In Unix Date format. | [optional] -**last_reviewed_date** | **Integer** | [Conditional] Date Artifact was last reviewed.. Unix time format. | [optional] - diff --git a/emass_client/ruby_client/docs/ArtifactsRequestPutBody.md b/emass_client/ruby_client/docs/ArtifactsRequestPutBody.md deleted file mode 100644 index 8f6314d..0000000 --- a/emass_client/ruby_client/docs/ArtifactsRequestPutBody.md +++ /dev/null @@ -1,16 +0,0 @@ -# EmassClient::ArtifactsRequestPutBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filename** | **String** | [Required] File name should match exactly one file within the provided zip file. 1000 Characters. | -**is_template** | **BOOLEAN** | [Required] Indicates it is an artifact template. | -**type** | **String** | [Required] Artifact type options | -**category** | **String** | [Required] Artifact category options | -**description** | **String** | [Optional] Artifact description. 2000 Characters. | [optional] -**ref_page_number** | **String** | [Optional] Artifact reference page number. 50 Characters. | [optional] -**ccis** | **String** | [Required] CCI associated with test result. | [optional] -**controls** | **String** | [Optional] Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined. | [optional] -**artifact_expiration_date** | **Integer** | [Optional] Date Artifact expires and requires review. In Unix Date format. | [optional] -**last_reviewed_date** | **Integer** | [Optional]] Date Artifact was last reviewed.. Unix time format. | [optional] - diff --git a/emass_client/ruby_client/docs/ArtifactsResponseDel.md b/emass_client/ruby_client/docs/ArtifactsResponseDel.md deleted file mode 100644 index c81aaed..0000000 --- a/emass_client/ruby_client/docs/ArtifactsResponseDel.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::ArtifactsResponseDel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<ArtifactsResponseDelData>**](ArtifactsResponseDelData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/ArtifactsResponseDelData.md b/emass_client/ruby_client/docs/ArtifactsResponseDelData.md deleted file mode 100644 index cb9c094..0000000 --- a/emass_client/ruby_client/docs/ArtifactsResponseDelData.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::ArtifactsResponseDelData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**filename** | **String** | [Required] File name should match exactly one file within the provided zip file. 1000 Characters. | [optional] -**success** | **BOOLEAN** | | [optional] -**system_id** | **Integer** | | [optional] - diff --git a/emass_client/ruby_client/docs/ArtifactsResponseGet.md b/emass_client/ruby_client/docs/ArtifactsResponseGet.md deleted file mode 100644 index ae9de3f..0000000 --- a/emass_client/ruby_client/docs/ArtifactsResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::ArtifactsResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<ArtifactsGet>**](ArtifactsGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/ArtifactsResponsePutPost.md b/emass_client/ruby_client/docs/ArtifactsResponsePutPost.md deleted file mode 100644 index a922a4d..0000000 --- a/emass_client/ruby_client/docs/ArtifactsResponsePutPost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::ArtifactsResponsePutPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<ArtifactsResponseDelData>**](ArtifactsResponseDelData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/CACApi.md b/emass_client/ruby_client/docs/CACApi.md deleted file mode 100644 index 6c919bd..0000000 --- a/emass_client/ruby_client/docs/CACApi.md +++ /dev/null @@ -1,140 +0,0 @@ -# EmassClient::CACApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_system_cac**](CACApi.md#add_system_cac) | **POST** /api/systems/{systemId}/approval/cac | Submit control to second role of CAC -[**get_system_cac**](CACApi.md#get_system_cac) | **GET** /api/systems/{systemId}/approval/cac | Get location of one or many controls in CAC - -# **add_system_cac** -> CacResponsePost add_system_cac(bodysystem_id) - -Submit control to second role of CAC - -Adds a Control Approval Chain (CAC) for given `systemId` path parameter

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. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::CACApi.new -body = EmassClient::CacRequestPostBody.new # CacRequestPostBody | Update an existing Artifact by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Submit control to second role of CAC - result = api_instance.add_system_cac(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling CACApi->add_system_cac: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CacRequestPostBody**](CacRequestPostBody.md)| Update an existing Artifact by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**CacResponsePost**](CacResponsePost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_system_cac** -> CacResponseGet get_system_cac(system_id, opts) - -Get location of one or many controls in CAC - -Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::CACApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - control_acronyms: 'control_acronyms_example' # String | **System Acronym**: Filter query by given system acronym (single or comma separated). -} - -begin - #Get location of one or many controls in CAC - result = api_instance.get_system_cac(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling CACApi->get_system_cac: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **control_acronyms** | **String**| **System Acronym**: Filter query by given system acronym (single or comma separated). | [optional] - -### Return type - -[**CacResponseGet**](CacResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/CMMCAssessmentsApi.md b/emass_client/ruby_client/docs/CMMCAssessmentsApi.md deleted file mode 100644 index 6941ef3..0000000 --- a/emass_client/ruby_client/docs/CMMCAssessmentsApi.md +++ /dev/null @@ -1,71 +0,0 @@ -# EmassClient::CMMCAssessmentsApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_cmmc_assessments**](CMMCAssessmentsApi.md#get_cmmc_assessments) | **GET** /api/cmmc-assessments | Get CMMC assessment information - -# **get_cmmc_assessments** -> CmmcResponseGet get_cmmc_assessments(since_date) - -Get CMMC assessment information - -Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::CMMCAssessmentsApi.new -since_date = 'since_date_example' # String | **Date** CMMC date (Unix date format) - - -begin - #Get CMMC assessment information - result = api_instance.get_cmmc_assessments(since_date) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling CMMCAssessmentsApi->get_cmmc_assessments: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **since_date** | **String**| **Date** CMMC date (Unix date format) | - -### Return type - -[**CmmcResponseGet**](CmmcResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/CacGet.md b/emass_client/ruby_client/docs/CacGet.md deleted file mode 100644 index 2978075..0000000 --- a/emass_client/ruby_client/docs/CacGet.md +++ /dev/null @@ -1,13 +0,0 @@ -# EmassClient::CacGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique eMASS system identifier. | [optional] -**control_acronym** | **String** | [Required] System acronym name. | [optional] -**compliance_status** | **String** | [Read-only] Compliance status of the control. | [optional] -**current_stage_name** | **String** | [Read-Only] Role in current stage. | [optional] -**current_stage** | **Integer** | [Read-Only] Current step in the Control Approval Chain. | [optional] -**total_stages** | **Integer** | [Read-Only] Total number of steps in Control Approval Chain. | [optional] -**comments** | **String** | [Conditional] Control Approval Chain comments - 2000 Characters. | [optional] - diff --git a/emass_client/ruby_client/docs/CacRequestPostBody.md b/emass_client/ruby_client/docs/CacRequestPostBody.md deleted file mode 100644 index e93281e..0000000 --- a/emass_client/ruby_client/docs/CacRequestPostBody.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::CacRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**control_acronym** | **String** | [Required] System acronym name. | [optional] -**comments** | **String** | [Conditional] Control Approval Chain comments - 2000 Characters. | [optional] - diff --git a/emass_client/ruby_client/docs/CacResponseGet.md b/emass_client/ruby_client/docs/CacResponseGet.md deleted file mode 100644 index 52a122b..0000000 --- a/emass_client/ruby_client/docs/CacResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::CacResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<CacGet>**](CacGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/CacResponsePost.md b/emass_client/ruby_client/docs/CacResponsePost.md deleted file mode 100644 index 7e3186c..0000000 --- a/emass_client/ruby_client/docs/CacResponsePost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::CacResponsePost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<CacResponsePostData>**](CacResponsePostData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/CacResponsePostData.md b/emass_client/ruby_client/docs/CacResponsePostData.md deleted file mode 100644 index f147583..0000000 --- a/emass_client/ruby_client/docs/CacResponsePostData.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::CacResponsePostData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**control_acronym** | **String** | [Required] System acronym name. | [optional] -**success** | **BOOLEAN** | | [optional] -**system_id** | **Integer** | | [optional] - diff --git a/emass_client/ruby_client/docs/CmmcGet.md b/emass_client/ruby_client/docs/CmmcGet.md deleted file mode 100644 index a7ab6bc..0000000 --- a/emass_client/ruby_client/docs/CmmcGet.md +++ /dev/null @@ -1,19 +0,0 @@ -# EmassClient::CmmcGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**operation** | **String** | [Read-Only] Indicates the action that should be taken on the assessment record since the provided sinceDate. | [optional] -**hq_organization_name** | **String** | [Read-Only] The name of the DIB Company. | [optional] -**duns** | **String** | [Read-Only] The Data Universal Numbering System (DUNS) number. | [optional] -**unique_entity_identifier** | **String** | [Read-Only] The Unique Entity Identifier assigned to the DIB Company. | [optional] -**cage_codes** | **String** | [Read-Only] The five position code(s) associated with the Organization Seeking Certification (OSC). | [optional] -**osc_name** | **String** | [Read-Only] The name of the Organization Seeking Certification. | [optional] -**scope** | **String** | [Read-Only] The scope of the OSC assessment. | [optional] -**scope_description** | **String** | [Read-Only] Brief description of the scope of the OSC assessment | [optional] -**awarded_cmmc_level** | **String** | [Read-Only] The CMMC award level. | [optional] -**expiration_date** | **Integer** | [Read-Only] Expiration date of the awarded CMMC certification. | [optional] -**certificate_id** | **String** | [Read-Only] Unique identifier for the assessment/certificate. | [optional] -**model_version** | **String** | [Read-Only] Version of the CMMC Model used as part of the assessment. | [optional] -**ssps** | [**Array<Ssps>**](Ssps.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/CmmcResponseGet.md b/emass_client/ruby_client/docs/CmmcResponseGet.md deleted file mode 100644 index 34baace..0000000 --- a/emass_client/ruby_client/docs/CmmcResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::CmmcResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<CmmcGet>**](CmmcGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/ConnectivityCcsd.md b/emass_client/ruby_client/docs/ConnectivityCcsd.md deleted file mode 100644 index 7b008d3..0000000 --- a/emass_client/ruby_client/docs/ConnectivityCcsd.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::ConnectivityCcsd - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ccsd_number** | **String** | [Read-Only] Identifier for specific connections to the system. | [optional] -**connectivity** | **String** | [Read-Only] Choose connection type for the system. | [optional] - diff --git a/emass_client/ruby_client/docs/ControlsApi.md b/emass_client/ruby_client/docs/ControlsApi.md deleted file mode 100644 index ea3fd2e..0000000 --- a/emass_client/ruby_client/docs/ControlsApi.md +++ /dev/null @@ -1,140 +0,0 @@ -# EmassClient::ControlsApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_system_controls**](ControlsApi.md#get_system_controls) | **GET** /api/systems/{systemId}/controls | Get control information in a system for one or many controls -[**update_control_by_system_id**](ControlsApi.md#update_control_by_system_id) | **PUT** /api/systems/{systemId}/controls | Update control information in a system for one or many controls - -# **get_system_controls** -> ControlsResponseGet get_system_controls(system_id, opts) - -Get control information in a system for one or many controls - -Returns system control information for matching `systemId` path parameter - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ControlsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - acronyms: 'PM-6' # String | **Acronym**: The system acronym(s) being queried (single value or comma delimited values). -} - -begin - #Get control information in a system for one or many controls - result = api_instance.get_system_controls(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ControlsApi->get_system_controls: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **acronyms** | **String**| **Acronym**: The system acronym(s) being queried (single value or comma delimited values). | [optional] [default to PM-6] - -### Return type - -[**ControlsResponseGet**](ControlsResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **update_control_by_system_id** -> ControlsResponsePut update_control_by_system_id(bodysystem_id) - -Update control information in a system for one or many controls - - Update a Control for given `systemId`
**Request Body Required Fields** - `acronym` - `responsibleEntities` - `controlDesignation` - `estimatedCompletionDate` - `implementationNarrative` The following optional fields are required based on the Implementation Status `implementationStatus` value
| Value | Required Fields |--------------------------|--------------------------------------------------- | Planned or Implemented | `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` | Not Applicable | `naJustification`, `responsibleEntities` | Manually Inherited | `commonControlProvider`, `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` If the Implementation Status `implementationStatus` value is \"Inherited\", only the following fields can be updated: - `controlDesignation` - `commonnControlProvider` - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::ControlsApi.new -body = EmassClient::ControlsRequestPutBody.new # ControlsRequestPutBody | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Update control information in a system for one or many controls - result = api_instance.update_control_by_system_id(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling ControlsApi->update_control_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ControlsRequestPutBody**](ControlsRequestPutBody.md)| Update an existing control by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**ControlsResponsePut**](ControlsResponsePut.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/ControlsGet.md b/emass_client/ruby_client/docs/ControlsGet.md deleted file mode 100644 index 2cea84e..0000000 --- a/emass_client/ruby_client/docs/ControlsGet.md +++ /dev/null @@ -1,36 +0,0 @@ -# EmassClient::ControlsGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique system record identifier. | [optional] -**name** | **String** | [Read-only] Name of the system record. | [optional] -**acronym** | **String** | [Required] Acronym of the system record. | [optional] -**ccis** | **String** | [Read-only] Comma separated list of CCIs associated with the control. | [optional] -**is_inherited** | **BOOLEAN** | [Read-only] Indicates whether a control is inherited. | [optional] -**modified_by_overlays** | **String** | [Read-only] List of overlays that affect the control. | [optional] -**included_status** | **String** | [Read-only] Indicates the manner by which a control was included in the system’s categorization. | [optional] -**compliance_status** | **String** | [Read-only] Compliance of the control. | [optional] -**responsible_entities** | **String** | [Required] Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000. | [optional] -**implementation_status** | **String** | [Optional] Implementation Status of the Security Control for the information system. | [optional] -**common_control_provider** | **String** | [Conditional] Indicate the type of Common Control Provider for an “Inherited” Security Control. | [optional] -**na_justification** | **String** | [Conditional] Provide justification for Security Controls deemed Not Applicable to the system. | [optional] -**control_designation** | **String** | [Required] Control designations | [optional] -**estimated_completion_date** | **Integer** | [Required] Field is required for Implementation Plan. | [optional] -**implementation_narrative** | **String** | [Required] Includes security control comments. Character Limit = 2,000. | [optional] -**slcm_criticality** | **String** | [Conditional] Criticality of Security Control regarding SLCM. Character Limit = 2,000. | [optional] -**slcm_frequency** | **String** | [Conditional] SLCM frequency | [optional] -**slcm_method** | **String** | [Conditional] SLCM method utilized | [optional] -**slcm_reporting** | **String** | [Conditional] Method for reporting Security Control for SLCM. Character Limit = 2,000. | [optional] -**slcm_tracking** | **String** | [Conditional] How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000. | [optional] -**slcm_comments** | **String** | [Conditional] Additional comments for Security Control regarding SLCM. Character Limit = 4,000. | [optional] -**severity** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**vulnerabilty_summary** | **String** | [Optional] Include vulnerability summary. Character Limit = 2,000. | [optional] -**recommendations** | **String** | [Optional] Include recommendations. Character Limit = 2,000. | [optional] -**relevance_of_threat** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**likelihood** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact_description** | **String** | [Optional] Include description of Security Control’s impact. | [optional] -**residual_risk_level** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**test_method** | **String** | [Optional] Identifies the assessment method / combination that will determine if the security requirements are implemented correctly. | [optional] - diff --git a/emass_client/ruby_client/docs/ControlsPut.md b/emass_client/ruby_client/docs/ControlsPut.md deleted file mode 100644 index d6394df..0000000 --- a/emass_client/ruby_client/docs/ControlsPut.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::ControlsPut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acronym** | **String** | Acronym of the system record. | [optional] -**success** | **BOOLEAN** | Indicates if operations result (success/fail) | [optional] -**system_id** | **Integer** | The system identifier for the system being updated. | [optional] - diff --git a/emass_client/ruby_client/docs/ControlsRequestPutBody.md b/emass_client/ruby_client/docs/ControlsRequestPutBody.md deleted file mode 100644 index 54e8857..0000000 --- a/emass_client/ruby_client/docs/ControlsRequestPutBody.md +++ /dev/null @@ -1,29 +0,0 @@ -# EmassClient::ControlsRequestPutBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acronym** | **String** | [Required] Required to match the NIST SP 800-53 Revision 4. | -**responsible_entities** | **String** | [Required] Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000. | -**implementation_status** | **String** | [Optional] Implementation Status of the Security Control for the information system. | [optional] -**common_control_provider** | **String** | [Conditional] Indicate the type of Common Control Provider for an “Inherited” Security Control. | [optional] -**na_justification** | **String** | [Conditional] Provide justification for Security Controls deemed Not Applicable to the system. | [optional] -**control_designation** | **String** | [Required] Control designations | -**test_method** | **String** | [Optional] Identifies the assessment method / combination that will determine if the security requirements are implemented correctly. | [optional] -**estimated_completion_date** | **Integer** | [Required] Field is required for Implementation Plan. | -**implementation_narrative** | **String** | [Required] Includes security control comments. Character Limit = 2,000. | -**slcm_criticality** | **String** | [Conditional] Criticality of Security Control regarding SLCM. Character Limit = 2,000. | [optional] -**slcm_frequency** | **String** | [Conditional] SLCM frequency | [optional] -**slcm_method** | **String** | [Conditional] SLCM method utilized | [optional] -**slcm_reporting** | **String** | [Conditional] Method for reporting Security Control for SLCM. Character Limit = 2,000. | [optional] -**slcm_tracking** | **String** | [Conditional] How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000. | [optional] -**slcm_comments** | **String** | [Conditional] Additional comments for Security Control regarding SLCM. Character Limit = 4,000. | [optional] -**severity** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**vulnerabilty_summary** | **String** | [Optional] Include vulnerability summary. Character Limit = 2,000. | [optional] -**recommendations** | **String** | [Optional] Include recommendations. Character Limit = 2,000. | [optional] -**relevance_of_threat** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**likelihood** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact_description** | **String** | [Optional] Include description of Security Control's impact. | [optional] -**residual_risk_level** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] - diff --git a/emass_client/ruby_client/docs/ControlsResponseGet.md b/emass_client/ruby_client/docs/ControlsResponseGet.md deleted file mode 100644 index 7463184..0000000 --- a/emass_client/ruby_client/docs/ControlsResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::ControlsResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<ControlsGet>**](ControlsGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/ControlsResponsePut.md b/emass_client/ruby_client/docs/ControlsResponsePut.md deleted file mode 100644 index bbfb8b5..0000000 --- a/emass_client/ruby_client/docs/ControlsResponsePut.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::ControlsResponsePut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<ControlsPut>**](ControlsPut.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/DefinitionTransitions.md b/emass_client/ruby_client/docs/DefinitionTransitions.md deleted file mode 100644 index 9dd7c84..0000000 --- a/emass_client/ruby_client/docs/DefinitionTransitions.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::DefinitionTransitions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**end_stage** | **String** | [Read-Only] The landing stage that is active after performing a transition. | [optional] -**description** | **String** | [Read-Only] Description of the workflow or the stage transition. For stage transitions, this matches the action dropdown that appears for PAC users. | [optional] -**roles** | **Array<String>** | | [optional] - diff --git a/emass_client/ruby_client/docs/DeleteMilestone.md b/emass_client/ruby_client/docs/DeleteMilestone.md deleted file mode 100644 index ed6acec..0000000 --- a/emass_client/ruby_client/docs/DeleteMilestone.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::DeleteMilestone - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milestone_id** | **Integer** | [Required] Unique item identifier | - diff --git a/emass_client/ruby_client/docs/DeletePoam.md b/emass_client/ruby_client/docs/DeletePoam.md deleted file mode 100644 index 8d63c46..0000000 --- a/emass_client/ruby_client/docs/DeletePoam.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::DeletePoam - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poam_id** | **Integer** | [Required] Unique item identifier | - diff --git a/emass_client/ruby_client/docs/Empty200Response.md b/emass_client/ruby_client/docs/Empty200Response.md deleted file mode 100644 index aabaad9..0000000 --- a/emass_client/ruby_client/docs/Empty200Response.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::Empty200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/Error.md b/emass_client/ruby_client/docs/Error.md deleted file mode 100644 index 8bf3928..0000000 --- a/emass_client/ruby_client/docs/Error.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Error - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **String** | | -**message** | **String** | | - diff --git a/emass_client/ruby_client/docs/InstancesTransitions.md b/emass_client/ruby_client/docs/InstancesTransitions.md deleted file mode 100644 index 6ff4711..0000000 --- a/emass_client/ruby_client/docs/InstancesTransitions.md +++ /dev/null @@ -1,12 +0,0 @@ -# EmassClient::InstancesTransitions - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**comments** | **String** | [Read-Only] Comments entered by the user when performing the transition. | [optional] -**created_by** | **String** | [Read-Only] User that performed the workflow transition. | [optional] -**created_date** | **Integer** | [Read-Only] Date the workflow instance or the workflow transition was created. | [optional] -**description** | **String** | [Read-Only] Description of the stage transition. This matches the action dropdown that appears for PAC users. | [optional] -**end_stage** | **String** | [Read-Only] The landing stage that is active after performing a transition. | [optional] -**start_stage** | **String** | [Read-Only] The beginning stage that is active before performing a transition. | [optional] - diff --git a/emass_client/ruby_client/docs/MilestoneResponseGet.md b/emass_client/ruby_client/docs/MilestoneResponseGet.md deleted file mode 100644 index 3690403..0000000 --- a/emass_client/ruby_client/docs/MilestoneResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::MilestoneResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<MilestonesGet>**](MilestonesGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/MilestoneResponsePost.md b/emass_client/ruby_client/docs/MilestoneResponsePost.md deleted file mode 100644 index b860190..0000000 --- a/emass_client/ruby_client/docs/MilestoneResponsePost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::MilestoneResponsePost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<MilestonesPost>**](MilestonesPost.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/MilestoneResponsePut.md b/emass_client/ruby_client/docs/MilestoneResponsePut.md deleted file mode 100644 index 15ca40a..0000000 --- a/emass_client/ruby_client/docs/MilestoneResponsePut.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::MilestoneResponsePut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<MilestonesPut>**](MilestonesPut.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/MilestonesApi.md b/emass_client/ruby_client/docs/MilestonesApi.md deleted file mode 100644 index 1b1bd5b..0000000 --- a/emass_client/ruby_client/docs/MilestonesApi.md +++ /dev/null @@ -1,350 +0,0 @@ -# EmassClient::MilestonesApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_milestone_by_system_id_and_poam_id**](MilestonesApi.md#add_milestone_by_system_id_and_poam_id) | **POST** /api/systems/{systemId}/poams/{poamId}/milestones | Add milestones to one or many POA&M items in a system -[**delete_milestone**](MilestonesApi.md#delete_milestone) | **DELETE** /api/systems/{systemId}/poams/{poamId}/milestones | Remove milestones in a system for one or many POA&M items -[**get_system_milestones_by_poam_id**](MilestonesApi.md#get_system_milestones_by_poam_id) | **GET** /api/systems/{systemId}/poams/{poamId}/milestones | Get milestones in one or many POA&M items in a system -[**get_system_milestones_by_poam_id_and_milestone_id**](MilestonesApi.md#get_system_milestones_by_poam_id_and_milestone_id) | **GET** /api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId} | Get milestone by ID in POA&M item in a system -[**update_milestone_by_system_id_and_poam_id**](MilestonesApi.md#update_milestone_by_system_id_and_poam_id) | **PUT** /api/systems/{systemId}/poams/{poamId}/milestones | Update one or many POA&M items in a system - -# **add_milestone_by_system_id_and_poam_id** -> MilestoneResponsePost add_milestone_by_system_id_and_poam_id(bodysystem_idpoam_id) - -Add milestones to one or many POA&M items in a system - -Adds a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate` - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -body = EmassClient::MilestonesRequestPostBody.new # MilestonesRequestPostBody | Update an existing milestone -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Add milestones to one or many POA&M items in a system - result = api_instance.add_milestone_by_system_id_and_poam_id(bodysystem_idpoam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->add_milestone_by_system_id_and_poam_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MilestonesRequestPostBody**](MilestonesRequestPostBody.md)| Update an existing milestone | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **poam_id** | **Integer**| **POA&M Id**: The unique POA&M record identifier. | - -### Return type - -[**MilestoneResponsePost**](MilestoneResponsePost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **delete_milestone** -> Empty200Response delete_milestone(bodysystem_idpoam_id) - -Remove milestones in a system for one or many POA&M items - -Remove the POA&M matching `systemId` path parameter
**Notes**
To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -body = EmassClient::DeleteMilestone.new # DeleteMilestone | Delete the given Milestone Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Remove milestones in a system for one or many POA&M items - result = api_instance.delete_milestone(bodysystem_idpoam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->delete_milestone: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DeleteMilestone**](DeleteMilestone.md)| Delete the given Milestone Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **poam_id** | **Integer**| **POA&M Id**: The unique POA&M record identifier. | - -### Return type - -[**Empty200Response**](Empty200Response.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_system_milestones_by_poam_id** -> MilestoneResponseGet get_system_milestones_by_poam_id(system_id, poam_id, opts) - -Get milestones in one or many POA&M items in a system - -Returns system containing milestones for matching parameters. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. -opts = { - scheduled_completion_date_start: 'scheduled_completion_date_start_example', # String | **Date Started**: Filter query by the scheduled completion start date (Unix date format). - scheduled_completion_date_end: 'scheduled_completion_date_end_example' # String | **Date Ended**: Filter query by the scheduled completion start date (Unix date format). -} - -begin - #Get milestones in one or many POA&M items in a system - result = api_instance.get_system_milestones_by_poam_id(system_id, poam_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->get_system_milestones_by_poam_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **poam_id** | **Integer**| **POA&M Id**: The unique POA&M record identifier. | - **scheduled_completion_date_start** | **String**| **Date Started**: Filter query by the scheduled completion start date (Unix date format). | [optional] - **scheduled_completion_date_end** | **String**| **Date Ended**: Filter query by the scheduled completion start date (Unix date format). | [optional] - -### Return type - -[**MilestoneResponseGet**](MilestoneResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_system_milestones_by_poam_id_and_milestone_id** -> MilestoneResponseGet get_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id) - -Get milestone by ID in POA&M item in a system - -Returns systems containing milestones for matching parameters. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. -milestone_id = 56 # Integer | **Milestone Id**: The unique milestone record identifier. - - -begin - #Get milestone by ID in POA&M item in a system - result = api_instance.get_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->get_system_milestones_by_poam_id_and_milestone_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **poam_id** | **Integer**| **POA&M Id**: The unique POA&M record identifier. | - **milestone_id** | **Integer**| **Milestone Id**: The unique milestone record identifier. | - -### Return type - -[**MilestoneResponseGet**](MilestoneResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **update_milestone_by_system_id_and_poam_id** -> MilestoneResponsePut update_milestone_by_system_id_and_poam_id(bodysystem_idpoam_id) - -Update one or many POA&M items in a system - -Updates a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate` - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::MilestonesApi.new -body = EmassClient::MilestonesRequestPutBody.new # MilestonesRequestPutBody | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Update one or many POA&M items in a system - result = api_instance.update_milestone_by_system_id_and_poam_id(bodysystem_idpoam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling MilestonesApi->update_milestone_by_system_id_and_poam_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**MilestonesRequestPutBody**](MilestonesRequestPutBody.md)| Update an existing control by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **poam_id** | **Integer**| **POA&M Id**: The unique POA&M record identifier. | - -### Return type - -[**MilestoneResponsePut**](MilestoneResponsePut.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/MilestonesDelete.md b/emass_client/ruby_client/docs/MilestonesDelete.md deleted file mode 100644 index e92d633..0000000 --- a/emass_client/ruby_client/docs/MilestonesDelete.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::MilestonesDelete - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/MilestonesGet.md b/emass_client/ruby_client/docs/MilestonesGet.md deleted file mode 100644 index 73077ed..0000000 --- a/emass_client/ruby_client/docs/MilestonesGet.md +++ /dev/null @@ -1,12 +0,0 @@ -# EmassClient::MilestonesGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique eMASS system identifier. | [optional] -**milestone_id** | **Integer** | [Required] Unique item identifier | [optional] -**poam_id** | **Integer** | [Required] Unique item identifier | [optional] -**description** | **String** | [Required] Include milestone description. | [optional] -**scheduled_completion_date** | **Integer** | [Required] Required for ongoing and completed POA&M items. Unix time format. | [optional] -**review_status** | **String** | [Read-Only] Values include the following options: (Not Approved,Under Review,Approved) | [optional] - diff --git a/emass_client/ruby_client/docs/MilestonesPost.md b/emass_client/ruby_client/docs/MilestonesPost.md deleted file mode 100644 index 60eba0c..0000000 --- a/emass_client/ruby_client/docs/MilestonesPost.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::MilestonesPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/MilestonesPut.md b/emass_client/ruby_client/docs/MilestonesPut.md deleted file mode 100644 index d1c0c16..0000000 --- a/emass_client/ruby_client/docs/MilestonesPut.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::MilestonesPut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/MilestonesPutPostDelete.md b/emass_client/ruby_client/docs/MilestonesPutPostDelete.md deleted file mode 100644 index d7fbb3d..0000000 --- a/emass_client/ruby_client/docs/MilestonesPutPostDelete.md +++ /dev/null @@ -1,11 +0,0 @@ -# EmassClient::MilestonesPutPostDelete - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | The system identifier that the POAM was added. | [optional] -**poam_id** | **Integer** | The newly created POAM identifier | [optional] -**milestone_id** | **Integer** | The Milestone unique item identifier | [optional] -**external_uid** | **String** | The unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. | [optional] -**success** | **BOOLEAN** | Indicates if operations result (success/fail) | [optional] - diff --git a/emass_client/ruby_client/docs/MilestonesRequestPostBody.md b/emass_client/ruby_client/docs/MilestonesRequestPostBody.md deleted file mode 100644 index c8fa09f..0000000 --- a/emass_client/ruby_client/docs/MilestonesRequestPostBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::MilestonesRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poam_id** | **Integer** | [Required] Unique POA&M item identifier. | -**description** | **String** | [Required] Provide a description of the milestone. | -**scheduled_completion_date** | **Integer** | [Required] Unix date format. | - diff --git a/emass_client/ruby_client/docs/MilestonesRequestPutBody.md b/emass_client/ruby_client/docs/MilestonesRequestPutBody.md deleted file mode 100644 index 6a456b0..0000000 --- a/emass_client/ruby_client/docs/MilestonesRequestPutBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::MilestonesRequestPutBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milestone_id** | **Integer** | [Required] Unique milestone identifier. | -**description** | **String** | [Required] Provide a description of the milestone. | -**scheduled_completion_date** | **Integer** | [Required] Unix date format. | - diff --git a/emass_client/ruby_client/docs/MilestonesRequiredPost.md b/emass_client/ruby_client/docs/MilestonesRequiredPost.md deleted file mode 100644 index cdd18a6..0000000 --- a/emass_client/ruby_client/docs/MilestonesRequiredPost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::MilestonesRequiredPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | [Required] Include milestone description. | -**scheduled_completion_date** | **Integer** | [Required] Required for ongoing and completed POA&M items. Unix time format. | - diff --git a/emass_client/ruby_client/docs/MilestonesRequiredPut.md b/emass_client/ruby_client/docs/MilestonesRequiredPut.md deleted file mode 100644 index 725504f..0000000 --- a/emass_client/ruby_client/docs/MilestonesRequiredPut.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::MilestonesRequiredPut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**milestone_id** | **Integer** | [Required] Unique item identifier | -**description** | **String** | [Required] Include milestone description. | -**scheduled_completion_date** | **Integer** | [Required] Shecdule completion date. Unix time format. | - diff --git a/emass_client/ruby_client/docs/Model200.md b/emass_client/ruby_client/docs/Model200.md deleted file mode 100644 index c36d45f..0000000 --- a/emass_client/ruby_client/docs/Model200.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 200] - diff --git a/emass_client/ruby_client/docs/Model201.md b/emass_client/ruby_client/docs/Model201.md deleted file mode 100644 index ba0fe34..0000000 --- a/emass_client/ruby_client/docs/Model201.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model201 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model201Meta**](Model201Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model201Meta.md b/emass_client/ruby_client/docs/Model201Meta.md deleted file mode 100644 index 065f9cf..0000000 --- a/emass_client/ruby_client/docs/Model201Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model201Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 201] -**message** | **String** | | [optional] [default to 'Request was fulfilled and resulted in on or more new resources being successfully created on the server.'] - diff --git a/emass_client/ruby_client/docs/Model400.md b/emass_client/ruby_client/docs/Model400.md deleted file mode 100644 index 6bfabc5..0000000 --- a/emass_client/ruby_client/docs/Model400.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model400 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model400Meta**](Model400Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model400Meta.md b/emass_client/ruby_client/docs/Model400Meta.md deleted file mode 100644 index 5c588bf..0000000 --- a/emass_client/ruby_client/docs/Model400Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model400Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 400] -**error_message** | **String** | | [optional] [default to 'Request could not be understood by the server due to incorrect syntax or an unexpected format'] - diff --git a/emass_client/ruby_client/docs/Model400Response.md b/emass_client/ruby_client/docs/Model400Response.md deleted file mode 100644 index 8209fbf..0000000 --- a/emass_client/ruby_client/docs/Model400Response.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model400Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model400**](Model400.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model401.md b/emass_client/ruby_client/docs/Model401.md deleted file mode 100644 index 6c7f7e2..0000000 --- a/emass_client/ruby_client/docs/Model401.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model401 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model401Meta**](Model401Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model401Meta.md b/emass_client/ruby_client/docs/Model401Meta.md deleted file mode 100644 index e169f63..0000000 --- a/emass_client/ruby_client/docs/Model401Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model401Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 401] -**error_message** | **String** | | [optional] [default to 'Request has failed to provide suitable authentication from the client'] - diff --git a/emass_client/ruby_client/docs/Model403.md b/emass_client/ruby_client/docs/Model403.md deleted file mode 100644 index 276e93c..0000000 --- a/emass_client/ruby_client/docs/Model403.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model403 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model403Meta**](Model403Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model403Meta.md b/emass_client/ruby_client/docs/Model403Meta.md deleted file mode 100644 index 34d0657..0000000 --- a/emass_client/ruby_client/docs/Model403Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model403Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 403] -**error_message** | **String** | | [optional] [default to 'Request was blocked by the application due to a lack of client permissions to the API or to a specific endpoint'] - diff --git a/emass_client/ruby_client/docs/Model404.md b/emass_client/ruby_client/docs/Model404.md deleted file mode 100644 index eedb6a4..0000000 --- a/emass_client/ruby_client/docs/Model404.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model404 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 404] -**error_message** | **String** | | [optional] [default to 'Request has failed because the URL provided in the request did not match any available endpoint locations'] - diff --git a/emass_client/ruby_client/docs/Model404Response.md b/emass_client/ruby_client/docs/Model404Response.md deleted file mode 100644 index 700d5ad..0000000 --- a/emass_client/ruby_client/docs/Model404Response.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model404Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model404**](Model404.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model405.md b/emass_client/ruby_client/docs/Model405.md deleted file mode 100644 index 6a9d118..0000000 --- a/emass_client/ruby_client/docs/Model405.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model405 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model405Meta**](Model405Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model405Meta.md b/emass_client/ruby_client/docs/Model405Meta.md deleted file mode 100644 index 9ddca73..0000000 --- a/emass_client/ruby_client/docs/Model405Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model405Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 405] -**error_message** | **String** | | [optional] [default to 'Request was made with a verb (GET, POST, etc.) that is not permitted for the endpoint'] - diff --git a/emass_client/ruby_client/docs/Model411.md b/emass_client/ruby_client/docs/Model411.md deleted file mode 100644 index 1d70340..0000000 --- a/emass_client/ruby_client/docs/Model411.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model411 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model411Meta**](Model411Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model411Meta.md b/emass_client/ruby_client/docs/Model411Meta.md deleted file mode 100644 index b73b03e..0000000 --- a/emass_client/ruby_client/docs/Model411Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model411Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 411] -**error_message** | **String** | | [optional] [default to 'Request was of type POST and failed to provide the server information about the data/content length being submitted'] - diff --git a/emass_client/ruby_client/docs/Model490.md b/emass_client/ruby_client/docs/Model490.md deleted file mode 100644 index cfcd322..0000000 --- a/emass_client/ruby_client/docs/Model490.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model490 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model490Meta**](Model490Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model490Meta.md b/emass_client/ruby_client/docs/Model490Meta.md deleted file mode 100644 index 7ba1ba5..0000000 --- a/emass_client/ruby_client/docs/Model490Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model490Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 490] -**error_message** | **String** | | [optional] [default to 'Request has failed because too much data was requested in a single batch. This error is specific to eMASS'] - diff --git a/emass_client/ruby_client/docs/Model500.md b/emass_client/ruby_client/docs/Model500.md deleted file mode 100644 index f61a9a2..0000000 --- a/emass_client/ruby_client/docs/Model500.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::Model500 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model500Meta**](Model500Meta.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Model500Meta.md b/emass_client/ruby_client/docs/Model500Meta.md deleted file mode 100644 index 3c01b67..0000000 --- a/emass_client/ruby_client/docs/Model500Meta.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Model500Meta - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Integer** | | [optional] [default to 500] -**error_message** | **String** | | [optional] [default to 'Server encountered an unexpected condition which prevented it from fulfilling the request'] - diff --git a/emass_client/ruby_client/docs/PACApi.md b/emass_client/ruby_client/docs/PACApi.md deleted file mode 100644 index f70a0b8..0000000 --- a/emass_client/ruby_client/docs/PACApi.md +++ /dev/null @@ -1,137 +0,0 @@ -# EmassClient::PACApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_system_pac**](PACApi.md#add_system_pac) | **POST** /api/systems/{systemId}/approval/pac | Submit system package for review -[**get_system_pac**](PACApi.md#get_system_pac) | **GET** /api/systems/{systemId}/approval/pac | Get location of system package in PAC - -# **add_system_pac** -> PacResponsePost add_system_pac(bodysystem_id) - -Submit system package for review - -Adds a Package Approval Chain (PAC) for given `systemId` path parameter - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::PACApi.new -body = EmassClient::PacRequestPostBody.new # PacRequestPostBody | Update an existing Artifact by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Submit system package for review - result = api_instance.add_system_pac(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling PACApi->add_system_pac: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**PacRequestPostBody**](PacRequestPostBody.md)| Update an existing Artifact by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**PacResponsePost**](PacResponsePost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_system_pac** -> PacResponseGet get_system_pac(system_id) - -Get location of system package in PAC - -Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::PACApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Get location of system package in PAC - result = api_instance.get_system_pac(system_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling PACApi->get_system_pac: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**PacResponseGet**](PacResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/POAMApi.md b/emass_client/ruby_client/docs/POAMApi.md deleted file mode 100644 index 79ad90b..0000000 --- a/emass_client/ruby_client/docs/POAMApi.md +++ /dev/null @@ -1,346 +0,0 @@ -# EmassClient::POAMApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_poam_by_system_id**](POAMApi.md#add_poam_by_system_id) | **POST** /api/systems/{systemId}/poams | Add one or many POA&M items in a system -[**delete_poam**](POAMApi.md#delete_poam) | **DELETE** /api/systems/{systemId}/poams | Remove one or many POA&M items in a system -[**get_system_poams**](POAMApi.md#get_system_poams) | **GET** /api/systems/{systemId}/poams | Get one or many POA&M items in a system -[**get_system_poams_by_poam_id**](POAMApi.md#get_system_poams_by_poam_id) | **GET** /api/systems/{systemId}/poams/{poamId} | Get POA&M item by ID in a system -[**update_poam_by_system_id**](POAMApi.md#update_poam_by_system_id) | **PUT** /api/systems/{systemId}/poams | Update one or many POA&M items in a system - -# **add_poam_by_system_id** -> PoamResponsePost add_poam_by_system_id(bodysystem_id) - -Add one or many POA&M items in a system - -Add a POA&M for given `systemId`
**Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` **Note**
If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.
`pocFirstName`, `pocLastName`, `pocPhoneNumber`
- -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -body = EmassClient::PoamRequiredPost.new # PoamRequiredPost | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Add one or many POA&M items in a system - result = api_instance.add_poam_by_system_id(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->add_poam_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**PoamRequiredPost**](PoamRequiredPost.md)| Update an existing control by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**PoamResponsePost**](PoamResponsePost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **delete_poam** -> PoamResponseDelete delete_poam(bodysystem_id) - -Remove one or many POA&M items in a system - -Remove the POA&M matching `systemId` path parameter and `poamId` query parameter
- -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -body = EmassClient::DeletePoam.new # DeletePoam | Delete the given POA&M Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Remove one or many POA&M items in a system - result = api_instance.delete_poam(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->delete_poam: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DeletePoam**](DeletePoam.md)| Delete the given POA&M Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**PoamResponseDelete**](PoamResponseDelete.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_system_poams** -> PoamResponseGet get_system_poams(system_id, opts) - -Get one or many POA&M items in a system - -Returns system(s) containing POA&M items for matching parameters. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - scheduled_completion_date_start: 'scheduled_completion_date_start_example', # String | **Date Started**: Filter query by the scheduled completion start date (Unix date format). - scheduled_completion_date_end: 'scheduled_completion_date_end_example', # String | **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - control_acronyms: 'control_acronyms_example', # String | **System Acronym**: Filter query by given system acronym (single or comma separated). - ccis: 'ccis_example', # String | **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - system_only: true # BOOLEAN | **Systems Only**: Indicates that only system(s) information is retrieved. -} - -begin - #Get one or many POA&M items in a system - result = api_instance.get_system_poams(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->get_system_poams: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **scheduled_completion_date_start** | **String**| **Date Started**: Filter query by the scheduled completion start date (Unix date format). | [optional] - **scheduled_completion_date_end** | **String**| **Date Ended**: Filter query by the scheduled completion start date (Unix date format). | [optional] - **control_acronyms** | **String**| **System Acronym**: Filter query by given system acronym (single or comma separated). | [optional] - **ccis** | **String**| **CCI System**: Filter query by Control Correlation Identifiers (CCIs). | [optional] - **system_only** | **BOOLEAN**| **Systems Only**: Indicates that only system(s) information is retrieved. | [optional] [default to true] - -### Return type - -[**PoamResponseGet**](PoamResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_system_poams_by_poam_id** -> PoamResponseGet get_system_poams_by_poam_id(system_id, poam_id) - -Get POA&M item by ID in a system - -Returns system(s) containing POA&M items for matching parameters. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -poam_id = 56 # Integer | **POA&M Id**: The unique POA&M record identifier. - - -begin - #Get POA&M item by ID in a system - result = api_instance.get_system_poams_by_poam_id(system_id, poam_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->get_system_poams_by_poam_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **poam_id** | **Integer**| **POA&M Id**: The unique POA&M record identifier. | - -### Return type - -[**PoamResponseGet**](PoamResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **update_poam_by_system_id** -> PoamResponsePut update_poam_by_system_id(bodysystem_id) - -Update one or many POA&M items in a system - -Update a POA&M for given `systemId`
**Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` **Notes** - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.
`pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`
- To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::POAMApi.new -body = EmassClient::PoamRequiredPut.new # PoamRequiredPut | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Update one or many POA&M items in a system - result = api_instance.update_poam_by_system_id(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling POAMApi->update_poam_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**PoamRequiredPut**](PoamRequiredPut.md)| Update an existing control by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**PoamResponsePut**](PoamResponsePut.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/PacGet.md b/emass_client/ruby_client/docs/PacGet.md deleted file mode 100644 index 2ccc453..0000000 --- a/emass_client/ruby_client/docs/PacGet.md +++ /dev/null @@ -1,14 +0,0 @@ -# EmassClient::PacGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique eMASS system identifier. | [optional] -**workflow** | **String** | [Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval) | [optional] -**name** | **String** | [Required] Package name. 100 Characters. | [optional] -**current_stage_name** | **String** | [Read-Only] Name of the current stage in the active workflow. | [optional] -**current_stage** | **Integer** | [Read-Only] Number of the current stage in the active workflow. | [optional] -**total_stages** | **Integer** | [Read-Only] Total number of stages in the active workflow. | [optional] -**days_at_current_stage** | **Integer** | [Read-Only] Indicates the number of days at current workflow stage. | [optional] -**comments** | **String** | [Required] Comments related to package approval chain. Character Limit = 4,000. | [optional] - diff --git a/emass_client/ruby_client/docs/PacPost.md b/emass_client/ruby_client/docs/PacPost.md deleted file mode 100644 index b88c1a1..0000000 --- a/emass_client/ruby_client/docs/PacPost.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::PacPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**workflow** | **String** | [Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval) | [optional] -**success** | **BOOLEAN** | | [optional] -**system_id** | **Integer** | | [optional] - diff --git a/emass_client/ruby_client/docs/PacRequestPostBody.md b/emass_client/ruby_client/docs/PacRequestPostBody.md deleted file mode 100644 index bebebd9..0000000 --- a/emass_client/ruby_client/docs/PacRequestPostBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::PacRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**workflow** | **String** | [Required] The PAC workflow | [optional] -**name** | **String** | [Required] Package name. 100 Characters. | [optional] -**comments** | **String** | [Required] Character Limit = 4,000. | [optional] - diff --git a/emass_client/ruby_client/docs/PacResponseGet.md b/emass_client/ruby_client/docs/PacResponseGet.md deleted file mode 100644 index 1a07a60..0000000 --- a/emass_client/ruby_client/docs/PacResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::PacResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<PacGet>**](PacGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PacResponsePost.md b/emass_client/ruby_client/docs/PacResponsePost.md deleted file mode 100644 index 8cae6dd..0000000 --- a/emass_client/ruby_client/docs/PacResponsePost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::PacResponsePost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<PacPost>**](PacPost.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PoamDelete.md b/emass_client/ruby_client/docs/PoamDelete.md deleted file mode 100644 index f87dd74..0000000 --- a/emass_client/ruby_client/docs/PoamDelete.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::PoamDelete - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/PoamGet.md b/emass_client/ruby_client/docs/PoamGet.md deleted file mode 100644 index 810a514..0000000 --- a/emass_client/ruby_client/docs/PoamGet.md +++ /dev/null @@ -1,39 +0,0 @@ -# EmassClient::PoamGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique eMASS system identifier. | [optional] -**poam_id** | **Integer** | [Required] Unique item identifier | [optional] -**display_poam_id** | **Integer** | [Required] Globally unique identifier for individual POA&M Items, seen on the front-end as “ID”. | [optional] -**is_inherited** | **BOOLEAN** | [Read-only] Indicates whether a test result is inherited. | [optional] -**external_uid** | **String** | [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. | [optional] -**control_acronyms** | **String** | [Optional] System acronym name. | [optional] -**cci** | **String** | [Optional] CCI associated with POA&M Item.. | [optional] -**status** | **String** | [Required] Values include the following: (Ongoing,Risk Accepted,Completed,Not Applicable | [optional] -**review_status** | **String** | [Read-Only] Values include the following options: (Not Approved,Under Review,Approved) | [optional] -**vulnerability_description** | **String** | [Required] Provide a description of the POA&M Item. 2000 Characters. | [optional] -**source_ident_vuln** | **String** | [Required] Include Source Identifying Vulnerability text. 2000 Characters. | [optional] -**security_checks** | **String** | [Optional] Security Checks that are associated with the POA&M. | [optional] -**milestones** | [**Array<MilestonesGet>**](MilestonesGet.md) | | [optional] -**poc_organization** | **String** | [Required] Organization/Office represented. 100 Characters. | [optional] -**poc_first_name** | **String** | [Conditional] First name of POC. 100 Characters. | [optional] -**poc_last_name** | **String** | [Conditional] Last name of POC. 100 Characters. | [optional] -**poc_email** | **String** | [Conditional] Email address of POC. 100 Characters. | [optional] -**poc_phone_number** | **String** | [Conditional] Phone number of POC (area code) ***-**** format. 100 Characters. | [optional] -**severity** | **String** | [Conditional] Required for approved items. Values include the following options (Very Low,Low,Moderate,High,Very High) | [optional] -**raw_severity** | **String** | [Optional] Values include the following options (I,II,III) | [optional] -**relevance_of_threat** | **String** | [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) | [optional] -**likelihood** | **String** | [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) | [optional] -**impact** | **String** | [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) | [optional] -**impact_description** | **String** | [Optional] Include description of Security Control’s impact. | [optional] -**residual_risk_level** | **String** | [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) | [optional] -**recommendations** | **String** | [Optional] Include recommendations. Character Limit = 2,000. | [optional] -**resources** | **String** | [Required] List of resources used. 250 Characters. | [optional] -**scheduled_completion_date** | **Integer** | [Conditional] Required for ongoing and completed POA&M items. Unix time format. | [optional] -**completion_date** | **Integer** | [Conditional] Field is required for completed POA&M items. Unix time format. | [optional] -**extension_date** | **Integer** | [Read-Only] Value returned for a POA&M Item with review status Approved” and has a milestone with a scheduled completion date that extends beyond the POA&M Item’s scheduled completion date. | [optional] -**comments** | **String** | [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters | [optional] -**mitigation** | **String** | [Optional] Include mitigation explanation. 2000 Characters. | [optional] -**is_active** | **BOOLEAN** | [Conditional] Optionally used in PUT to delete milestones when updating a POA&M. | [optional] - diff --git a/emass_client/ruby_client/docs/PoamPost.md b/emass_client/ruby_client/docs/PoamPost.md deleted file mode 100644 index f7d9f3a..0000000 --- a/emass_client/ruby_client/docs/PoamPost.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::PoamPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/PoamPostPutDel.md b/emass_client/ruby_client/docs/PoamPostPutDel.md deleted file mode 100644 index ef63d9c..0000000 --- a/emass_client/ruby_client/docs/PoamPostPutDel.md +++ /dev/null @@ -1,10 +0,0 @@ -# EmassClient::PoamPostPutDel - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | The system identifier for the system being updated. | [optional] -**poam_id** | **Integer** | The newly created POAM identifier | [optional] -**external_uid** | **String** | The unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. | [optional] -**success** | **BOOLEAN** | Indicates if operations result (success/fail) | [optional] - diff --git a/emass_client/ruby_client/docs/PoamPut.md b/emass_client/ruby_client/docs/PoamPut.md deleted file mode 100644 index 534dbdf..0000000 --- a/emass_client/ruby_client/docs/PoamPut.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::PoamPut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/PoamRequestPostBody.md b/emass_client/ruby_client/docs/PoamRequestPostBody.md deleted file mode 100644 index d33be05..0000000 --- a/emass_client/ruby_client/docs/PoamRequestPostBody.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::PoamRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/PoamRequestPutBody.md b/emass_client/ruby_client/docs/PoamRequestPutBody.md deleted file mode 100644 index 056594d..0000000 --- a/emass_client/ruby_client/docs/PoamRequestPutBody.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::PoamRequestPutBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/PoamRequiredPost.md b/emass_client/ruby_client/docs/PoamRequiredPost.md deleted file mode 100644 index 487bb8b..0000000 --- a/emass_client/ruby_client/docs/PoamRequiredPost.md +++ /dev/null @@ -1,32 +0,0 @@ -# EmassClient::PoamRequiredPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | [Required] Values include the following: (Ongoing,Risk Accepted,Completed,Not Applicable | [optional] -**vulnerability_description** | **String** | [Required] Provide a description of the POA&M Item. 2000 Characters. | [optional] -**source_ident_vuln** | **String** | [Required] Include Source Identifying Vulnerability text. 2000 Characters. | [optional] -**poc_organization** | **String** | [Required] Organization/Office represented. 100 Characters. | [optional] -**resources** | **String** | [Required] List of resources used. 250 Characters. | [optional] -**poc_first_name** | **String** | [Required] First name of POC. 100 Characters. | [optional] -**poc_last_name** | **String** | [Required] Last name of POC. 100 Characters. | [optional] -**poc_email** | **String** | [Required] Email address of POC. 100 Characters. | [optional] -**poc_phone_number** | **String** | [Required] Phone number of POC (area code) ***-**** format. 100 Characters. | [optional] -**external_uid** | **String** | [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. | [optional] -**control_acronym** | **String** | [Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined. | [optional] -**cci** | **String** | [Optional] CCI associated with POA&M. | [optional] -**security_checks** | **String** | [Optional] Security Checks that are associated with the POA&M. | [optional] -**raw_severity** | **String** | [Optional] Values include the following options (I,II,III) | [optional] -**relevance_of_threat** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**likelihood** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact_description** | **String** | [Optional] Include description of Security Control’s impact. | [optional] -**residual_risk_level** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**recommendations** | **String** | [Optional] Include recommendations. Character Limit = 2,000. | [optional] -**mitigation** | **String** | [Optional] Include mitigation explanation. 2000 Characters. | [optional] -**severity** | **String** | [Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High) | [optional] -**scheduled_completion_date** | **Integer** | [Conditional] Required for ongoing and completed POA&M items. Unix time format. | [optional] -**comments** | **String** | [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters | [optional] -**completion_date** | **Integer** | [Conditional] Field is required for completed POA&M items. Unix time format. | [optional] -**milestones** | [**Array<MilestonesRequiredPost>**](MilestonesRequiredPost.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PoamRequiredPut.md b/emass_client/ruby_client/docs/PoamRequiredPut.md deleted file mode 100644 index ccbecaf..0000000 --- a/emass_client/ruby_client/docs/PoamRequiredPut.md +++ /dev/null @@ -1,35 +0,0 @@ -# EmassClient::PoamRequiredPut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**poam_id** | **Integer** | [Required] Unique item identifier | [optional] -**display_poam_id** | **Integer** | [Required] Globally unique identifier for individual POA&M Items, seen on the front-end as “ID”. | [optional] -**status** | **String** | [Required] The POA&M status | [optional] -**vulnerability_description** | **String** | [Required] Provide a description of the POA&M Item. 2000 Characters. | [optional] -**source_ident_vuln** | **String** | [Required] Include Source Identifying Vulnerability text. 2000 Characters. | [optional] -**poc_organization** | **String** | [Required] Organization/Office represented. 100 Characters. | [optional] -**resources** | **String** | [Required] List of resources used. 250 Characters. | [optional] -**external_uid** | **String** | [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. | [optional] -**control_acronym** | **String** | [Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined. | [optional] -**cci** | **String** | CCI associated with POA&M. | [optional] -**security_checks** | **String** | [Optional] Security Checks that are associated with the POA&M. | [optional] -**raw_severity** | **String** | [Optional] Values include the following options (I,II,III) | [optional] -**relevance_of_threat** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**likelihood** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**impact_description** | **String** | [Optional] Include description of Security Control’s impact. | [optional] -**residual_risk_level** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**recommendations** | **String** | [Optional] Include recommendations. Character Limit = 2,000. | [optional] -**mitigation** | **String** | [Optional] Include mitigation explanation. 2000 Characters. | [optional] -**poc_first_name** | **String** | [Conditional] First name of POC. 100 Characters. | [optional] -**poc_last_name** | **String** | [Conditional] Last name of POC. 100 Characters. | [optional] -**poc_email** | **String** | [Conditional] Email address of POC. 100 Characters. | [optional] -**poc_phone_number** | **String** | [Conditional] Phone number of POC (area code) ***-**** format. 100 Characters. | [optional] -**severity** | **String** | [Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High) | [optional] -**scheduled_completion_date** | **Integer** | [Conditional] Required for ongoing and completed POA&M items. Unix time format. | [optional] -**completion_date** | **Integer** | [Conditional] Field is required for completed POA&M items. Unix time format. | [optional] -**comments** | **String** | [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters | [optional] -**is_active** | **BOOLEAN** | [Conditional] Optionally used in PUT to delete milestones when updating a POA&M. | [optional] -**milestones** | [**Array<MilestonesRequiredPut>**](MilestonesRequiredPut.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PoamResponseDelete.md b/emass_client/ruby_client/docs/PoamResponseDelete.md deleted file mode 100644 index 45b84c8..0000000 --- a/emass_client/ruby_client/docs/PoamResponseDelete.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::PoamResponseDelete - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<PoamDelete>**](PoamDelete.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PoamResponseGet.md b/emass_client/ruby_client/docs/PoamResponseGet.md deleted file mode 100644 index 49a44fa..0000000 --- a/emass_client/ruby_client/docs/PoamResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::PoamResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<PoamGet>**](PoamGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PoamResponsePost.md b/emass_client/ruby_client/docs/PoamResponsePost.md deleted file mode 100644 index fd0390c..0000000 --- a/emass_client/ruby_client/docs/PoamResponsePost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::PoamResponsePost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<PoamPost>**](PoamPost.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/PoamResponsePut.md b/emass_client/ruby_client/docs/PoamResponsePut.md deleted file mode 100644 index 77eeda3..0000000 --- a/emass_client/ruby_client/docs/PoamResponsePut.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::PoamResponsePut - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<PoamPut>**](PoamPut.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Register.md b/emass_client/ruby_client/docs/Register.md deleted file mode 100644 index 63f8fe9..0000000 --- a/emass_client/ruby_client/docs/Register.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Register - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**RegisterData**](RegisterData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/RegisterData.md b/emass_client/ruby_client/docs/RegisterData.md deleted file mode 100644 index 5e54a0f..0000000 --- a/emass_client/ruby_client/docs/RegisterData.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::RegisterData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apikey** | **String** | | [optional] - diff --git a/emass_client/ruby_client/docs/RegisterUserRequestPostBody.md b/emass_client/ruby_client/docs/RegisterUserRequestPostBody.md deleted file mode 100644 index 8442952..0000000 --- a/emass_client/ruby_client/docs/RegisterUserRequestPostBody.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::RegisterUserRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_uid** | **String** | | - diff --git a/emass_client/ruby_client/docs/RegistrationApi.md b/emass_client/ruby_client/docs/RegistrationApi.md deleted file mode 100644 index e3ffd03..0000000 --- a/emass_client/ruby_client/docs/RegistrationApi.md +++ /dev/null @@ -1,71 +0,0 @@ -# EmassClient::RegistrationApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_user**](RegistrationApi.md#register_user) | **POST** /api/api-key | Register user certificate and obtain an API key - -# **register_user** -> Register register_user(body) - -Register user certificate and obtain an API key - -Returns the api-key - This API key must be provided in the request header for all endpoint calls (api-key). - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::RegistrationApi.new -body = EmassClient::RegisterUserRequestPostBody.new # RegisterUserRequestPostBody | User certificate previously provided by eMASS. - - -begin - #Register user certificate and obtain an API key - result = api_instance.register_user(body) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling RegistrationApi->register_user: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegisterUserRequestPostBody**](RegisterUserRequestPostBody.md)| User certificate previously provided by eMASS. | - -### Return type - -[**Register**](Register.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/RoleCategory.md b/emass_client/ruby_client/docs/RoleCategory.md deleted file mode 100644 index 205f73e..0000000 --- a/emass_client/ruby_client/docs/RoleCategory.md +++ /dev/null @@ -1,10 +0,0 @@ -# EmassClient::RoleCategory - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Read-only] Unique system record identifier. | [optional] -**system_name** | **String** | [Read-only] Name of the system record. | [optional] -**system_acronym** | **String** | [Read-only] Acronym of the system record. | [optional] -**roles** | [**Array<Roles>**](Roles.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Roles.md b/emass_client/ruby_client/docs/Roles.md deleted file mode 100644 index e6f4046..0000000 --- a/emass_client/ruby_client/docs/Roles.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::Roles - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**role_category** | **String** | [Required] System role categories | [optional] -**role** | **String** | [Required] System role description | [optional] -**users** | [**Array<Users>**](Users.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Ssps.md b/emass_client/ruby_client/docs/Ssps.md deleted file mode 100644 index 4869951..0000000 --- a/emass_client/ruby_client/docs/Ssps.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::Ssps - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ssp_name** | **String** | [Read-Only] Name of the System Security Plan. | [optional] -**ssp_version** | **String** | [Read-Only] Version of the System Security Plan. | [optional] -**ssp_date** | **Integer** | Date of the System Security Plan. Unix date format. | [optional] - diff --git a/emass_client/ruby_client/docs/Stage.md b/emass_client/ruby_client/docs/Stage.md deleted file mode 100644 index 619f1fe..0000000 --- a/emass_client/ruby_client/docs/Stage.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Stage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | [Read-Only] Name of the stage. | [optional] -**transitions** | [**Array<DefinitionTransitions>**](DefinitionTransitions.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/StaticCodeApplication.md b/emass_client/ruby_client/docs/StaticCodeApplication.md deleted file mode 100644 index a90241c..0000000 --- a/emass_client/ruby_client/docs/StaticCodeApplication.md +++ /dev/null @@ -1,12 +0,0 @@ -# EmassClient::StaticCodeApplication - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**raw_severity** | **String** | [Optional] Scan vulnerability ratting | [optional] -**code_check_name** | **String** | [Required] Name of the software vulnerability or weakness. | [optional] -**count** | **Integer** | [Optional] Number of instances observed for a specified finding. | [optional] -**scan_date** | **Integer** | [Required] The date of the scan. Unix date format. | [optional] -**cwe_id** | **String** | [Required] The Common Weakness Enumerator (CWE) identifier. | [optional] -**clear_findings** | **BOOLEAN** | [Optional] When used by itself, can clear out all application findings for a single application/version pairing. | [optional] - diff --git a/emass_client/ruby_client/docs/StaticCodeRequestPostBody.md b/emass_client/ruby_client/docs/StaticCodeRequestPostBody.md deleted file mode 100644 index cbc7187..0000000 --- a/emass_client/ruby_client/docs/StaticCodeRequestPostBody.md +++ /dev/null @@ -1,6 +0,0 @@ -# EmassClient::StaticCodeRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - diff --git a/emass_client/ruby_client/docs/StaticCodeRequiredPost.md b/emass_client/ruby_client/docs/StaticCodeRequiredPost.md deleted file mode 100644 index d6d1f42..0000000 --- a/emass_client/ruby_client/docs/StaticCodeRequiredPost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::StaticCodeRequiredPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**application** | [**StaticCodeRequiredPostApplication**](StaticCodeRequiredPostApplication.md) | | [optional] -**application_findings** | [**Array<StaticCodeApplication>**](StaticCodeApplication.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/StaticCodeRequiredPostApplication.md b/emass_client/ruby_client/docs/StaticCodeRequiredPostApplication.md deleted file mode 100644 index 1681b22..0000000 --- a/emass_client/ruby_client/docs/StaticCodeRequiredPostApplication.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::StaticCodeRequiredPostApplication - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**application_name** | **String** | [Required] Name of the software application that was assessed. | [optional] -**version** | **String** | [Required] The version of the application. | [optional] - diff --git a/emass_client/ruby_client/docs/StaticCodeScansApi.md b/emass_client/ruby_client/docs/StaticCodeScansApi.md deleted file mode 100644 index ab5fd00..0000000 --- a/emass_client/ruby_client/docs/StaticCodeScansApi.md +++ /dev/null @@ -1,73 +0,0 @@ -# EmassClient::StaticCodeScansApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_static_code_scans_by_system_id**](StaticCodeScansApi.md#add_static_code_scans_by_system_id) | **POST** /api/systems/{systemId}/static-code-scans | Upload static code scans or Clear static code scans - -# **add_static_code_scans_by_system_id** -> Success200Response add_static_code_scans_by_system_id(bodysystem_id) - -Upload static code scans or Clear static code scans - -Upload or clear application scan findings into a system's `systemId` assets module. **Note:** To clear an application's findings, use only the field `clearFindings` as the Request body and set it to true. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::StaticCodeScansApi.new -body = EmassClient::StaticCodeRequiredPost.new # StaticCodeRequiredPost | Update an existing Artifact by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Upload static code scans or Clear static code scans - result = api_instance.add_static_code_scans_by_system_id(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling StaticCodeScansApi->add_static_code_scans_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**StaticCodeRequiredPost**](StaticCodeRequiredPost.md)| Update an existing Artifact by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**Success200Response**](Success200Response.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/Success200Response.md b/emass_client/ruby_client/docs/Success200Response.md deleted file mode 100644 index 95909db..0000000 --- a/emass_client/ruby_client/docs/Success200Response.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Success200Response - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<TestData>**](TestData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/SystemIdArtifactsBody.md b/emass_client/ruby_client/docs/SystemIdArtifactsBody.md deleted file mode 100644 index feed5a6..0000000 --- a/emass_client/ruby_client/docs/SystemIdArtifactsBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# EmassClient::SystemIdArtifactsBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**is_template** | **BOOLEAN** | | [optional] -**type** | **String** | | [optional] -**category** | **String** | | [optional] -**zipper** | **String** | | - diff --git a/emass_client/ruby_client/docs/SystemResponse.md b/emass_client/ruby_client/docs/SystemResponse.md deleted file mode 100644 index dfd5f44..0000000 --- a/emass_client/ruby_client/docs/SystemResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::SystemResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<Systems>**](Systems.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/SystemRolesApi.md b/emass_client/ruby_client/docs/SystemRolesApi.md deleted file mode 100644 index 76cc50a..0000000 --- a/emass_client/ruby_client/docs/SystemRolesApi.md +++ /dev/null @@ -1,137 +0,0 @@ -# EmassClient::SystemRolesApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_system_roles**](SystemRolesApi.md#get_system_roles) | **GET** /api/system-roles | Get available roles -[**get_system_roles_by_category_id**](SystemRolesApi.md#get_system_roles_by_category_id) | **GET** /api/system-roles/{roleCategory} | Get system roles - -# **get_system_roles** -> SystemRolesResponse get_system_roles - -Get available roles - -Returns all available roles - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemRolesApi.new - -begin - #Get available roles - result = api_instance.get_system_roles - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemRolesApi->get_system_roles: #{e}" -end -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**SystemRolesResponse**](SystemRolesResponse.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_system_roles_by_category_id** -> SystemRolesCategoryResponse get_system_roles_by_category_id(role_category, role, opts) - -Get system roles - -Returns the role(s) data matching parameters. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemRolesApi.new -role_category = 'role_category_example' # String | **Role Category**: The system role category been queried -role = 'IAO' # String | **Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA. -opts = { - policy: 'rmf', # String | **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - include_decommissioned: true # BOOLEAN | **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. -} - -begin - #Get system roles - result = api_instance.get_system_roles_by_category_id(role_category, role, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemRolesApi->get_system_roles_by_category_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **role_category** | **String**| **Role Category**: The system role category been queried | - **role** | **String**| **Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA. | [default to IAO] - **policy** | **String**| **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. | [optional] [default to rmf] - **include_decommissioned** | **BOOLEAN**| **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. | [optional] [default to true] - -### Return type - -[**SystemRolesCategoryResponse**](SystemRolesCategoryResponse.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/SystemRolesCategoryResponse.md b/emass_client/ruby_client/docs/SystemRolesCategoryResponse.md deleted file mode 100644 index bf5928e..0000000 --- a/emass_client/ruby_client/docs/SystemRolesCategoryResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::SystemRolesCategoryResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<RoleCategory>**](RoleCategory.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/SystemRolesResponse.md b/emass_client/ruby_client/docs/SystemRolesResponse.md deleted file mode 100644 index f817580..0000000 --- a/emass_client/ruby_client/docs/SystemRolesResponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::SystemRolesResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<SystemRolesResponseData>**](SystemRolesResponseData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/SystemRolesResponseData.md b/emass_client/ruby_client/docs/SystemRolesResponseData.md deleted file mode 100644 index ab76423..0000000 --- a/emass_client/ruby_client/docs/SystemRolesResponseData.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::SystemRolesResponseData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**role_category** | **String** | | [optional] [default to 'PAC'] -**role** | **String** | | [optional] [default to 'PM/IAM'] - diff --git a/emass_client/ruby_client/docs/Systems.md b/emass_client/ruby_client/docs/Systems.md deleted file mode 100644 index 420bb71..0000000 --- a/emass_client/ruby_client/docs/Systems.md +++ /dev/null @@ -1,70 +0,0 @@ -# EmassClient::Systems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Read-only] Unique system record identifier. | [optional] -**policy** | **String** | [Read-only] RMF/DIACAP Policy identifier for the system record. | [optional] -**registration_type** | **String** | [Read-Only] Registration types parameters (assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider.) | [optional] -**name** | **String** | [Read-only] Name of the system record. | [optional] -**acronym** | **String** | [Read-only] Acronym of the system record. | [optional] -**description** | **String** | [Read-only] Description of the system record. | [optional] -**system_owner** | **String** | [Read-only] Owning organization of the system record. | [optional] -**organization_name** | **String** | [Read-only] Name of the top-level component that owns the system (e.g. Navy, Air Force, Army, etc..). | [optional] -**secondary_organization** | **String** | [Read-only] Secondary organization that owns the system record (i.e. Sub-Organization-level. | [optional] -**version_release_no** | **String** | [Read-only] Version/Release Number of system record. | [optional] -**system_type** | **String** | [Read-only] Type of the system record. RMF values include the following options (IS Major Application, IS Enclave, Platform IT System). DIACAP values include the following options (Platform IT, Interconnection, AIS Application) | [optional] -**is_nss** | **BOOLEAN** | [Read-only] Is the system record a National Security System? | [optional] -**is_public_facing** | **BOOLEAN** | [Read-only] Does the system record have a public facing component/presence. | [optional] -**coams_id** | **Integer** | [Read-only] Corresponding Cyber Operational Attributes Management System (COAMS) identifier for the system record. | [optional] -**is_type_authorization** | **BOOLEAN** | [Read-only] Identifies if system is a Type Authorization. | [optional] -**ditpr_id** | **String** | [Read-only] DITPR ID of the system record. | [optional] -**authorization_status** | **String** | [Read-only] Authorization Status of the system record. | [optional] -**authorization_date** | **Integer** | [Read-only] Authorization Date of the system record. | [optional] -**authorization_termination_date** | **Integer** | [Read-only] Authorization Termination Date of the system record. | [optional] -**authorization_length** | **Integer** | [Read-only] Length of system’s Authorization. Calculated based off of Authorization Date & Authorization Termination Date. | [optional] -**terms_for_auth** | **String** | [Read-only] Terms/Conditions for receiving and maintaining the system’s Authorization. Assigned by the Authorizing Official. | [optional] -**security_plan_approval_status** | **String** | [Read-only] Status of the approval of the system’s RMF Security Plan. Values include the following options (Approved, Denied, Not Yet Approved). | [optional] -**security_plan_approval_date** | **Integer** | [Read-only] Approval date of the system’s RMF Security Plan. | [optional] -**mission_criticality** | **String** | [Read-only] Mission Criticality of the system record. Values include the following options (Mission Critical (MC), Mission Essential (ME), Mission Support (MS). | [optional] -**geographical_association** | **String** | [Read-only] Geographical Association of the system record (VA only). | [optional] -**system_ownership** | **String** | [Read-only] Ownership of the system record (VA only). | [optional] -**governing_mission_area** | **String** | [Read-only] Governing Mission Area of the system record. | [optional] -**primary_functional_area** | **String** | [Read-only] Primary functional area of the system record. | [optional] -**secondary_functional_area** | **String** | [Read-only] Secondary functional area of the system record. | [optional] -**primary_control_set** | **String** | [Read-only] Primary Control Set of the system record. RMF values include the following options (NIST SP 800-53 Revision 4), DIACAP values include the following options (DoDI 8500.2) | [optional] -**confidentiality** | **String** | [Read-only] Confidentiality of the system record. RMF values include the following options (High, Moderate, Low) | [optional] -**integrity** | **String** | [Read-only] Integrity of the system record. RMF values include the following options (High, Moderate, Low) | [optional] -**availability** | **String** | [Read-only] Availability of the system record. RMF values include the following options (High, Moderate, Low) | [optional] -**applied_overlays** | **String** | [Read-only] Overlays applied to the system record. | [optional] -**rmf_activity** | **String** | [Read-only] RMF Activity of the system record. | [optional] -**cross_domain_ticket** | **String** | [Read-only] Cross Domain Tickets of the system record. | [optional] -**ditpr_don_id** | **String** | [Read-Only] DITPR-DON identifier of the system record. | [optional] -**mac** | **String** | [Read-Only] MAC level of the system record. | [optional] -**dod_confidentiality** | **String** | [Read-Only] DoD Confidentiality level of the system record. | [optional] -**contingency_plan_tested** | **BOOLEAN** | [Read-only] Has the system record’s Contingency Plan been tested? | [optional] -**contingency_plan_test_date** | **Integer** | [Read-only] Date the system record’s Contingency Plan was tested. | [optional] -**security_review_date** | **Integer** | [Read-only] Date the system record’s Annual Security Review was conducted. | [optional] -**has_open_poam_item** | **BOOLEAN** | [Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item? | [optional] -**has_open_poam_item90to120_past_scheduled_completion_date** | **BOOLEAN** | [Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item 90 to 120 days past its Scheduled Completion Date? | [optional] -**has_open_poam_item120_plus_past_scheudled_completion_date** | **BOOLEAN** | [Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item 120 days past its Scheduled Completion Date? | [optional] -**impact** | **String** | [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) | [optional] -**has_cui** | **BOOLEAN** | [Read-only] Does the system record contain and/or process Controlled Unclassified information? | [optional] -**has_pii** | **BOOLEAN** | [Read-only] Does the system record contain and/or process Personally Identifiable Information? | [optional] -**has_phi** | **BOOLEAN** | [Read-only] Does the system record contain and/or process Personal Health Information? | [optional] -**ppsm_registry_number** | **String** | [Read-only] Unique identifier for the DoD’s Ports, Protocols, and Services Management Registry system. | [optional] -**interconnected_information_system_and_identifiers** | **String** | [Read-only] Identify the interconnected information systems and corresponding identifiers within control CA-3. | [optional] -**is_pia_required** | **BOOLEAN** | [Read-only] Does the system require a Privacy Impact Assessment? | [optional] -**pia_status** | **String** | [Read-only] Status of the PIA, availability values include the following options (Not Started, In Progress, Completed) | [optional] -**pia_date** | **Integer** | [Read-only] Date in which the system’s PIA took place. | [optional] -**user_defined_field1** | **String** | [Read-only] User-defined field to augment Ad Hoc Reporting. | [optional] -**user_defined_field2** | **String** | [Read-only] User-defined field to augment Ad Hoc Reporting. | [optional] -**user_defined_field3** | **String** | [Read-only] User-defined field to augment Ad Hoc Reporting. | [optional] -**user_defined_field4** | **String** | [Read-only] User-defined field to augment Ad Hoc Reporting. | [optional] -**user_defined_field5** | **String** | [Read-only] User-defined field to augment Ad Hoc Reporting. | [optional] -**current_rmf_lifecycle_step** | **String** | [Read-only] Displays the system’s current step within the RMF Lifecycle. | [optional] -**other_information** | **String** | [Read-only] Include any additional information required by the organization. | [optional] -**reports_for_scorecard** | **BOOLEAN** | [Read-only] Indicates if the system reports to the DoD Cyber Hygiene Scorecard. | [optional] -**package** | [**Array<PacGet>**](PacGet.md) | | [optional] -**connectivity_ccsd** | [**Array<ConnectivityCcsd>**](ConnectivityCcsd.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/SystemsApi.md b/emass_client/ruby_client/docs/SystemsApi.md deleted file mode 100644 index 3626bcd..0000000 --- a/emass_client/ruby_client/docs/SystemsApi.md +++ /dev/null @@ -1,155 +0,0 @@ -# EmassClient::SystemsApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_system**](SystemsApi.md#get_system) | **GET** /api/systems/{systemId} | Get system information for a specific system -[**get_systems**](SystemsApi.md#get_systems) | **GET** /api/systems | Get system information - -# **get_system** -> SystemResponse get_system(system_id, opts) - -Get system information for a specific system - -Returns the system matching provided parameters - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - include_package: true, # BOOLEAN | **Include Package**: Indicates if additional packages information is retrieved for queried system. - policy: 'rmf' # String | **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. -} - -begin - #Get system information for a specific system - result = api_instance.get_system(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemsApi->get_system: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **include_package** | **BOOLEAN**| **Include Package**: Indicates if additional packages information is retrieved for queried system. | [optional] [default to true] - **policy** | **String**| **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. | [optional] [default to rmf] - -### Return type - -[**SystemResponse**](SystemResponse.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_systems** -> SystemResponse get_systems(opts) - -Get system information - -Returns all system(s) that match the query parameters - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::SystemsApi.new -opts = { - include_package: true, # BOOLEAN | **Include Package**: Indicates if additional packages information is retrieved for queried system. - registration_type: 'regular', # String | **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider - ditpr_id: 'ditpr_id_example', # String | **DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR). - coams_id: 'coams_id_example', # String | **COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS). - policy: 'rmf', # String | **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - include_ditpr_metrics: false, # BOOLEAN | **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:
  • registrationType
  • policy
- include_decommissioned: true, # BOOLEAN | **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. - reports_for_scorecard: true # BOOLEAN | **DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard. -} - -begin - #Get system information - result = api_instance.get_systems(opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling SystemsApi->get_systems: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **include_package** | **BOOLEAN**| **Include Package**: Indicates if additional packages information is retrieved for queried system. | [optional] [default to true] - **registration_type** | **String**| **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider | [optional] [default to regular] - **ditpr_id** | **String**| **DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR). | [optional] - **coams_id** | **String**| **COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS). | [optional] - **policy** | **String**| **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. | [optional] [default to rmf] - **include_ditpr_metrics** | **BOOLEAN**| **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:<br> <ul> <li>registrationType</li> <li>policy</li> </ul> | [optional] [default to false] - **include_decommissioned** | **BOOLEAN**| **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. | [optional] [default to true] - **reports_for_scorecard** | **BOOLEAN**| **DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard. | [optional] [default to true] - -### Return type - -[**SystemResponse**](SystemResponse.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/Test.md b/emass_client/ruby_client/docs/Test.md deleted file mode 100644 index 08f942c..0000000 --- a/emass_client/ruby_client/docs/Test.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::Test - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**TestData**](TestData.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/TestApi.md b/emass_client/ruby_client/docs/TestApi.md deleted file mode 100644 index 85787a4..0000000 --- a/emass_client/ruby_client/docs/TestApi.md +++ /dev/null @@ -1,66 +0,0 @@ -# EmassClient::TestApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**test_connection**](TestApi.md#test_connection) | **GET** /api | Test connection to the API - -# **test_connection** -> Test test_connection - -Test connection to the API - -Returns endpoint call status - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::TestApi.new - -begin - #Test connection to the API - result = api_instance.test_connection - p result -rescue EmassClient::ApiError => e - puts "Exception when calling TestApi->test_connection: #{e}" -end -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Test**](Test.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/TestData.md b/emass_client/ruby_client/docs/TestData.md deleted file mode 100644 index 064f902..0000000 --- a/emass_client/ruby_client/docs/TestData.md +++ /dev/null @@ -1,7 +0,0 @@ -# EmassClient::TestData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**success** | **BOOLEAN** | | [optional] - diff --git a/emass_client/ruby_client/docs/TestResultsApi.md b/emass_client/ruby_client/docs/TestResultsApi.md deleted file mode 100644 index 84815d7..0000000 --- a/emass_client/ruby_client/docs/TestResultsApi.md +++ /dev/null @@ -1,144 +0,0 @@ -# EmassClient::TestResultsApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_test_results_by_system_id**](TestResultsApi.md#add_test_results_by_system_id) | **POST** /api/systems/{systemId}/test-results | Add one or many test results in a system -[**get_system_test_results**](TestResultsApi.md#get_system_test_results) | **GET** /api/systems/{systemId}/test-results | Get one or many test results in a system - -# **add_test_results_by_system_id** -> TestResultsResponsePost add_test_results_by_system_id(bodysystem_id) - -Add one or many test results in a system - -Adds test results for given `systemId` **Request Body Required Fields** - `cci` - `testedBy` - `testDate` - `description` - `complianceStatus` - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::TestResultsApi.new -body = EmassClient::TestResultsRequestPostBody.new # TestResultsRequestPostBody | Update an existing control by Id -system_id = 56 # Integer | **System Id**: The unique system record identifier. - - -begin - #Add one or many test results in a system - result = api_instance.add_test_results_by_system_id(bodysystem_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling TestResultsApi->add_test_results_by_system_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TestResultsRequestPostBody**](TestResultsRequestPostBody.md)| Update an existing control by Id | - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - -### Return type - -[**TestResultsResponsePost**](TestResultsResponsePost.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - - -# **get_system_test_results** -> TestResultsResponseGet get_system_test_results(system_id, opts) - -Get one or many test results in a system - -Returns system test results information for matching parameters.
- -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::TestResultsApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - control_acronyms: 'control_acronyms_example', # String | **System Acronym**: Filter query by given system acronym (single or comma separated). - ccis: 'ccis_example', # String | **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - latest_only: true # BOOLEAN | **Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated). -} - -begin - #Get one or many test results in a system - result = api_instance.get_system_test_results(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling TestResultsApi->get_system_test_results: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **control_acronyms** | **String**| **System Acronym**: Filter query by given system acronym (single or comma separated). | [optional] - **ccis** | **String**| **CCI System**: Filter query by Control Correlation Identifiers (CCIs). | [optional] - **latest_only** | **BOOLEAN**| **Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated). | [optional] [default to true] - -### Return type - -[**TestResultsResponseGet**](TestResultsResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/TestResultsGet.md b/emass_client/ruby_client/docs/TestResultsGet.md deleted file mode 100644 index 9231a36..0000000 --- a/emass_client/ruby_client/docs/TestResultsGet.md +++ /dev/null @@ -1,15 +0,0 @@ -# EmassClient::TestResultsGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**system_id** | **Integer** | [Required] Unique eMASS identifier. Will need to provide correct number | [optional] -**control** | **String** | [Read-Only] Control acronym associated with the test result. NIST SP 800-53 Revision 4 defined. | [optional] -**cci** | **String** | [Required] CCI associated with test result. | [optional] -**is_inherited** | **BOOLEAN** | [Read-only] Indicates whether a test result is inherited. | [optional] -**tested_by** | **String** | [Required] Last Name, First Name. 100 Characters. | [optional] -**test_date** | **Integer** | [Required] Unix time format. | [optional] -**description** | **String** | [Required] Include description of test result. 4000 Characters. | [optional] -**type** | **String** | [Read-Only] Indicates the location in the Control Approval Chain when the test result is submitted. | [optional] -**compliance_status** | **String** | [Required] Test result compliance status | [optional] - diff --git a/emass_client/ruby_client/docs/TestResultsPost.md b/emass_client/ruby_client/docs/TestResultsPost.md deleted file mode 100644 index c398bb0..0000000 --- a/emass_client/ruby_client/docs/TestResultsPost.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::TestResultsPost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cci** | **String** | CCI associated with test result. | [optional] -**success** | **BOOLEAN** | Indicates if operations result (success/fail) | [optional] -**system_id** | **Integer** | The system identifier for the system being updated. | [optional] - diff --git a/emass_client/ruby_client/docs/TestResultsRequestPostBody.md b/emass_client/ruby_client/docs/TestResultsRequestPostBody.md deleted file mode 100644 index 19cf2bc..0000000 --- a/emass_client/ruby_client/docs/TestResultsRequestPostBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# EmassClient::TestResultsRequestPostBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cci** | **String** | [Required] CCI associated with test result. | -**tested_by** | **String** | [Required] Last Name, First Name. 100 Characters. | -**test_date** | **Integer** | [Required] Unix time format. | -**description** | **String** | [Required] Include description of test result. 4000 Characters. | -**compliance_status** | **String** | [Required] Test result compliance status | - diff --git a/emass_client/ruby_client/docs/TestResultsResponseGet.md b/emass_client/ruby_client/docs/TestResultsResponseGet.md deleted file mode 100644 index e9c3eb5..0000000 --- a/emass_client/ruby_client/docs/TestResultsResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::TestResultsResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<TestResultsGet>**](TestResultsGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/TestResultsResponsePost.md b/emass_client/ruby_client/docs/TestResultsResponsePost.md deleted file mode 100644 index 8d90d0f..0000000 --- a/emass_client/ruby_client/docs/TestResultsResponsePost.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::TestResultsResponsePost - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<TestResultsPost>**](TestResultsPost.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/Users.md b/emass_client/ruby_client/docs/Users.md deleted file mode 100644 index 8e64edf..0000000 --- a/emass_client/ruby_client/docs/Users.md +++ /dev/null @@ -1,9 +0,0 @@ -# EmassClient::Users - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_name** | **String** | | [optional] -**last_name** | **String** | | [optional] -**email** | **String** | | [optional] - diff --git a/emass_client/ruby_client/docs/WorkflowDefinitionGet.md b/emass_client/ruby_client/docs/WorkflowDefinitionGet.md deleted file mode 100644 index 06c95e0..0000000 --- a/emass_client/ruby_client/docs/WorkflowDefinitionGet.md +++ /dev/null @@ -1,11 +0,0 @@ -# EmassClient::WorkflowDefinitionGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | [Read-Only] Description of the workflow or the stage transition. For stage transitions, this matches the action dropdown that appears for PAC users. | [optional] -**is_active** | **BOOLEAN** | [Read-Only] Returns true if the workflow is available to the site. | [optional] -**version** | **String** | [Read-Only] Version of the workflow definition. | [optional] -**workflow** | **String** | [Read-Only] The workflow type. | [optional] -**stages** | [**Array<Stage>**](Stage.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/WorkflowDefinitionResponseGet.md b/emass_client/ruby_client/docs/WorkflowDefinitionResponseGet.md deleted file mode 100644 index 68f090a..0000000 --- a/emass_client/ruby_client/docs/WorkflowDefinitionResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::WorkflowDefinitionResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<WorkflowDefinitionGet>**](WorkflowDefinitionGet.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/WorkflowDefinitionsApi.md b/emass_client/ruby_client/docs/WorkflowDefinitionsApi.md deleted file mode 100644 index e50110d..0000000 --- a/emass_client/ruby_client/docs/WorkflowDefinitionsApi.md +++ /dev/null @@ -1,74 +0,0 @@ -# EmassClient::WorkflowDefinitionsApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_workflow_definitions**](WorkflowDefinitionsApi.md#get_workflow_definitions) | **GET** /api/workflow-definitions | Get workflow definitions in a site - -# **get_workflow_definitions** -> WorkflowDefinitionResponseGet get_workflow_definitions(opts) - -Get workflow definitions in a site - -View all workflow schemas available on the eMASS instance filtered by status `includeInactive` and registration type `registrationType`. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::WorkflowDefinitionsApi.new -opts = { - include_inactive: true, # BOOLEAN | **Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions. - registration_type: 'regular' # String | **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider -} - -begin - #Get workflow definitions in a site - result = api_instance.get_workflow_definitions(opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling WorkflowDefinitionsApi->get_workflow_definitions: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **include_inactive** | **BOOLEAN**| **Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions. | [optional] [default to true] - **registration_type** | **String**| **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider | [optional] [default to regular] - -### Return type - -[**WorkflowDefinitionResponseGet**](WorkflowDefinitionResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/WorkflowInstancesApi.md b/emass_client/ruby_client/docs/WorkflowInstancesApi.md deleted file mode 100644 index eac9515..0000000 --- a/emass_client/ruby_client/docs/WorkflowInstancesApi.md +++ /dev/null @@ -1,146 +0,0 @@ -# EmassClient::WorkflowInstancesApi - -All URIs are relative to *http://localhost:4010* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_system_workflow_instances**](WorkflowInstancesApi.md#get_system_workflow_instances) | **GET** /api/systems/{systemId}/workflow-instances | Get workflow instances in a system -[**get_system_workflow_instances_by_workflow_instance_id**](WorkflowInstancesApi.md#get_system_workflow_instances_by_workflow_instance_id) | **GET** /api/systems/{systemId}/workflow-instances/{workflowInstanceId} | Get workflow instance by ID in a system - -# **get_system_workflow_instances** -> WorkflowInstancesResponseGet get_system_workflow_instances(system_id, opts) - -Get workflow instances in a system - -View detailed information on all active and historical workflows for a system `systemId` and filtered by provided parameters. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::WorkflowInstancesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -opts = { - include_comments: true, # BOOLEAN | **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. - page_index: 0, # Integer | **Page Index**: If no value is specified, the default returns true to not include transition comments. - since_date: 'since_date_example', # String | **Date**: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. - status: 'all' # String | **Status**: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. -} - -begin - #Get workflow instances in a system - result = api_instance.get_system_workflow_instances(system_id, opts) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling WorkflowInstancesApi->get_system_workflow_instances: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **include_comments** | **BOOLEAN**| **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. | [optional] [default to true] - **page_index** | **Integer**| **Page Index**: If no value is specified, the default returns true to not include transition comments. | [optional] [default to 0] - **since_date** | **String**| **Date**: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. | [optional] - **status** | **String**| **Status**: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. | [optional] [default to all] - -### Return type - -[**WorkflowInstancesResponseGet**](WorkflowInstancesResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - -# **get_system_workflow_instances_by_workflow_instance_id** -> WorkflowInstancesResponseGet get_system_workflow_instances_by_workflow_instance_id(system_id, workflow_instance_id) - -Get workflow instance by ID in a system - -View detailed information on all active and historical workflows for a system `systemId` and `workflowInstanceId`. - -### Example -```ruby -# load the gem -require 'emass_client' -# setup authorization -EmassClient.configure do |config| - # Configure API key authorization: apikey - config.api_key['api-key'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['api-key'] = 'Bearer' - - # Configure API key authorization: mockType - config.api_key['Prefer'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['Prefer'] = 'Bearer' - - # Configure API key authorization: userid - config.api_key['user-uid'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - #config.api_key_prefix['user-uid'] = 'Bearer' -end - -api_instance = EmassClient::WorkflowInstancesApi.new -system_id = 56 # Integer | **System Id**: The unique system record identifier. -workflow_instance_id = 56 # Integer | **Workflow Instance Id**: The unique milestone record identifier. - - -begin - #Get workflow instance by ID in a system - result = api_instance.get_system_workflow_instances_by_workflow_instance_id(system_id, workflow_instance_id) - p result -rescue EmassClient::ApiError => e - puts "Exception when calling WorkflowInstancesApi->get_system_workflow_instances_by_workflow_instance_id: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **system_id** | **Integer**| **System Id**: The unique system record identifier. | - **workflow_instance_id** | **Integer**| **Workflow Instance Id**: The unique milestone record identifier. | - -### Return type - -[**WorkflowInstancesResponseGet**](WorkflowInstancesResponseGet.md) - -### Authorization - -[apikey](../README.md#apikey), [mockType](../README.md#mockType), [userid](../README.md#userid) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - - diff --git a/emass_client/ruby_client/docs/WorkflowInstancesGet.md b/emass_client/ruby_client/docs/WorkflowInstancesGet.md deleted file mode 100644 index c88bce7..0000000 --- a/emass_client/ruby_client/docs/WorkflowInstancesGet.md +++ /dev/null @@ -1,16 +0,0 @@ -# EmassClient::WorkflowInstancesGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_date** | **Integer** | [Read-Only] Date the workflow instance or the workflow transition was created. | [optional] -**current_stage** | **String** | [Read-Only] Name of the current stage. | [optional] -**last_edited_by** | **String** | [Read-Only] User that last acted on the workflow. | [optional] -**last_edited_date** | **Integer** | [Read-Only] Date the workflow was last acted on. | [optional] -**package_name** | **String** | [Read-Only] The package name. | [optional] -**system_name** | **String** | [Read-Only] The system name. | [optional] -**version** | **String** | [Read-Only] Version of the workflow definition. | [optional] -**workflow** | **String** | [Read-Only] The workflow type. | [optional] -**workflow_instance_id** | **Integer** | [Read-Only] Unique workflow instance identifier. | [optional] -**transitions** | [**Array<InstancesTransitions>**](InstancesTransitions.md) | | [optional] - diff --git a/emass_client/ruby_client/docs/WorkflowInstancesResponseGet.md b/emass_client/ruby_client/docs/WorkflowInstancesResponseGet.md deleted file mode 100644 index 0d00dd9..0000000 --- a/emass_client/ruby_client/docs/WorkflowInstancesResponseGet.md +++ /dev/null @@ -1,8 +0,0 @@ -# EmassClient::WorkflowInstancesResponseGet - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**meta** | [**Model200**](Model200.md) | | [optional] -**data** | [**Array<WorkflowInstancesGet>**](WorkflowInstancesGet.md) | | [optional] - diff --git a/emass_client/ruby_client/emass_client.gemspec b/emass_client/ruby_client/emass_client.gemspec deleted file mode 100644 index 3ad1c7c..0000000 --- a/emass_client/ruby_client/emass_client.gemspec +++ /dev/null @@ -1,41 +0,0 @@ -# -*- encoding: utf-8 -*- - -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -$:.push File.expand_path("../lib", __FILE__) -require "emass_client/version" - -Gem::Specification.new do |s| - s.name = "emass_client" - s.version = EmassClient::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ["Swagger-Codegen"] - s.email = ["disa.meade.id.mbx.emass-tier-iii-support@mail.mil"] - s.homepage = "https://github.com/swagger-api/swagger-codegen" - s.summary = "Enterprise Mission Assurance Support Service (eMASS) Ruby Gem" - s.description = "The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: " - s.license = "Unlicense" - s.required_ruby_version = ">= 1.9" - - s.metadata = { "github_repo" => "ssh://github.com/mitre/emasser" } - - s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' - - s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' - - #s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } - #s.test_files = `find spec/*`.split("\n") - s.files = Dir.glob('lib/**/*') + %w{Rakefile README.md} - s.executables = [] - s.require_paths = ["lib"] -end diff --git a/emass_client/ruby_client/git_push.sh b/emass_client/ruby_client/git_push.sh deleted file mode 100644 index 89eb49e..0000000 --- a/emass_client/ruby_client/git_push.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# Generated by: https://github.com/swagger-api/swagger-codegen.git -# -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/emass_client/ruby_client/lib/emass_client.rb b/emass_client/ruby_client/lib/emass_client.rb deleted file mode 100644 index 71b8b72..0000000 --- a/emass_client/ruby_client/lib/emass_client.rb +++ /dev/null @@ -1,161 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -# Common files -require 'emass_client/api_client' -require 'emass_client/api_error' -require 'emass_client/version' -require 'emass_client/configuration' - -# Models -require 'emass_client/models/artifacts_delete' -require 'emass_client/models/artifacts_delete_inner' -require 'emass_client/models/artifacts_get' -require 'emass_client/models/artifacts_request_put_body' -require 'emass_client/models/artifacts_response_del' -require 'emass_client/models/artifacts_response_del_data' -require 'emass_client/models/artifacts_response_get' -require 'emass_client/models/artifacts_response_put_post' -require 'emass_client/models/cac_get' -require 'emass_client/models/cac_request_post_body' -require 'emass_client/models/cac_response_get' -require 'emass_client/models/cac_response_post' -require 'emass_client/models/cac_response_post_data' -require 'emass_client/models/cmmc_get' -require 'emass_client/models/cmmc_response_get' -require 'emass_client/models/connectivity_ccsd' -require 'emass_client/models/controls_get' -require 'emass_client/models/controls_put' -require 'emass_client/models/controls_request_put_body' -require 'emass_client/models/controls_response_get' -require 'emass_client/models/controls_response_put' -require 'emass_client/models/definition_transitions' -require 'emass_client/models/delete_milestone' -require 'emass_client/models/delete_poam' -require 'emass_client/models/empty200_response' -require 'emass_client/models/error' -require 'emass_client/models/instances_transitions' -require 'emass_client/models/milestone_response_get' -require 'emass_client/models/milestone_response_post' -require 'emass_client/models/milestone_response_put' -require 'emass_client/models/milestones_delete' -require 'emass_client/models/milestones_get' -require 'emass_client/models/milestones_post' -require 'emass_client/models/milestones_put' -require 'emass_client/models/milestones_put_post_delete' -require 'emass_client/models/milestones_request_post_body' -require 'emass_client/models/milestones_request_put_body' -require 'emass_client/models/milestones_required_post' -require 'emass_client/models/milestones_required_put' -require 'emass_client/models/model_200' -require 'emass_client/models/model_201' -require 'emass_client/models/model_201_meta' -require 'emass_client/models/model_400' -require 'emass_client/models/model_400_meta' -require 'emass_client/models/model_400_response' -require 'emass_client/models/model_401' -require 'emass_client/models/model_401_meta' -require 'emass_client/models/model_403' -require 'emass_client/models/model_403_meta' -require 'emass_client/models/model_404' -require 'emass_client/models/model_404_response' -require 'emass_client/models/model_405' -require 'emass_client/models/model_405_meta' -require 'emass_client/models/model_411' -require 'emass_client/models/model_411_meta' -require 'emass_client/models/model_490' -require 'emass_client/models/model_490_meta' -require 'emass_client/models/model_500' -require 'emass_client/models/model_500_meta' -require 'emass_client/models/pac_get' -require 'emass_client/models/pac_post' -require 'emass_client/models/pac_request_post_body' -require 'emass_client/models/pac_response_get' -require 'emass_client/models/pac_response_post' -require 'emass_client/models/poam_delete' -require 'emass_client/models/poam_get' -require 'emass_client/models/poam_post' -require 'emass_client/models/poam_post_put_del' -require 'emass_client/models/poam_put' -require 'emass_client/models/poam_request_post_body' -require 'emass_client/models/poam_request_put_body' -require 'emass_client/models/poam_required_post' -require 'emass_client/models/poam_required_put' -require 'emass_client/models/poam_response_delete' -require 'emass_client/models/poam_response_get' -require 'emass_client/models/poam_response_post' -require 'emass_client/models/poam_response_put' -require 'emass_client/models/register' -require 'emass_client/models/register_data' -require 'emass_client/models/register_user_request_post_body' -require 'emass_client/models/role_category' -require 'emass_client/models/roles' -require 'emass_client/models/ssps' -require 'emass_client/models/stage' -require 'emass_client/models/static_code_application' -require 'emass_client/models/static_code_request_post_body' -require 'emass_client/models/static_code_required_post' -require 'emass_client/models/static_code_required_post_application' -require 'emass_client/models/success200_response' -require 'emass_client/models/system_id_artifacts_body' -require 'emass_client/models/system_response' -require 'emass_client/models/system_roles_category_response' -require 'emass_client/models/system_roles_response' -require 'emass_client/models/system_roles_response_data' -require 'emass_client/models/systems' -require 'emass_client/models/test' -require 'emass_client/models/test_data' -require 'emass_client/models/test_results_get' -require 'emass_client/models/test_results_post' -require 'emass_client/models/test_results_request_post_body' -require 'emass_client/models/test_results_response_get' -require 'emass_client/models/test_results_response_post' -require 'emass_client/models/users' -require 'emass_client/models/workflow_definition_get' -require 'emass_client/models/workflow_definition_response_get' -require 'emass_client/models/workflow_instances_get' -require 'emass_client/models/workflow_instances_response_get' - -# APIs -require 'emass_client/api/artifacts_api' -require 'emass_client/api/artifacts_export_api' -require 'emass_client/api/cac_api' -require 'emass_client/api/cmmc_assessments_api' -require 'emass_client/api/controls_api' -require 'emass_client/api/milestones_api' -require 'emass_client/api/pac_api' -require 'emass_client/api/poam_api' -require 'emass_client/api/registration_api' -require 'emass_client/api/static_code_scans_api' -require 'emass_client/api/system_roles_api' -require 'emass_client/api/systems_api' -require 'emass_client/api/test_api' -require 'emass_client/api/test_results_api' -require 'emass_client/api/workflow_definitions_api' -require 'emass_client/api/workflow_instances_api' - -module EmassClient - class << self - # Customize default settings for the SDK using block. - # EmassClient.configure do |config| - # config.username = "xxx" - # config.password = "xxx" - # end - # If no block given, return the default Configuration object. - def configure - if block_given? - yield(Configuration.default) - else - Configuration.default - end - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/artifacts_api.rb b/emass_client/ruby_client/lib/emass_client/api/artifacts_api.rb deleted file mode 100644 index b96148b..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/artifacts_api.rb +++ /dev/null @@ -1,310 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class ArtifactsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Add one or many artifacts in a system - # Information
The request body of a POST request through the Artifact Endpoint accepts a single binary file with file extension \".zip\" only. This accepted .zip file should contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt. Filename uniqueness throughout eMASS will be enforced by the API.

Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact existing within the application, the file associated with the artifact will be updated. If no artifact is matched via filename to the application, a new artifact will be created with the following default values. Any values not specified below will be blank.
  • isTemplate: false
  • type: other
  • category: evidence
To update values other than the file itself, please submit a PUT request.
Zip file information
Upload a zip file contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt.

Business Rules
Artifact cannot be saved if the file does not have the following file extensions: .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx Artifact version cannot be saved if an Artifact with the same file name already exist in the system. Artifact cannot be saved if the file size exceeds 30MB. - # @param is_template - # @param type - # @param category - # @param zipper - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ArtifactsResponsePutPost] - def add_artifacts_by_system_id(is_template, type, category, zipper, system_id, opts = {}) - data, _status_code, _headers = add_artifacts_by_system_id_with_http_info(is_template, type, category, zipper, system_id, opts) - data - end - - # Add one or many artifacts in a system - # <strong>Information</strong><br> The request body of a POST request through the Artifact Endpoint accepts a single binary file with file extension \".zip\" only. This accepted .zip file should contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt. Filename uniqueness throughout eMASS will be enforced by the API.<br><br> Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact existing within the application, the file associated with the artifact will be updated. If no artifact is matched via filename to the application, a new artifact will be created with the following default values. Any values not specified below will be blank. <ul> <li>isTemplate: false</li> <li>type: other</li> <li>category: evidence</li> </ul> To update values other than the file itself, please submit a PUT request.<br> <strong>Zip file information</strong><br> Upload a zip file contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt.<br><br> <strong>Business Rules</strong><br> Artifact cannot be saved if the file does not have the following file extensions: .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx Artifact version cannot be saved if an Artifact with the same file name already exist in the system. Artifact cannot be saved if the file size exceeds 30MB. - # @param is_template - # @param type - # @param category - # @param zipper - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(ArtifactsResponsePutPost, Integer, Hash)>] ArtifactsResponsePutPost data, response status code and response headers - def add_artifacts_by_system_id_with_http_info(is_template, type, category, zipper, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ArtifactsApi.add_artifacts_by_system_id ...' - end - # verify the required parameter 'is_template' is set - if @api_client.config.client_side_validation && is_template.nil? - fail ArgumentError, "Missing the required parameter 'is_template' when calling ArtifactsApi.add_artifacts_by_system_id" - end - # verify the required parameter 'type' is set - if @api_client.config.client_side_validation && type.nil? - fail ArgumentError, "Missing the required parameter 'type' when calling ArtifactsApi.add_artifacts_by_system_id" - end - # verify enum value - if @api_client.config.client_side_validation && !['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result', 'Auditor Report'].include?(type) - fail ArgumentError, "invalid value for 'type', must be one of Procedure, Diagram, Policy, Labor, Document, Image, Other, Scan Result, Auditor Report" - end - # verify the required parameter 'category' is set - if @api_client.config.client_side_validation && category.nil? - fail ArgumentError, "Missing the required parameter 'category' when calling ArtifactsApi.add_artifacts_by_system_id" - end - # verify enum value - if @api_client.config.client_side_validation && !['Implementation Guidance', 'Evidence'].include?(category) - fail ArgumentError, "invalid value for 'category', must be one of Implementation Guidance, Evidence" - end - # verify the required parameter 'zipper' is set - if @api_client.config.client_side_validation && zipper.nil? - fail ArgumentError, "Missing the required parameter 'zipper' when calling ArtifactsApi.add_artifacts_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.add_artifacts_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) - - # form parameters - form_params = opts[:form_params] || {} - form_params['isTemplate'] = is_template - form_params['type'] = type - form_params['category'] = category - form_params['Zipper'] = zipper - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'ArtifactsResponsePutPost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ArtifactsApi#add_artifacts_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Remove one or many artifacts in a system - # Remove the Artifact(s) matching `systemId` path parameter and request body artifact(s) file name

Note: Multiple files can be deleted by providing multiple file names at the CL (comma delimited) Example: --files file1.txt, file2.txt - # @param body See notes above for additional information - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ArtifactsResponseDel] - def delete_artifact(body, system_id, opts = {}) - data, _status_code, _headers = delete_artifact_with_http_info(body, system_id, opts) - data - end - - # Remove one or many artifacts in a system - # Remove the Artifact(s) matching `systemId` path parameter and request body artifact(s) file name<br><br> <b>Note:</b> Multiple files can be deleted by providing multiple file names at the CL (comma delimited) Example: --files file1.txt, file2.txt - # @param body See notes above for additional information - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(ArtifactsResponseDel, Integer, Hash)>] ArtifactsResponseDel data, response status code and response headers - def delete_artifact_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ArtifactsApi.delete_artifact ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling ArtifactsApi.delete_artifact" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.delete_artifact" - end - # resource path - local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'ArtifactsResponseDel' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ArtifactsApi#delete_artifact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get one or many artifacts in a system - # Returns selected artifacts matching parameters to include the file name containing the artifacts. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :filename **File Name**: The file name (to include file-extension). - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true) - # @return [ArtifactsResponseGet] - def get_system_artifacts(system_id, opts = {}) - data, _status_code, _headers = get_system_artifacts_with_http_info(system_id, opts) - data - end - - # Get one or many artifacts in a system - # Returns selected artifacts matching parameters to include the file name containing the artifacts. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :filename **File Name**: The file name (to include file-extension). - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. - # @return [Array<(ArtifactsResponseGet, Integer, Hash)>] ArtifactsResponseGet data, response status code and response headers - def get_system_artifacts_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ArtifactsApi.get_system_artifacts ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.get_system_artifacts" - end - # resource path - local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil? - query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil? - query_params[:'ccis'] = opts[:'ccis'] if !opts[:'ccis'].nil? - query_params[:'systemOnly'] = opts[:'system_only'] if !opts[:'system_only'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'ArtifactsResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ArtifactsApi#get_system_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update one or many artifacts in a system - # Updates an artifact for given `systemId` path parameter

**Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category` - # @param body See `information` above for additional instructions - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ArtifactsResponsePutPost] - def update_artifact_by_system_id(body, system_id, opts = {}) - data, _status_code, _headers = update_artifact_by_system_id_with_http_info(body, system_id, opts) - data - end - - # Update one or many artifacts in a system - # Updates an artifact for given `systemId` path parameter<br><br> **Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category` - # @param body See `information` above for additional instructions - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(ArtifactsResponsePutPost, Integer, Hash)>] ArtifactsResponsePutPost data, response status code and response headers - def update_artifact_by_system_id_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ArtifactsApi.update_artifact_by_system_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling ArtifactsApi.update_artifact_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsApi.update_artifact_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/artifacts'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'ArtifactsResponsePutPost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ArtifactsApi#update_artifact_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/artifacts_export_api.rb b/emass_client/ruby_client/lib/emass_client/api/artifacts_export_api.rb deleted file mode 100644 index 11b9a5b..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/artifacts_export_api.rb +++ /dev/null @@ -1,86 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class ArtifactsExportApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get the file of an artifact in a system - # Sample Responce
Binary file associated with given filename.
If `compress` parameter is specified, zip archive of binary file associated with given filename. - # @param system_id **System Id**: The unique system record identifier. - # @param filename **File Name**: The file name (to include file-extension). - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :compress **Compress File**: Determines if returned file is compressed. (default to true) - # @return [String] - def get_system_artifacts_export(system_id, filename, opts = {}) - data, _status_code, _headers = get_system_artifacts_export_with_http_info(system_id, filename, opts) - data - end - - # Get the file of an artifact in a system - # <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. - # @param system_id **System Id**: The unique system record identifier. - # @param filename **File Name**: The file name (to include file-extension). - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :compress **Compress File**: Determines if returned file is compressed. - # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers - def get_system_artifacts_export_with_http_info(system_id, filename, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ArtifactsExportApi.get_system_artifacts_export ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ArtifactsExportApi.get_system_artifacts_export" - end - # verify the required parameter 'filename' is set - if @api_client.config.client_side_validation && filename.nil? - fail ArgumentError, "Missing the required parameter 'filename' when calling ArtifactsExportApi.get_system_artifacts_export" - end - # resource path - local_var_path = '/api/systems/{systemId}/artifacts-export'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'filename'] = filename - query_params[:'compress'] = opts[:'compress'] if !opts[:'compress'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/octet-stream', 'application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'String' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ArtifactsExportApi#get_system_artifacts_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/cac_api.rb b/emass_client/ruby_client/lib/emass_client/api/cac_api.rb deleted file mode 100644 index c8db477..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/cac_api.rb +++ /dev/null @@ -1,143 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class CACApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Submit control to second role of CAC - # Adds a Control Approval Chain (CAC) for given `systemId` path parameter

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. - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [CacResponsePost] - def add_system_cac(body, system_id, opts = {}) - data, _status_code, _headers = add_system_cac_with_http_info(body, system_id, opts) - data - end - - # Submit control to second role of CAC - # Adds a Control Approval Chain (CAC) for given `systemId` path parameter<br><br> 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. - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(CacResponsePost, Integer, Hash)>] CacResponsePost data, response status code and response headers - def add_system_cac_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CACApi.add_system_cac ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CACApi.add_system_cac" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.add_system_cac" - end - # resource path - local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'CacResponsePost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CACApi#add_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get location of one or many controls in CAC - # Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @return [CacResponseGet] - def get_system_cac(system_id, opts = {}) - data, _status_code, _headers = get_system_cac_with_http_info(system_id, opts) - data - end - - # Get location of one or many controls in CAC - # Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @return [Array<(CacResponseGet, Integer, Hash)>] CacResponseGet data, response status code and response headers - def get_system_cac_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CACApi.get_system_cac ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.get_system_cac" - end - # resource path - local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'CacResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CACApi#get_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/cmmc_assessments_api.rb b/emass_client/ruby_client/lib/emass_client/api/cmmc_assessments_api.rb deleted file mode 100644 index 3ea37f0..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/cmmc_assessments_api.rb +++ /dev/null @@ -1,77 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class CMMCAssessmentsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get CMMC assessment information - # Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only. - # @param since_date **Date** CMMC date (Unix date format) - # @param [Hash] opts the optional parameters - # @return [CmmcResponseGet] - def get_cmmc_assessments(since_date, opts = {}) - data, _status_code, _headers = get_cmmc_assessments_with_http_info(since_date, opts) - data - end - - # Get CMMC assessment information - # Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only. - # @param since_date **Date** CMMC date (Unix date format) - # @param [Hash] opts the optional parameters - # @return [Array<(CmmcResponseGet, Integer, Hash)>] CmmcResponseGet data, response status code and response headers - def get_cmmc_assessments_with_http_info(since_date, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CMMCAssessmentsApi.get_cmmc_assessments ...' - end - # verify the required parameter 'since_date' is set - if @api_client.config.client_side_validation && since_date.nil? - fail ArgumentError, "Missing the required parameter 'since_date' when calling CMMCAssessmentsApi.get_cmmc_assessments" - end - # resource path - local_var_path = '/api/cmmc-assessments' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'sinceDate'] = since_date - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'CmmcResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CMMCAssessmentsApi#get_cmmc_assessments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/controls_api.rb b/emass_client/ruby_client/lib/emass_client/api/controls_api.rb deleted file mode 100644 index 03aaae6..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/controls_api.rb +++ /dev/null @@ -1,143 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class ControlsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get control information in a system for one or many controls - # Returns system control information for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :acronyms **Acronym**: The system acronym(s) being queried (single value or comma delimited values). (default to PM-6) - # @return [ControlsResponseGet] - def get_system_controls(system_id, opts = {}) - data, _status_code, _headers = get_system_controls_with_http_info(system_id, opts) - data - end - - # Get control information in a system for one or many controls - # Returns system control information for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :acronyms **Acronym**: The system acronym(s) being queried (single value or comma delimited values). - # @return [Array<(ControlsResponseGet, Integer, Hash)>] ControlsResponseGet data, response status code and response headers - def get_system_controls_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ControlsApi.get_system_controls ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ControlsApi.get_system_controls" - end - # resource path - local_var_path = '/api/systems/{systemId}/controls'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'acronyms'] = opts[:'acronyms'] if !opts[:'acronyms'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'ControlsResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ControlsApi#get_system_controls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update control information in a system for one or many controls - # Update a Control for given `systemId`
**Request Body Required Fields** - `acronym` - `responsibleEntities` - `controlDesignation` - `estimatedCompletionDate` - `implementationNarrative` The following optional fields are required based on the Implementation Status `implementationStatus` value
| Value | Required Fields |--------------------------|--------------------------------------------------- | Planned or Implemented | `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` | Not Applicable | `naJustification`, `responsibleEntities` | Manually Inherited | `commonControlProvider`, `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` If the Implementation Status `implementationStatus` value is \"Inherited\", only the following fields can be updated: - `controlDesignation` - `commonnControlProvider` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ControlsResponsePut] - def update_control_by_system_id(body, system_id, opts = {}) - data, _status_code, _headers = update_control_by_system_id_with_http_info(body, system_id, opts) - data - end - - # Update control information in a system for one or many controls - # Update a Control for given `systemId`<br> **Request Body Required Fields** - `acronym` - `responsibleEntities` - `controlDesignation` - `estimatedCompletionDate` - `implementationNarrative` The following optional fields are required based on the Implementation Status `implementationStatus` value<br> | Value | Required Fields |--------------------------|--------------------------------------------------- | Planned or Implemented | `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` | Not Applicable | `naJustification`, `responsibleEntities` | Manually Inherited | `commonControlProvider`, `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` If the Implementation Status `implementationStatus` value is \"Inherited\", only the following fields can be updated: - `controlDesignation` - `commonnControlProvider` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(ControlsResponsePut, Integer, Hash)>] ControlsResponsePut data, response status code and response headers - def update_control_by_system_id_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ControlsApi.update_control_by_system_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling ControlsApi.update_control_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling ControlsApi.update_control_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/controls'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'ControlsResponsePut' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ControlsApi#update_control_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/milestones_api.rb b/emass_client/ruby_client/lib/emass_client/api/milestones_api.rb deleted file mode 100644 index 13d49b8..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/milestones_api.rb +++ /dev/null @@ -1,366 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class MilestonesApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Add milestones to one or many POA&M items in a system - # Adds a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate` - # @param body Update an existing milestone - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [MilestoneResponsePost] - def add_milestone_by_system_id_and_poam_id(body, system_id, poam_id, opts = {}) - data, _status_code, _headers = add_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts) - data - end - - # Add milestones to one or many POA&M items in a system - # Adds a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate` - # @param body Update an existing milestone - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(MilestoneResponsePost, Integer, Hash)>] MilestoneResponsePost data, response status code and response headers - def add_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MilestonesApi.add_milestone_by_system_id_and_poam_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id" - end - # verify the required parameter 'poam_id' is set - if @api_client.config.client_side_validation && poam_id.nil? - fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'MilestoneResponsePost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: MilestonesApi#add_milestone_by_system_id_and_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Remove milestones in a system for one or many POA&M items - # Remove the POA&M matching `systemId` path parameter
**Notes**
To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). - # @param body Delete the given Milestone Id - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [Empty200Response] - def delete_milestone(body, system_id, poam_id, opts = {}) - data, _status_code, _headers = delete_milestone_with_http_info(body, system_id, poam_id, opts) - data - end - - # Remove milestones in a system for one or many POA&M items - # Remove the POA&M matching `systemId` path parameter<br> **Notes**<br> To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). - # @param body Delete the given Milestone Id - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(Empty200Response, Integer, Hash)>] Empty200Response data, response status code and response headers - def delete_milestone_with_http_info(body, system_id, poam_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MilestonesApi.delete_milestone ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.delete_milestone" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.delete_milestone" - end - # verify the required parameter 'poam_id' is set - if @api_client.config.client_side_validation && poam_id.nil? - fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.delete_milestone" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'Empty200Response' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: MilestonesApi#delete_milestone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get milestones in one or many POA&M items in a system - # Returns system containing milestones for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - # @return [MilestoneResponseGet] - def get_system_milestones_by_poam_id(system_id, poam_id, opts = {}) - data, _status_code, _headers = get_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts) - data - end - - # Get milestones in one or many POA&M items in a system - # Returns system containing milestones for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - # @return [Array<(MilestoneResponseGet, Integer, Hash)>] MilestoneResponseGet data, response status code and response headers - def get_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MilestonesApi.get_system_milestones_by_poam_id ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.get_system_milestones_by_poam_id" - end - # verify the required parameter 'poam_id' is set - if @api_client.config.client_side_validation && poam_id.nil? - fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.get_system_milestones_by_poam_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'scheduledCompletionDateStart'] = opts[:'scheduled_completion_date_start'] if !opts[:'scheduled_completion_date_start'].nil? - query_params[:'scheduledCompletionDateEnd'] = opts[:'scheduled_completion_date_end'] if !opts[:'scheduled_completion_date_end'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'MilestoneResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: MilestonesApi#get_system_milestones_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get milestone by ID in POA&M item in a system - # Returns systems containing milestones for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param milestone_id **Milestone Id**: The unique milestone record identifier. - # @param [Hash] opts the optional parameters - # @return [MilestoneResponseGet] - def get_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id, opts = {}) - data, _status_code, _headers = get_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts) - data - end - - # Get milestone by ID in POA&M item in a system - # Returns systems containing milestones for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param milestone_id **Milestone Id**: The unique milestone record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(MilestoneResponseGet, Integer, Hash)>] MilestoneResponseGet data, response status code and response headers - def get_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id" - end - # verify the required parameter 'poam_id' is set - if @api_client.config.client_side_validation && poam_id.nil? - fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id" - end - # verify the required parameter 'milestone_id' is set - if @api_client.config.client_side_validation && milestone_id.nil? - fail ArgumentError, "Missing the required parameter 'milestone_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s).sub('{' + 'milestoneId' + '}', milestone_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'MilestoneResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: MilestonesApi#get_system_milestones_by_poam_id_and_milestone_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update one or many POA&M items in a system - # Updates a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [MilestoneResponsePut] - def update_milestone_by_system_id_and_poam_id(body, system_id, poam_id, opts = {}) - data, _status_code, _headers = update_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts) - data - end - - # Update one or many POA&M items in a system - # Updates a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(MilestoneResponsePut, Integer, Hash)>] MilestoneResponsePut data, response status code and response headers - def update_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MilestonesApi.update_milestone_by_system_id_and_poam_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id" - end - # verify the required parameter 'poam_id' is set - if @api_client.config.client_side_validation && poam_id.nil? - fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'MilestoneResponsePut' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: MilestonesApi#update_milestone_by_system_id_and_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/pac_api.rb b/emass_client/ruby_client/lib/emass_client/api/pac_api.rb deleted file mode 100644 index 5c582ba..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/pac_api.rb +++ /dev/null @@ -1,140 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class PACApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Submit system package for review - # Adds a Package Approval Chain (PAC) for given `systemId` path parameter - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PacResponsePost] - def add_system_pac(body, system_id, opts = {}) - data, _status_code, _headers = add_system_pac_with_http_info(body, system_id, opts) - data - end - - # Submit system package for review - # Adds a Package Approval Chain (PAC) for given `systemId` path parameter - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(PacResponsePost, Integer, Hash)>] PacResponsePost data, response status code and response headers - def add_system_pac_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PACApi.add_system_pac ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling PACApi.add_system_pac" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling PACApi.add_system_pac" - end - # resource path - local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'PacResponsePost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PACApi#add_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get location of system package in PAC - # Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PacResponseGet] - def get_system_pac(system_id, opts = {}) - data, _status_code, _headers = get_system_pac_with_http_info(system_id, opts) - data - end - - # Get location of system package in PAC - # Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(PacResponseGet, Integer, Hash)>] PacResponseGet data, response status code and response headers - def get_system_pac_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PACApi.get_system_pac ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling PACApi.get_system_pac" - end - # resource path - local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'PacResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PACApi#get_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/poam_api.rb b/emass_client/ruby_client/lib/emass_client/api/poam_api.rb deleted file mode 100644 index ca90709..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/poam_api.rb +++ /dev/null @@ -1,345 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class POAMApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Add one or many POA&M items in a system - # Add a POA&M for given `systemId`
**Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` **Note**
If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.
`pocFirstName`, `pocLastName`, `pocPhoneNumber`
- # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponsePost] - def add_poam_by_system_id(body, system_id, opts = {}) - data, _status_code, _headers = add_poam_by_system_id_with_http_info(body, system_id, opts) - data - end - - # Add one or many POA&M items in a system - # Add a POA&M for given `systemId`<br> **Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` **Note**<br /> If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocFirstName`, `pocLastName`, `pocPhoneNumber`<br /> - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(PoamResponsePost, Integer, Hash)>] PoamResponsePost data, response status code and response headers - def add_poam_by_system_id_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: POAMApi.add_poam_by_system_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.add_poam_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.add_poam_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'PoamResponsePost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: POAMApi#add_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Remove one or many POA&M items in a system - # Remove the POA&M matching `systemId` path parameter and `poamId` query parameter
- # @param body Delete the given POA&M Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponseDelete] - def delete_poam(body, system_id, opts = {}) - data, _status_code, _headers = delete_poam_with_http_info(body, system_id, opts) - data - end - - # Remove one or many POA&M items in a system - # Remove the POA&M matching `systemId` path parameter and `poamId` query parameter<br> - # @param body Delete the given POA&M Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(PoamResponseDelete, Integer, Hash)>] PoamResponseDelete data, response status code and response headers - def delete_poam_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: POAMApi.delete_poam ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.delete_poam" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.delete_poam" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'PoamResponseDelete' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: POAMApi#delete_poam\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get one or many POA&M items in a system - # Returns system(s) containing POA&M items for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true) - # @return [PoamResponseGet] - def get_system_poams(system_id, opts = {}) - data, _status_code, _headers = get_system_poams_with_http_info(system_id, opts) - data - end - - # Get one or many POA&M items in a system - # Returns system(s) containing POA&M items for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. - # @return [Array<(PoamResponseGet, Integer, Hash)>] PoamResponseGet data, response status code and response headers - def get_system_poams_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.get_system_poams" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'scheduledCompletionDateStart'] = opts[:'scheduled_completion_date_start'] if !opts[:'scheduled_completion_date_start'].nil? - query_params[:'scheduledCompletionDateEnd'] = opts[:'scheduled_completion_date_end'] if !opts[:'scheduled_completion_date_end'].nil? - query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil? - query_params[:'ccis'] = opts[:'ccis'] if !opts[:'ccis'].nil? - query_params[:'systemOnly'] = opts[:'system_only'] if !opts[:'system_only'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'PoamResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: POAMApi#get_system_poams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get POA&M item by ID in a system - # Returns system(s) containing POA&M items for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponseGet] - def get_system_poams_by_poam_id(system_id, poam_id, opts = {}) - data, _status_code, _headers = get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts) - data - end - - # Get POA&M item by ID in a system - # Returns system(s) containing POA&M items for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(PoamResponseGet, Integer, Hash)>] PoamResponseGet data, response status code and response headers - def get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams_by_poam_id ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.get_system_poams_by_poam_id" - end - # verify the required parameter 'poam_id' is set - if @api_client.config.client_side_validation && poam_id.nil? - fail ArgumentError, "Missing the required parameter 'poam_id' when calling POAMApi.get_system_poams_by_poam_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams/{poamId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'PoamResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: POAMApi#get_system_poams_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Update one or many POA&M items in a system - # Update a POA&M for given `systemId`
**Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` **Notes** - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.
`pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`
- To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`. - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponsePut] - def update_poam_by_system_id(body, system_id, opts = {}) - data, _status_code, _headers = update_poam_by_system_id_with_http_info(body, system_id, opts) - data - end - - # Update one or many POA&M items in a system - # Update a POA&M for given `systemId`<br> **Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` **Notes** - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`<br /> - To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`. - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(PoamResponsePut, Integer, Hash)>] PoamResponsePut data, response status code and response headers - def update_poam_by_system_id_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: POAMApi.update_poam_by_system_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.update_poam_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.update_poam_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'PoamResponsePut' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: POAMApi#update_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/registration_api.rb b/emass_client/ruby_client/lib/emass_client/api/registration_api.rb deleted file mode 100644 index 3ef0141..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/registration_api.rb +++ /dev/null @@ -1,78 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class RegistrationApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Register user certificate and obtain an API key - # Returns the api-key - This API key must be provided in the request header for all endpoint calls (api-key). - # @param body User certificate previously provided by eMASS. - # @param [Hash] opts the optional parameters - # @return [Register] - def register_user(body, opts = {}) - data, _status_code, _headers = register_user_with_http_info(body, opts) - data - end - - # Register user certificate and obtain an API key - # Returns the api-key - This API key must be provided in the request header for all endpoint calls (api-key). - # @param body User certificate previously provided by eMASS. - # @param [Hash] opts the optional parameters - # @return [Array<(Register, Integer, Hash)>] Register data, response status code and response headers - def register_user_with_http_info(body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RegistrationApi.register_user ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling RegistrationApi.register_user" - end - # resource path - local_var_path = '/api/api-key' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'Register' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RegistrationApi#register_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/static_code_scans_api.rb b/emass_client/ruby_client/lib/emass_client/api/static_code_scans_api.rb deleted file mode 100644 index 1429861..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/static_code_scans_api.rb +++ /dev/null @@ -1,84 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class StaticCodeScansApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Upload static code scans or Clear static code scans - # Upload or clear application scan findings into a system's `systemId` assets module. **Note:** To clear an application's findings, use only the field `clearFindings` as the Request body and set it to true. - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Success200Response] - def add_static_code_scans_by_system_id(body, system_id, opts = {}) - data, _status_code, _headers = add_static_code_scans_by_system_id_with_http_info(body, system_id, opts) - data - end - - # Upload static code scans or Clear static code scans - # Upload or clear application scan findings into a system's `systemId` assets module. **Note:** To clear an application's findings, use only the field `clearFindings` as the Request body and set it to true. - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(Success200Response, Integer, Hash)>] Success200Response data, response status code and response headers - def add_static_code_scans_by_system_id_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: StaticCodeScansApi.add_static_code_scans_by_system_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling StaticCodeScansApi.add_static_code_scans_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling StaticCodeScansApi.add_static_code_scans_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/static-code-scans'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'Success200Response' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: StaticCodeScansApi#add_static_code_scans_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/system_roles_api.rb b/emass_client/ruby_client/lib/emass_client/api/system_roles_api.rb deleted file mode 100644 index 6f8ce9a..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/system_roles_api.rb +++ /dev/null @@ -1,150 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class SystemRolesApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get available roles - # Returns all available roles - # @param [Hash] opts the optional parameters - # @return [SystemRolesResponse] - def get_system_roles(opts = {}) - data, _status_code, _headers = get_system_roles_with_http_info(opts) - data - end - - # Get available roles - # Returns all available roles - # @param [Hash] opts the optional parameters - # @return [Array<(SystemRolesResponse, Integer, Hash)>] SystemRolesResponse data, response status code and response headers - def get_system_roles_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SystemRolesApi.get_system_roles ...' - end - # resource path - local_var_path = '/api/system-roles' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'SystemRolesResponse' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SystemRolesApi#get_system_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get system roles - # Returns the role(s) data matching parameters. - # @param role_category **Role Category**: The system role category been queried - # @param role **Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA. - # @param [Hash] opts the optional parameters - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. (default to rmf) - # @option opts [BOOLEAN] :include_decommissioned **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. (default to true) - # @return [SystemRolesCategoryResponse] - def get_system_roles_by_category_id(role_category, role, opts = {}) - data, _status_code, _headers = get_system_roles_by_category_id_with_http_info(role_category, role, opts) - data - end - - # Get system roles - # Returns the role(s) data matching parameters. - # @param role_category **Role Category**: The system role category been queried - # @param role **Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA. - # @param [Hash] opts the optional parameters - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - # @option opts [BOOLEAN] :include_decommissioned **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. - # @return [Array<(SystemRolesCategoryResponse, Integer, Hash)>] SystemRolesCategoryResponse data, response status code and response headers - def get_system_roles_by_category_id_with_http_info(role_category, role, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SystemRolesApi.get_system_roles_by_category_id ...' - end - # verify the required parameter 'role_category' is set - if @api_client.config.client_side_validation && role_category.nil? - fail ArgumentError, "Missing the required parameter 'role_category' when calling SystemRolesApi.get_system_roles_by_category_id" - end - # verify enum value - if @api_client.config.client_side_validation && !['CAC', 'PAC', 'Other'].include?(role_category) - fail ArgumentError, "invalid value for 'role_category', must be one of CAC, PAC, Other" - end - # verify the required parameter 'role' is set - if @api_client.config.client_side_validation && role.nil? - fail ArgumentError, "Missing the required parameter 'role' when calling SystemRolesApi.get_system_roles_by_category_id" - end - # verify enum value - if @api_client.config.client_side_validation && !['AO', 'Auditor', 'Artifact Manager', 'C&A Team', 'IAO', 'ISSO', 'PM/IAM', 'SCA', 'User Rep', 'Validator'].include?(role) - fail ArgumentError, "invalid value for 'role', must be one of AO, Auditor, Artifact Manager, C&A Team, IAO, ISSO, PM/IAM, SCA, User Rep, Validator" - end - if @api_client.config.client_side_validation && opts[:'policy'] && !['diacap', 'rmf', 'reporting'].include?(opts[:'policy']) - fail ArgumentError, 'invalid value for "policy", must be one of diacap, rmf, reporting' - end - # resource path - local_var_path = '/api/system-roles/{roleCategory}'.sub('{' + 'roleCategory' + '}', role_category.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'role'] = role - query_params[:'policy'] = opts[:'policy'] if !opts[:'policy'].nil? - query_params[:'includeDecommissioned'] = opts[:'include_decommissioned'] if !opts[:'include_decommissioned'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'SystemRolesCategoryResponse' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SystemRolesApi#get_system_roles_by_category_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/systems_api.rb b/emass_client/ruby_client/lib/emass_client/api/systems_api.rb deleted file mode 100644 index 188ed14..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/systems_api.rb +++ /dev/null @@ -1,162 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class SystemsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get system information for a specific system - # Returns the system matching provided parameters - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_package **Include Package**: Indicates if additional packages information is retrieved for queried system. (default to true) - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. (default to rmf) - # @return [SystemResponse] - def get_system(system_id, opts = {}) - data, _status_code, _headers = get_system_with_http_info(system_id, opts) - data - end - - # Get system information for a specific system - # Returns the system matching provided parameters - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_package **Include Package**: Indicates if additional packages information is retrieved for queried system. - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - # @return [Array<(SystemResponse, Integer, Hash)>] SystemResponse data, response status code and response headers - def get_system_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SystemsApi.get_system ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling SystemsApi.get_system" - end - if @api_client.config.client_side_validation && opts[:'policy'] && !['diacap', 'rmf', 'reporting'].include?(opts[:'policy']) - fail ArgumentError, 'invalid value for "policy", must be one of diacap, rmf, reporting' - end - # resource path - local_var_path = '/api/systems/{systemId}'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'includePackage'] = opts[:'include_package'] if !opts[:'include_package'].nil? - query_params[:'policy'] = opts[:'policy'] if !opts[:'policy'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'SystemResponse' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SystemsApi#get_system\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get system information - # Returns all system(s) that match the query parameters - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_package **Include Package**: Indicates if additional packages information is retrieved for queried system. (default to true) - # @option opts [String] :registration_type **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider (default to regular) - # @option opts [String] :ditpr_id **DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR). - # @option opts [String] :coams_id **COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS). - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. (default to rmf) - # @option opts [BOOLEAN] :include_ditpr_metrics **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:<br> <ul> <li>registrationType</li> <li>policy</li> </ul> (default to false) - # @option opts [BOOLEAN] :include_decommissioned **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. (default to true) - # @option opts [BOOLEAN] :reports_for_scorecard **DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard. (default to true) - # @return [SystemResponse] - def get_systems(opts = {}) - data, _status_code, _headers = get_systems_with_http_info(opts) - data - end - - # Get system information - # Returns all system(s) that match the query parameters - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_package **Include Package**: Indicates if additional packages information is retrieved for queried system. - # @option opts [String] :registration_type **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider - # @option opts [String] :ditpr_id **DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR). - # @option opts [String] :coams_id **COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS). - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - # @option opts [BOOLEAN] :include_ditpr_metrics **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:<br> <ul> <li>registrationType</li> <li>policy</li> </ul> - # @option opts [BOOLEAN] :include_decommissioned **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. - # @option opts [BOOLEAN] :reports_for_scorecard **DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard. - # @return [Array<(SystemResponse, Integer, Hash)>] SystemResponse data, response status code and response headers - def get_systems_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SystemsApi.get_systems ...' - end - if @api_client.config.client_side_validation && opts[:'policy'] && !['diacap', 'rmf', 'reporting'].include?(opts[:'policy']) - fail ArgumentError, 'invalid value for "policy", must be one of diacap, rmf, reporting' - end - # resource path - local_var_path = '/api/systems' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'includePackage'] = opts[:'include_package'] if !opts[:'include_package'].nil? - query_params[:'registrationType'] = opts[:'registration_type'] if !opts[:'registration_type'].nil? - query_params[:'ditprId'] = opts[:'ditpr_id'] if !opts[:'ditpr_id'].nil? - query_params[:'coamsId'] = opts[:'coams_id'] if !opts[:'coams_id'].nil? - query_params[:'policy'] = opts[:'policy'] if !opts[:'policy'].nil? - query_params[:'includeDitprMetrics'] = opts[:'include_ditpr_metrics'] if !opts[:'include_ditpr_metrics'].nil? - query_params[:'includeDecommissioned'] = opts[:'include_decommissioned'] if !opts[:'include_decommissioned'].nil? - query_params[:'reportsForScorecard'] = opts[:'reports_for_scorecard'] if !opts[:'reports_for_scorecard'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'SystemResponse' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SystemsApi#get_systems\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/test_api.rb b/emass_client/ruby_client/lib/emass_client/api/test_api.rb deleted file mode 100644 index ce43690..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/test_api.rb +++ /dev/null @@ -1,70 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class TestApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Test connection to the API - # Returns endpoint call status - # @param [Hash] opts the optional parameters - # @return [Test] - def test_connection(opts = {}) - data, _status_code, _headers = test_connection_with_http_info(opts) - data - end - - # Test connection to the API - # Returns endpoint call status - # @param [Hash] opts the optional parameters - # @return [Array<(Test, Integer, Hash)>] Test data, response status code and response headers - def test_connection_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TestApi.test_connection ...' - end - # resource path - local_var_path = '/api' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'Test' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TestApi#test_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/test_results_api.rb b/emass_client/ruby_client/lib/emass_client/api/test_results_api.rb deleted file mode 100644 index 948ec3c..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/test_results_api.rb +++ /dev/null @@ -1,149 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class TestResultsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Add one or many test results in a system - # Adds test results for given `systemId` **Request Body Required Fields** - `cci` - `testedBy` - `testDate` - `description` - `complianceStatus` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [TestResultsResponsePost] - def add_test_results_by_system_id(body, system_id, opts = {}) - data, _status_code, _headers = add_test_results_by_system_id_with_http_info(body, system_id, opts) - data - end - - # Add one or many test results in a system - # Adds test results for given `systemId` **Request Body Required Fields** - `cci` - `testedBy` - `testDate` - `description` - `complianceStatus` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(TestResultsResponsePost, Integer, Hash)>] TestResultsResponsePost data, response status code and response headers - def add_test_results_by_system_id_with_http_info(body, system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TestResultsApi.add_test_results_by_system_id ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TestResultsApi.add_test_results_by_system_id" - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling TestResultsApi.add_test_results_by_system_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/test-results'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] || @api_client.object_to_http_body(body) - - return_type = opts[:return_type] || 'TestResultsResponsePost' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TestResultsApi#add_test_results_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get one or many test results in a system - # Returns system test results information for matching parameters.
- # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :latest_only **Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated). (default to true) - # @return [TestResultsResponseGet] - def get_system_test_results(system_id, opts = {}) - data, _status_code, _headers = get_system_test_results_with_http_info(system_id, opts) - data - end - - # Get one or many test results in a system - # Returns system test results information for matching parameters.<br> - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :latest_only **Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated). - # @return [Array<(TestResultsResponseGet, Integer, Hash)>] TestResultsResponseGet data, response status code and response headers - def get_system_test_results_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TestResultsApi.get_system_test_results ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling TestResultsApi.get_system_test_results" - end - # resource path - local_var_path = '/api/systems/{systemId}/test-results'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].nil? - query_params[:'ccis'] = opts[:'ccis'] if !opts[:'ccis'].nil? - query_params[:'latestOnly'] = opts[:'latest_only'] if !opts[:'latest_only'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'TestResultsResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TestResultsApi#get_system_test_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/workflow_definitions_api.rb b/emass_client/ruby_client/lib/emass_client/api/workflow_definitions_api.rb deleted file mode 100644 index 78812dd..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/workflow_definitions_api.rb +++ /dev/null @@ -1,76 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class WorkflowDefinitionsApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get workflow definitions in a site - # View all workflow schemas available on the eMASS instance filtered by status `includeInactive` and registration type `registrationType`. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_inactive **Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions. (default to true) - # @option opts [String] :registration_type **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider (default to regular) - # @return [WorkflowDefinitionResponseGet] - def get_workflow_definitions(opts = {}) - data, _status_code, _headers = get_workflow_definitions_with_http_info(opts) - data - end - - # Get workflow definitions in a site - # View all workflow schemas available on the eMASS instance filtered by status `includeInactive` and registration type `registrationType`. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_inactive **Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions. - # @option opts [String] :registration_type **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider - # @return [Array<(WorkflowDefinitionResponseGet, Integer, Hash)>] WorkflowDefinitionResponseGet data, response status code and response headers - def get_workflow_definitions_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: WorkflowDefinitionsApi.get_workflow_definitions ...' - end - # resource path - local_var_path = '/api/workflow-definitions' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'includeInactive'] = opts[:'include_inactive'] if !opts[:'include_inactive'].nil? - query_params[:'registrationType'] = opts[:'registration_type'] if !opts[:'registration_type'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'WorkflowDefinitionResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: WorkflowDefinitionsApi#get_workflow_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api/workflow_instances_api.rb b/emass_client/ruby_client/lib/emass_client/api/workflow_instances_api.rb deleted file mode 100644 index 60659cb..0000000 --- a/emass_client/ruby_client/lib/emass_client/api/workflow_instances_api.rb +++ /dev/null @@ -1,153 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class WorkflowInstancesApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Get workflow instances in a system - # View detailed information on all active and historical workflows for a system `systemId` and filtered by provided parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_comments **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. (default to true) - # @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns true to not include transition comments. (default to 0) - # @option opts [String] :since_date **Date**: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. - # @option opts [String] :status **Status**: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. (default to all) - # @return [WorkflowInstancesResponseGet] - def get_system_workflow_instances(system_id, opts = {}) - data, _status_code, _headers = get_system_workflow_instances_with_http_info(system_id, opts) - data - end - - # Get workflow instances in a system - # View detailed information on all active and historical workflows for a system `systemId` and filtered by provided parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_comments **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. - # @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns true to not include transition comments. - # @option opts [String] :since_date **Date**: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. - # @option opts [String] :status **Status**: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. - # @return [Array<(WorkflowInstancesResponseGet, Integer, Hash)>] WorkflowInstancesResponseGet data, response status code and response headers - def get_system_workflow_instances_with_http_info(system_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: WorkflowInstancesApi.get_system_workflow_instances ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling WorkflowInstancesApi.get_system_workflow_instances" - end - if @api_client.config.client_side_validation && opts[:'status'] && !['active', 'inactive', 'all'].include?(opts[:'status']) - fail ArgumentError, 'invalid value for "status", must be one of active, inactive, all' - end - # resource path - local_var_path = '/api/systems/{systemId}/workflow-instances'.sub('{' + 'systemId' + '}', system_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'includeComments'] = opts[:'include_comments'] if !opts[:'include_comments'].nil? - query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil? - query_params[:'sinceDate'] = opts[:'since_date'] if !opts[:'since_date'].nil? - query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'WorkflowInstancesResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: WorkflowInstancesApi#get_system_workflow_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get workflow instance by ID in a system - # View detailed information on all active and historical workflows for a system `systemId` and `workflowInstanceId`. - # @param system_id **System Id**: The unique system record identifier. - # @param workflow_instance_id **Workflow Instance Id**: The unique milestone record identifier. - # @param [Hash] opts the optional parameters - # @return [WorkflowInstancesResponseGet] - def get_system_workflow_instances_by_workflow_instance_id(system_id, workflow_instance_id, opts = {}) - data, _status_code, _headers = get_system_workflow_instances_by_workflow_instance_id_with_http_info(system_id, workflow_instance_id, opts) - data - end - - # Get workflow instance by ID in a system - # View detailed information on all active and historical workflows for a system `systemId` and `workflowInstanceId`. - # @param system_id **System Id**: The unique system record identifier. - # @param workflow_instance_id **Workflow Instance Id**: The unique milestone record identifier. - # @param [Hash] opts the optional parameters - # @return [Array<(WorkflowInstancesResponseGet, Integer, Hash)>] WorkflowInstancesResponseGet data, response status code and response headers - def get_system_workflow_instances_by_workflow_instance_id_with_http_info(system_id, workflow_instance_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: WorkflowInstancesApi.get_system_workflow_instances_by_workflow_instance_id ...' - end - # verify the required parameter 'system_id' is set - if @api_client.config.client_side_validation && system_id.nil? - fail ArgumentError, "Missing the required parameter 'system_id' when calling WorkflowInstancesApi.get_system_workflow_instances_by_workflow_instance_id" - end - # verify the required parameter 'workflow_instance_id' is set - if @api_client.config.client_side_validation && workflow_instance_id.nil? - fail ArgumentError, "Missing the required parameter 'workflow_instance_id' when calling WorkflowInstancesApi.get_system_workflow_instances_by_workflow_instance_id" - end - # resource path - local_var_path = '/api/systems/{systemId}/workflow-instances/{workflowInstanceId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'workflowInstanceId' + '}', workflow_instance_id.to_s) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:body] - - return_type = opts[:return_type] || 'WorkflowInstancesResponseGet' - - auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type) - - if @api_client.config.debugging - @api_client.config.logger.debug "API called: WorkflowInstancesApi#get_system_workflow_instances_by_workflow_instance_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api_client.rb b/emass_client/ruby_client/lib/emass_client/api_client.rb deleted file mode 100644 index 95c1547..0000000 --- a/emass_client/ruby_client/lib/emass_client/api_client.rb +++ /dev/null @@ -1,389 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' -require 'json' -require 'logger' -require 'tempfile' -require 'typhoeus' -require 'uri' - -module EmassClient - class ApiClient - # The Configuration object holding settings to be used in the API client. - attr_accessor :config - - # Defines the headers to be used in HTTP requests of all API calls by default. - # - # @return [Hash] - attr_accessor :default_headers - - # Initializes the ApiClient - # @option config [Configuration] Configuration for initializing the object, default to Configuration.default - def initialize(config = Configuration.default) - @config = config - @user_agent = "Swagger-Codegen/#{VERSION}/ruby" - @default_headers = { - 'Content-Type' => 'application/json', - 'User-Agent' => @user_agent - } - end - - def self.default - @@default ||= ApiClient.new - end - - # Call an API with given options. - # - # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. - def call_api(http_method, path, opts = {}) - request = build_request(http_method, path, opts) - response = request.run - - if @config.debugging - @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" - end - - unless response.success? - if response.timed_out? - fail ApiError.new('Connection timed out') - elsif response.code == 0 - # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) - else - fail ApiError.new(:code => response.code, - :response_headers => response.headers, - :response_body => response.body), - response.status_message - end - end - - if opts[:return_type] - data = deserialize(response, opts[:return_type]) - else - data = nil - end - return data, response.code, response.headers - end - - # Builds the HTTP request - # - # @param [String] http_method HTTP method/verb (e.g. POST) - # @param [String] path URL path (e.g. /account/new) - # @option opts [Hash] :header_params Header parameters - # @option opts [Hash] :query_params Query parameters - # @option opts [Hash] :form_params Query parameters - # @option opts [Object] :body HTTP body (JSON/XML) - # @return [Typhoeus::Request] A Typhoeus Request - def build_request(http_method, path, opts = {}) - url = build_request_url(path) - http_method = http_method.to_sym.downcase - - header_params = @default_headers.merge(opts[:header_params] || {}) - query_params = opts[:query_params] || {} - form_params = opts[:form_params] || {} - - update_params_for_auth! header_params, query_params, opts[:auth_names] - - # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false) - _verify_ssl_host = @config.verify_ssl_host ? 2 : 0 - - req_opts = { - :method => http_method, - :headers => header_params, - :params => query_params, - :params_encoding => @config.params_encoding, - :timeout => @config.timeout, - :ssl_verifypeer => @config.verify_ssl, - :ssl_verifyhost => _verify_ssl_host, - :sslcert => @config.cert_file, - :sslkey => @config.key_file, - :verbose => @config.debugging, - :keypasswd => @config.key_password - } - - # set custom cert, if provided - req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert - - if [:post, :patch, :put, :delete].include?(http_method) - req_body = build_request_body(header_params, form_params, opts[:body]) - req_opts.update :body => req_body - if @config.debugging - @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" - end - end - - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request - end - - # Builds the HTTP request body - # - # @param [Hash] header_params Header parameters - # @param [Hash] form_params Query parameters - # @param [Object] body HTTP body (JSON/XML) - # @return [String] HTTP body data in the form of string - def build_request_body(header_params, form_params, body) - # http form - if header_params['Content-Type'] == 'application/x-www-form-urlencoded' || - header_params['Content-Type'] == 'multipart/form-data' - data = {} - form_params.each do |key, value| - case value - when ::File, ::Array, nil - # let typhoeus handle File, Array and nil parameters - data[key] = value - else - data[key] = value.to_s - end - end - elsif body - data = body.is_a?(String) ? body : body.to_json - else - data = nil - end - data - end - - # Check if the given MIME is a JSON MIME. - # JSON MIME examples: - # application/json - # application/json; charset=UTF8 - # APPLICATION/JSON - # */* - # @param [String] mime MIME - # @return [Boolean] True if the MIME is application/json - def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? - end - - # Deserialize the response to the given return type. - # - # @param [Response] response HTTP response - # @param [String] return_type some examples: "User", "Array", "Hash" - def deserialize(response, return_type) - body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' - - return nil if body.nil? || body.empty? - - # return response body directly for String return type - return body if return_type == 'String' - - # ensuring a default content type - content_type = response.headers['Content-Type'] || 'application/json' - - fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) - - begin - data = JSON.parse("[#{body}]", :symbolize_names => true)[0] - rescue JSON::ParserError => e - if %w(String Date DateTime).include?(return_type) - data = body - else - raise e - end - end - - convert_to_type data, return_type - end - - # Convert data to the given return type. - # @param [Object] data Data to be converted - # @param [String] return_type Return type - # @return [Mixed] Data in a particular type - def convert_to_type(data, return_type) - return nil if data.nil? - case return_type - when 'String' - data.to_s - when 'Integer' - data.to_i - when 'Float' - data.to_f - when 'Boolean' - data == true - when 'DateTime' - # parse date time (expecting ISO 8601 format) - DateTime.parse data - when 'Date' - # parse date time (expecting ISO 8601 format) - Date.parse data - when 'Object' - # generic object (usually a Hash), return directly - data - when /\AArray<(.+)>\z/ - # e.g. Array - sub_type = $1 - data.map { |item| convert_to_type(item, sub_type) } - when /\AHash\\z/ - # e.g. Hash - sub_type = $1 - {}.tap do |hash| - data.each { |k, v| hash[k] = convert_to_type(v, sub_type) } - end - else - # models, e.g. Pet - EmassClient.const_get(return_type).build_from_hash(data) - end - end - - # Save response body into a file in (the defined) temporary folder, using the filename - # from the "Content-Disposition" header if provided, otherwise a random filename. - # The response body is written to the file in chunks in order to handle files which - # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby - # process can use. - # - # @see Configuration#temp_folder_path - def download_file(request) - tempfile = nil - encoding = nil - request.on_headers do |response| - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) - else - prefix = 'download-' - end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = response.body.encoding - tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile - end - request.on_body do |chunk| - chunk.force_encoding(encoding) - tempfile.write(chunk) - end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end - end - end - - # Sanitize filename by removing path. - # e.g. ../../sun.gif becomes sun.gif - # - # @param [String] filename the filename to be sanitized - # @return [String] the sanitized filename - def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') - end - - def build_request_url(path) - # Add leading and trailing slashes to path - path = "/#{path}".gsub(/\/+/, '/') - @config.base_url + path - end - - # Update hearder and query params based on authentication settings. - # - # @param [Hash] header_params Header parameters - # @param [Hash] query_params Query parameters - # @param [String] auth_names Authentication scheme name - def update_params_for_auth!(header_params, query_params, auth_names) - Array(auth_names).each do |auth_name| - auth_setting = @config.auth_settings[auth_name] - next unless auth_setting - case auth_setting[:in] - when 'header' then header_params[auth_setting[:key]] = auth_setting[:value] - when 'query' then query_params[auth_setting[:key]] = auth_setting[:value] - else fail ArgumentError, 'Authentication token must be in `query` of `header`' - end - end - end - - # Sets user agent in HTTP header - # - # @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0) - def user_agent=(user_agent) - @user_agent = user_agent - @default_headers['User-Agent'] = @user_agent - end - - # Return Accept header based on an array of accepts provided. - # @param [Array] accepts array for Accept - # @return [String] the Accept header (e.g. application/json) - def select_header_accept(accepts) - return nil if accepts.nil? || accepts.empty? - # use JSON when present, otherwise use all of the provided - json_accept = accepts.find { |s| json_mime?(s) } - json_accept || accepts.join(',') - end - - # Return Content-Type header based on an array of content types provided. - # @param [Array] content_types array for Content-Type - # @return [String] the Content-Type header (e.g. application/json) - def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? - # use JSON when present, otherwise use the first one - json_content_type = content_types.find { |s| json_mime?(s) } - json_content_type || content_types.first - end - - # Convert object (array, hash, object, etc) to JSON string. - # @param [Object] model object to be converted into JSON string - # @return [String] JSON string representation of the object - def object_to_http_body(model) - return model if model.nil? || model.is_a?(String) - local_body = nil - if model.is_a?(Array) - local_body = model.map { |m| object_to_hash(m) } - else - local_body = object_to_hash(model) - end - local_body.to_json - end - - # Convert object(non-array) to hash. - # @param [Object] obj object to be converted into JSON string - # @return [String] JSON string representation of the object - def object_to_hash(obj) - if obj.respond_to?(:to_hash) - obj.to_hash - else - obj - end - end - - # Build parameter value according to the given collection format. - # @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi - def build_collection_param(param, collection_format) - case collection_format - when :csv - param.join(',') - when :ssv - param.join(' ') - when :tsv - param.join("\t") - when :pipes - param.join('|') - when :multi - # return the array directly as typhoeus will handle it as expected - param - else - fail "unknown collection format: #{collection_format.inspect}" - end - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/api_error.rb b/emass_client/ruby_client/lib/emass_client/api_error.rb deleted file mode 100644 index cd0b8c0..0000000 --- a/emass_client/ruby_client/lib/emass_client/api_error.rb +++ /dev/null @@ -1,57 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class ApiError < StandardError - attr_reader :code, :response_headers, :response_body - - # Usage examples: - # ApiError.new - # ApiError.new("message") - # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") - # ApiError.new(:code => 404, :message => "Not Found") - def initialize(arg = nil) - if arg.is_a? Hash - if arg.key?(:message) || arg.key?('message') - super(arg[:message] || arg['message']) - else - super arg - end - - arg.each do |k, v| - instance_variable_set "@#{k}", v - end - else - super arg - end - end - - # Override to_s to display a friendly error message - def to_s - message - end - - def message - if @message.nil? - msg = "Error message: the server returns an error" - else - msg = @message - end - - msg += "\nHTTP status code: #{code}" if code - msg += "\nResponse headers: #{response_headers}" if response_headers - msg += "\nResponse body: #{response_body}" if response_body - - msg - end - - end -end diff --git a/emass_client/ruby_client/lib/emass_client/configuration.rb b/emass_client/ruby_client/lib/emass_client/configuration.rb deleted file mode 100644 index 4ba2473..0000000 --- a/emass_client/ruby_client/lib/emass_client/configuration.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - class Configuration - # Defines url scheme - attr_accessor :scheme - - # Defines url host - attr_accessor :host - - # Defines url base path - attr_accessor :base_path - - # Defines API keys used with API Key authentications. - # - # @return [Hash] key: parameter name, value: parameter value (API key) - # - # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string) - # config.api_key['api_key'] = 'xxx' - attr_accessor :api_key - - # Defines API key prefixes used with API Key authentications. - # - # @return [Hash] key: parameter name, value: API key prefix - # - # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers) - # config.api_key_prefix['api_key'] = 'Token' - attr_accessor :api_key_prefix - - # Defines the username used with HTTP basic authentication. - # - # @return [String] - attr_accessor :username - - # Defines the password used with HTTP basic authentication. - # - # @return [String] - attr_accessor :password - - # Defines the access token (Bearer) used with OAuth2. - attr_accessor :access_token - - # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response - # details will be logged with `logger.debug` (see the `logger` attribute). - # Default to false. - # - # @return [true, false] - attr_accessor :debugging - - # Defines the logger used for debugging. - # Default to `Rails.logger` (when in Rails) or logging to STDOUT. - # - # @return [#debug] - attr_accessor :logger - - # Defines the temporary folder to store downloaded files - # (for API endpoints that have file response). - # Default to use `Tempfile`. - # - # @return [String] - attr_accessor :temp_folder_path - - # The time limit for HTTP request in seconds. - # Default to 0 (never times out). - attr_accessor :timeout - - # Set this to false to skip client side validation in the operation. - # Default to true. - # @return [true, false] - attr_accessor :client_side_validation - - ### TLS/SSL setting - # Set this to false to skip verifying SSL certificate when calling API from https server. - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :verify_ssl - - ### TLS/SSL setting - # Set this to false to skip verifying SSL host name - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :verify_ssl_host - - ### TLS/SSL setting - # Set this to customize the certificate file to verify the peer. - # - # @return [String] the path to the certificate file - # - # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code: - # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145 - attr_accessor :ssl_ca_cert - - ### TLS/SSL setting - # Client certificate file (for client certificate) - attr_accessor :cert_file - - ### TLS/SSL setting - # Client private key file (for client certificate) - attr_accessor :key_file - - ### TLS/SSL setting - # Client private key passphrase (for client certificate) - attr_accessor :key_password - - # Set this to customize parameters encoding of array parameter with multi collectionFormat. - # Default to nil. - # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 - attr_accessor :params_encoding - - attr_accessor :inject_format - - attr_accessor :force_ending_format - - def initialize - @scheme = 'http' - @host = 'localhost' - @base_path = 'http://localhost:4010' - @api_key = {} - @api_key_prefix = {} - @timeout = 0 - @client_side_validation = true - @verify_ssl = true - @verify_ssl_host = true - @params_encoding = nil - @cert_file = nil - @key_file = nil - @key_password = nil - @debugging = false - @inject_format = false - @force_ending_format = false - @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) - - yield(self) if block_given? - end - - # The default Configuration object. - def self.default - @@default ||= Configuration.new - end - - def configure - yield(self) if block_given? - end - - def scheme=(scheme) - # remove :// from scheme - @scheme = scheme.sub(/:\/\//, '') - end - - def host=(host) - # remove http(s):// and anything after a slash - @host = host.sub(/https?:\/\//, '').split('/').first - end - - def base_path=(base_path) - # Add leading and trailing slashes to base_path - @base_path = "/#{base_path}".gsub(/\/+/, '/') - @base_path = '' if @base_path == '/' - end - - def base_url - "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - end - - # Gets API key (with prefix if set). - # @param [String] param_name the parameter name of API key auth - def api_key_with_prefix(param_name) - if @api_key_prefix[param_name] - "#{@api_key_prefix[param_name]} #{@api_key[param_name]}" - else - @api_key[param_name] - end - end - - # Gets Basic Auth token string - def basic_auth_token - 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") - end - - # Returns Auth Settings hash for api client. - def auth_settings - { - 'apikey' => - { - type: 'api_key', - in: 'header', - key: 'api-key', - value: api_key_with_prefix('api-key') - }, - 'mockType' => - { - type: 'api_key', - in: 'header', - key: 'Prefer', - value: api_key_with_prefix('Prefer') - }, - 'userid' => - { - type: 'api_key', - in: 'header', - key: 'user-uid', - value: api_key_with_prefix('user-uid') - }, - } - end - end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_delete.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_delete.rb deleted file mode 100644 index cc44507..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_delete.rb +++ /dev/null @@ -1,201 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsDelete - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsDelete` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - # call parent's initialize - super(attributes) - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = super - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && super(o) - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - super(attributes) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = super - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_delete_inner.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_delete_inner.rb deleted file mode 100644 index 41bdfed..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_delete_inner.rb +++ /dev/null @@ -1,207 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsDeleteInner - # [Required] File name should match exactly one file within the provided zip file. 1000 Characters. - attr_accessor :filename - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'filename' => :'filename' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'filename' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsDeleteInner` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsDeleteInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'filename') - self.filename = attributes[:'filename'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - filename == o.filename - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [filename].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_get.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_get.rb deleted file mode 100644 index 454e3f9..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_get.rb +++ /dev/null @@ -1,383 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsGet - # [Required] Unique eMASS system identifier. - attr_accessor :system_id - - # [Required] File name should match exactly one file within the provided zip file. 1000 Characters. - attr_accessor :filename - - # [Read-only] Indicates whether an artifact is inherited. - attr_accessor :is_inherited - - # [Read-only] Indicates whether an artifact template. - attr_accessor :is_template - - # [Required] Artifact type options - attr_accessor :type - - # [Required] Artifact category options - attr_accessor :category - - # [Optional] Artifact description. 2000 Characters. - attr_accessor :description - - # [Optional] Artifact reference page number. 50 Characters. - attr_accessor :ref_page_number - - # [Optional] CCI associated with test result. - attr_accessor :ccis - - # [Optional] Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined. - attr_accessor :controls - - # [Read-Only] Standard MIME content type derived from file extension. - attr_accessor :mime_content_type - - # [Read-Only] File size of attached artifact. - attr_accessor :file_size - - # [Optional] Date Artifact expires and requires review. In Unix Date format. - attr_accessor :artifact_expiration_date - - # [Conditional] Date Artifact was last reviewed.. Unix time format. - attr_accessor :last_reviewed_date - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'filename' => :'filename', - :'is_inherited' => :'isInherited', - :'is_template' => :'isTemplate', - :'type' => :'type', - :'category' => :'category', - :'description' => :'description', - :'ref_page_number' => :'refPageNumber', - :'ccis' => :'ccis', - :'controls' => :'controls', - :'mime_content_type' => :'mimeContentType', - :'file_size' => :'fileSize', - :'artifact_expiration_date' => :'artifactExpirationDate', - :'last_reviewed_date' => :'lastReviewedDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'filename' => :'Object', - :'is_inherited' => :'Object', - :'is_template' => :'Object', - :'type' => :'Object', - :'category' => :'Object', - :'description' => :'Object', - :'ref_page_number' => :'Object', - :'ccis' => :'Object', - :'controls' => :'Object', - :'mime_content_type' => :'Object', - :'file_size' => :'Object', - :'artifact_expiration_date' => :'Object', - :'last_reviewed_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'filename') - self.filename = attributes[:'filename'] - end - - if attributes.key?(:'is_inherited') - self.is_inherited = attributes[:'is_inherited'] - end - - if attributes.key?(:'is_template') - self.is_template = attributes[:'is_template'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'category') - self.category = attributes[:'category'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'ref_page_number') - self.ref_page_number = attributes[:'ref_page_number'] - end - - if attributes.key?(:'ccis') - self.ccis = attributes[:'ccis'] - end - - if attributes.key?(:'controls') - self.controls = attributes[:'controls'] - end - - if attributes.key?(:'mime_content_type') - self.mime_content_type = attributes[:'mime_content_type'] - end - - if attributes.key?(:'file_size') - self.file_size = attributes[:'file_size'] - end - - if attributes.key?(:'artifact_expiration_date') - self.artifact_expiration_date = attributes[:'artifact_expiration_date'] - end - - if attributes.key?(:'last_reviewed_date') - self.last_reviewed_date = attributes[:'last_reviewed_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - type_validator = EnumAttributeValidator.new('Object', ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result', 'Auditor Report']) - return false unless type_validator.valid?(@type) - category_validator = EnumAttributeValidator.new('Object', ['Implementation Guidance', 'Evidence']) - return false unless category_validator.valid?(@category) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('Object', ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result', 'Auditor Report']) - unless validator.valid?(type) - fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." - end - @type = type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] category Object to be assigned - def category=(category) - validator = EnumAttributeValidator.new('Object', ['Implementation Guidance', 'Evidence']) - unless validator.valid?(category) - fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}." - end - @category = category - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - filename == o.filename && - is_inherited == o.is_inherited && - is_template == o.is_template && - type == o.type && - category == o.category && - description == o.description && - ref_page_number == o.ref_page_number && - ccis == o.ccis && - controls == o.controls && - mime_content_type == o.mime_content_type && - file_size == o.file_size && - artifact_expiration_date == o.artifact_expiration_date && - last_reviewed_date == o.last_reviewed_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, filename, is_inherited, is_template, type, category, description, ref_page_number, ccis, controls, mime_content_type, file_size, artifact_expiration_date, last_reviewed_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_request_put_body.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_request_put_body.rb deleted file mode 100644 index a7bb169..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_request_put_body.rb +++ /dev/null @@ -1,363 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsRequestPutBody - # [Required] File name should match exactly one file within the provided zip file. 1000 Characters. - attr_accessor :filename - - # [Required] Indicates it is an artifact template. - attr_accessor :is_template - - # [Required] Artifact type options - attr_accessor :type - - # [Required] Artifact category options - attr_accessor :category - - # [Optional] Artifact description. 2000 Characters. - attr_accessor :description - - # [Optional] Artifact reference page number. 50 Characters. - attr_accessor :ref_page_number - - # [Required] CCI associated with test result. - attr_accessor :ccis - - # [Optional] Control acronym associated with the artifact. NIST SP 800-53 Revision 4 defined. - attr_accessor :controls - - # [Optional] Date Artifact expires and requires review. In Unix Date format. - attr_accessor :artifact_expiration_date - - # [Optional]] Date Artifact was last reviewed.. Unix time format. - attr_accessor :last_reviewed_date - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'filename' => :'filename', - :'is_template' => :'isTemplate', - :'type' => :'type', - :'category' => :'category', - :'description' => :'description', - :'ref_page_number' => :'refPageNumber', - :'ccis' => :'ccis', - :'controls' => :'controls', - :'artifact_expiration_date' => :'artifactExpirationDate', - :'last_reviewed_date' => :'lastReviewedDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'filename' => :'Object', - :'is_template' => :'Object', - :'type' => :'Object', - :'category' => :'Object', - :'description' => :'Object', - :'ref_page_number' => :'Object', - :'ccis' => :'Object', - :'controls' => :'Object', - :'artifact_expiration_date' => :'Object', - :'last_reviewed_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsRequestPutBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsRequestPutBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'filename') - self.filename = attributes[:'filename'] - end - - if attributes.key?(:'is_template') - self.is_template = attributes[:'is_template'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'category') - self.category = attributes[:'category'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'ref_page_number') - self.ref_page_number = attributes[:'ref_page_number'] - end - - if attributes.key?(:'ccis') - self.ccis = attributes[:'ccis'] - end - - if attributes.key?(:'controls') - self.controls = attributes[:'controls'] - end - - if attributes.key?(:'artifact_expiration_date') - self.artifact_expiration_date = attributes[:'artifact_expiration_date'] - end - - if attributes.key?(:'last_reviewed_date') - self.last_reviewed_date = attributes[:'last_reviewed_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @filename.nil? - invalid_properties.push('invalid value for "filename", filename cannot be nil.') - end - - if @is_template.nil? - invalid_properties.push('invalid value for "is_template", is_template cannot be nil.') - end - - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') - end - - if @category.nil? - invalid_properties.push('invalid value for "category", category cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @filename.nil? - return false if @is_template.nil? - return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result']) - return false unless type_validator.valid?(@type) - return false if @category.nil? - category_validator = EnumAttributeValidator.new('Object', ['Implementation Guidance', 'Evidence']) - return false unless category_validator.valid?(@category) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('Object', ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result']) - unless validator.valid?(type) - fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." - end - @type = type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] category Object to be assigned - def category=(category) - validator = EnumAttributeValidator.new('Object', ['Implementation Guidance', 'Evidence']) - unless validator.valid?(category) - fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}." - end - @category = category - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - filename == o.filename && - is_template == o.is_template && - type == o.type && - category == o.category && - description == o.description && - ref_page_number == o.ref_page_number && - ccis == o.ccis && - controls == o.controls && - artifact_expiration_date == o.artifact_expiration_date && - last_reviewed_date == o.last_reviewed_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [filename, is_template, type, category, description, ref_page_number, ccis, controls, artifact_expiration_date, last_reviewed_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_del.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_response_del.rb deleted file mode 100644 index 7c6e091..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_del.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsResponseDel - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsResponseDel` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsResponseDel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_del_data.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_response_del_data.rb deleted file mode 100644 index 06db2cc..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_del_data.rb +++ /dev/null @@ -1,225 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsResponseDelData - # [Required] File name should match exactly one file within the provided zip file. 1000 Characters. - attr_accessor :filename - - attr_accessor :success - - attr_accessor :system_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'filename' => :'filename', - :'success' => :'success', - :'system_id' => :'systemId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'filename' => :'Object', - :'success' => :'Object', - :'system_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsResponseDelData` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsResponseDelData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'filename') - self.filename = attributes[:'filename'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - filename == o.filename && - success == o.success && - system_id == o.system_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [filename, success, system_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_response_get.rb deleted file mode 100644 index dec5b24..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_put_post.rb b/emass_client/ruby_client/lib/emass_client/models/artifacts_response_put_post.rb deleted file mode 100644 index 1f94dcf..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/artifacts_response_put_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ArtifactsResponsePutPost - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ArtifactsResponsePutPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ArtifactsResponsePutPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cac_get.rb b/emass_client/ruby_client/lib/emass_client/models/cac_get.rb deleted file mode 100644 index a633898..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cac_get.rb +++ /dev/null @@ -1,301 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CacGet - # [Required] Unique eMASS system identifier. - attr_accessor :system_id - - # [Required] System acronym name. - attr_accessor :control_acronym - - # [Read-only] Compliance status of the control. - attr_accessor :compliance_status - - # [Read-Only] Role in current stage. - attr_accessor :current_stage_name - - # [Read-Only] Current step in the Control Approval Chain. - attr_accessor :current_stage - - # [Read-Only] Total number of steps in Control Approval Chain. - attr_accessor :total_stages - - # [Conditional] Control Approval Chain comments - 2000 Characters. - attr_accessor :comments - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'control_acronym' => :'controlAcronym', - :'compliance_status' => :'complianceStatus', - :'current_stage_name' => :'currentStageName', - :'current_stage' => :'currentStage', - :'total_stages' => :'totalStages', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'control_acronym' => :'Object', - :'compliance_status' => :'Object', - :'current_stage_name' => :'Object', - :'current_stage' => :'Object', - :'total_stages' => :'Object', - :'comments' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CacGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CacGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'control_acronym') - self.control_acronym = attributes[:'control_acronym'] - end - - if attributes.key?(:'compliance_status') - self.compliance_status = attributes[:'compliance_status'] - end - - if attributes.key?(:'current_stage_name') - self.current_stage_name = attributes[:'current_stage_name'] - end - - if attributes.key?(:'current_stage') - self.current_stage = attributes[:'current_stage'] - end - - if attributes.key?(:'total_stages') - self.total_stages = attributes[:'total_stages'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - compliance_status_validator = EnumAttributeValidator.new('Object', ['Compliant', 'Not Compliant', 'No Status', 'Not Applicable']) - return false unless compliance_status_validator.valid?(@compliance_status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] compliance_status Object to be assigned - def compliance_status=(compliance_status) - validator = EnumAttributeValidator.new('Object', ['Compliant', 'Not Compliant', 'No Status', 'Not Applicable']) - unless validator.valid?(compliance_status) - fail ArgumentError, "invalid value for \"compliance_status\", must be one of #{validator.allowable_values}." - end - @compliance_status = compliance_status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - control_acronym == o.control_acronym && - compliance_status == o.compliance_status && - current_stage_name == o.current_stage_name && - current_stage == o.current_stage && - total_stages == o.total_stages && - comments == o.comments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, control_acronym, compliance_status, current_stage_name, current_stage, total_stages, comments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cac_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/cac_request_post_body.rb deleted file mode 100644 index 0f7a2b6..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cac_request_post_body.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CacRequestPostBody - # [Required] System acronym name. - attr_accessor :control_acronym - - # [Conditional] Control Approval Chain comments - 2000 Characters. - attr_accessor :comments - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'control_acronym' => :'controlAcronym', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'control_acronym' => :'Object', - :'comments' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CacRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CacRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'control_acronym') - self.control_acronym = attributes[:'control_acronym'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - control_acronym == o.control_acronym && - comments == o.comments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [control_acronym, comments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cac_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/cac_response_get.rb deleted file mode 100644 index a1db7aa..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cac_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CacResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CacResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CacResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cac_response_post.rb b/emass_client/ruby_client/lib/emass_client/models/cac_response_post.rb deleted file mode 100644 index e381e2f..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cac_response_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CacResponsePost - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CacResponsePost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CacResponsePost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cac_response_post_data.rb b/emass_client/ruby_client/lib/emass_client/models/cac_response_post_data.rb deleted file mode 100644 index 7455790..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cac_response_post_data.rb +++ /dev/null @@ -1,225 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CacResponsePostData - # [Required] System acronym name. - attr_accessor :control_acronym - - attr_accessor :success - - attr_accessor :system_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'control_acronym' => :'controlAcronym', - :'success' => :'success', - :'system_id' => :'systemId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'control_acronym' => :'Object', - :'success' => :'Object', - :'system_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CacResponsePostData` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CacResponsePostData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'control_acronym') - self.control_acronym = attributes[:'control_acronym'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - control_acronym == o.control_acronym && - success == o.success && - system_id == o.system_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [control_acronym, success, system_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cmmc_get.rb b/emass_client/ruby_client/lib/emass_client/models/cmmc_get.rb deleted file mode 100644 index acb9695..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cmmc_get.rb +++ /dev/null @@ -1,398 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CmmcGet - # [Read-Only] Indicates the action that should be taken on the assessment record since the provided sinceDate. - attr_accessor :operation - - # [Read-Only] The name of the DIB Company. - attr_accessor :hq_organization_name - - # [Read-Only] The Data Universal Numbering System (DUNS) number. - attr_accessor :duns - - # [Read-Only] The Unique Entity Identifier assigned to the DIB Company. - attr_accessor :unique_entity_identifier - - # [Read-Only] The five position code(s) associated with the Organization Seeking Certification (OSC). - attr_accessor :cage_codes - - # [Read-Only] The name of the Organization Seeking Certification. - attr_accessor :osc_name - - # [Read-Only] The scope of the OSC assessment. - attr_accessor :scope - - # [Read-Only] Brief description of the scope of the OSC assessment - attr_accessor :scope_description - - # [Read-Only] The CMMC award level. - attr_accessor :awarded_cmmc_level - - # [Read-Only] Expiration date of the awarded CMMC certification. - attr_accessor :expiration_date - - # [Read-Only] Unique identifier for the assessment/certificate. - attr_accessor :certificate_id - - # [Read-Only] Version of the CMMC Model used as part of the assessment. - attr_accessor :model_version - - attr_accessor :ssps - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'operation' => :'operation', - :'hq_organization_name' => :'hqOrganizationName', - :'duns' => :'duns', - :'unique_entity_identifier' => :'uniqueEntityIdentifier', - :'cage_codes' => :'cageCodes', - :'osc_name' => :'oscName', - :'scope' => :'scope', - :'scope_description' => :'scopeDescription', - :'awarded_cmmc_level' => :'awardedCMMCLevel', - :'expiration_date' => :'expirationDate', - :'certificate_id' => :'certificateId', - :'model_version' => :'modelVersion', - :'ssps' => :'ssps' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'operation' => :'Object', - :'hq_organization_name' => :'Object', - :'duns' => :'Object', - :'unique_entity_identifier' => :'Object', - :'cage_codes' => :'Object', - :'osc_name' => :'Object', - :'scope' => :'Object', - :'scope_description' => :'Object', - :'awarded_cmmc_level' => :'Object', - :'expiration_date' => :'Object', - :'certificate_id' => :'Object', - :'model_version' => :'Object', - :'ssps' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CmmcGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CmmcGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'operation') - self.operation = attributes[:'operation'] - end - - if attributes.key?(:'hq_organization_name') - self.hq_organization_name = attributes[:'hq_organization_name'] - end - - if attributes.key?(:'duns') - self.duns = attributes[:'duns'] - end - - if attributes.key?(:'unique_entity_identifier') - self.unique_entity_identifier = attributes[:'unique_entity_identifier'] - end - - if attributes.key?(:'cage_codes') - self.cage_codes = attributes[:'cage_codes'] - end - - if attributes.key?(:'osc_name') - self.osc_name = attributes[:'osc_name'] - end - - if attributes.key?(:'scope') - self.scope = attributes[:'scope'] - end - - if attributes.key?(:'scope_description') - self.scope_description = attributes[:'scope_description'] - end - - if attributes.key?(:'awarded_cmmc_level') - self.awarded_cmmc_level = attributes[:'awarded_cmmc_level'] - end - - if attributes.key?(:'expiration_date') - self.expiration_date = attributes[:'expiration_date'] - end - - if attributes.key?(:'certificate_id') - self.certificate_id = attributes[:'certificate_id'] - end - - if attributes.key?(:'model_version') - self.model_version = attributes[:'model_version'] - end - - if attributes.key?(:'ssps') - if (value = attributes[:'ssps']).is_a?(Array) - self.ssps = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - operation_validator = EnumAttributeValidator.new('Object', ['ADDED', 'UPDATED', 'DELETED']) - return false unless operation_validator.valid?(@operation) - cage_codes_validator = EnumAttributeValidator.new('Object', ['89ED9; 99D8B', '34TH5; 23YH6', '75F8H; 2GH5I', '45RF9', '58H9L; 45UH8; 75F8H; 2GH5I']) - return false unless cage_codes_validator.valid?(@cage_codes) - scope_validator = EnumAttributeValidator.new('Object', ['Enterprise', 'Non-Enterprise']) - return false unless scope_validator.valid?(@scope) - awarded_cmmc_level_validator = EnumAttributeValidator.new('Object', ['Not Certified', 'Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5']) - return false unless awarded_cmmc_level_validator.valid?(@awarded_cmmc_level) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] operation Object to be assigned - def operation=(operation) - validator = EnumAttributeValidator.new('Object', ['ADDED', 'UPDATED', 'DELETED']) - unless validator.valid?(operation) - fail ArgumentError, "invalid value for \"operation\", must be one of #{validator.allowable_values}." - end - @operation = operation - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] cage_codes Object to be assigned - def cage_codes=(cage_codes) - validator = EnumAttributeValidator.new('Object', ['89ED9; 99D8B', '34TH5; 23YH6', '75F8H; 2GH5I', '45RF9', '58H9L; 45UH8; 75F8H; 2GH5I']) - unless validator.valid?(cage_codes) - fail ArgumentError, "invalid value for \"cage_codes\", must be one of #{validator.allowable_values}." - end - @cage_codes = cage_codes - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] scope Object to be assigned - def scope=(scope) - validator = EnumAttributeValidator.new('Object', ['Enterprise', 'Non-Enterprise']) - unless validator.valid?(scope) - fail ArgumentError, "invalid value for \"scope\", must be one of #{validator.allowable_values}." - end - @scope = scope - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] awarded_cmmc_level Object to be assigned - def awarded_cmmc_level=(awarded_cmmc_level) - validator = EnumAttributeValidator.new('Object', ['Not Certified', 'Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5']) - unless validator.valid?(awarded_cmmc_level) - fail ArgumentError, "invalid value for \"awarded_cmmc_level\", must be one of #{validator.allowable_values}." - end - @awarded_cmmc_level = awarded_cmmc_level - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - operation == o.operation && - hq_organization_name == o.hq_organization_name && - duns == o.duns && - unique_entity_identifier == o.unique_entity_identifier && - cage_codes == o.cage_codes && - osc_name == o.osc_name && - scope == o.scope && - scope_description == o.scope_description && - awarded_cmmc_level == o.awarded_cmmc_level && - expiration_date == o.expiration_date && - certificate_id == o.certificate_id && - model_version == o.model_version && - ssps == o.ssps - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [operation, hq_organization_name, duns, unique_entity_identifier, cage_codes, osc_name, scope, scope_description, awarded_cmmc_level, expiration_date, certificate_id, model_version, ssps].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/cmmc_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/cmmc_response_get.rb deleted file mode 100644 index e118364..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/cmmc_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class CmmcResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CmmcResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CmmcResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/connectivity_ccsd.rb b/emass_client/ruby_client/lib/emass_client/models/connectivity_ccsd.rb deleted file mode 100644 index aa4c173..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/connectivity_ccsd.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ConnectivityCcsd - # [Read-Only] Identifier for specific connections to the system. - attr_accessor :ccsd_number - - # [Read-Only] Choose connection type for the system. - attr_accessor :connectivity - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ccsd_number' => :'ccsdNumber', - :'connectivity' => :'connectivity' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'ccsd_number' => :'Object', - :'connectivity' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ConnectivityCcsd` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ConnectivityCcsd`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'ccsd_number') - self.ccsd_number = attributes[:'ccsd_number'] - end - - if attributes.key?(:'connectivity') - self.connectivity = attributes[:'connectivity'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ccsd_number == o.ccsd_number && - connectivity == o.connectivity - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [ccsd_number, connectivity].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/controls_get.rb b/emass_client/ruby_client/lib/emass_client/models/controls_get.rb deleted file mode 100644 index 810c983..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/controls_get.rb +++ /dev/null @@ -1,663 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ControlsGet - # [Required] Unique system record identifier. - attr_accessor :system_id - - # [Read-only] Name of the system record. - attr_accessor :name - - # [Required] Acronym of the system record. - attr_accessor :acronym - - # [Read-only] Comma separated list of CCIs associated with the control. - attr_accessor :ccis - - # [Read-only] Indicates whether a control is inherited. - attr_accessor :is_inherited - - # [Read-only] List of overlays that affect the control. - attr_accessor :modified_by_overlays - - # [Read-only] Indicates the manner by which a control was included in the system’s categorization. - attr_accessor :included_status - - # [Read-only] Compliance of the control. - attr_accessor :compliance_status - - # [Required] Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000. - attr_accessor :responsible_entities - - # [Optional] Implementation Status of the Security Control for the information system. - attr_accessor :implementation_status - - # [Conditional] Indicate the type of Common Control Provider for an “Inherited” Security Control. - attr_accessor :common_control_provider - - # [Conditional] Provide justification for Security Controls deemed Not Applicable to the system. - attr_accessor :na_justification - - # [Required] Control designations - attr_accessor :control_designation - - # [Required] Field is required for Implementation Plan. - attr_accessor :estimated_completion_date - - # [Required] Includes security control comments. Character Limit = 2,000. - attr_accessor :implementation_narrative - - # [Conditional] Criticality of Security Control regarding SLCM. Character Limit = 2,000. - attr_accessor :slcm_criticality - - # [Conditional] SLCM frequency - attr_accessor :slcm_frequency - - # [Conditional] SLCM method utilized - attr_accessor :slcm_method - - # [Conditional] Method for reporting Security Control for SLCM. Character Limit = 2,000. - attr_accessor :slcm_reporting - - # [Conditional] How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000. - attr_accessor :slcm_tracking - - # [Conditional] Additional comments for Security Control regarding SLCM. Character Limit = 4,000. - attr_accessor :slcm_comments - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :severity - - # [Optional] Include vulnerability summary. Character Limit = 2,000. - attr_accessor :vulnerabilty_summary - - # [Optional] Include recommendations. Character Limit = 2,000. - attr_accessor :recommendations - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :relevance_of_threat - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :likelihood - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :impact - - # [Optional] Include description of Security Control’s impact. - attr_accessor :impact_description - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :residual_risk_level - - # [Optional] Identifies the assessment method / combination that will determine if the security requirements are implemented correctly. - attr_accessor :test_method - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'name' => :'name', - :'acronym' => :'acronym', - :'ccis' => :'ccis', - :'is_inherited' => :'isInherited', - :'modified_by_overlays' => :'modifiedByOverlays', - :'included_status' => :'includedStatus', - :'compliance_status' => :'complianceStatus', - :'responsible_entities' => :'responsibleEntities', - :'implementation_status' => :'implementationStatus', - :'common_control_provider' => :'commonControlProvider', - :'na_justification' => :'naJustification', - :'control_designation' => :'controlDesignation', - :'estimated_completion_date' => :'estimatedCompletionDate', - :'implementation_narrative' => :'implementationNarrative', - :'slcm_criticality' => :'slcmCriticality', - :'slcm_frequency' => :'slcmFrequency', - :'slcm_method' => :'slcmMethod', - :'slcm_reporting' => :'slcmReporting', - :'slcm_tracking' => :'slcmTracking', - :'slcm_comments' => :'slcmComments', - :'severity' => :'severity', - :'vulnerabilty_summary' => :'vulnerabiltySummary', - :'recommendations' => :'recommendations', - :'relevance_of_threat' => :'relevanceOfThreat', - :'likelihood' => :'likelihood', - :'impact' => :'impact', - :'impact_description' => :'impactDescription', - :'residual_risk_level' => :'residualRiskLevel', - :'test_method' => :'testMethod' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'name' => :'Object', - :'acronym' => :'Object', - :'ccis' => :'Object', - :'is_inherited' => :'Object', - :'modified_by_overlays' => :'Object', - :'included_status' => :'Object', - :'compliance_status' => :'Object', - :'responsible_entities' => :'Object', - :'implementation_status' => :'Object', - :'common_control_provider' => :'Object', - :'na_justification' => :'Object', - :'control_designation' => :'Object', - :'estimated_completion_date' => :'Object', - :'implementation_narrative' => :'Object', - :'slcm_criticality' => :'Object', - :'slcm_frequency' => :'Object', - :'slcm_method' => :'Object', - :'slcm_reporting' => :'Object', - :'slcm_tracking' => :'Object', - :'slcm_comments' => :'Object', - :'severity' => :'Object', - :'vulnerabilty_summary' => :'Object', - :'recommendations' => :'Object', - :'relevance_of_threat' => :'Object', - :'likelihood' => :'Object', - :'impact' => :'Object', - :'impact_description' => :'Object', - :'residual_risk_level' => :'Object', - :'test_method' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ControlsGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ControlsGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'acronym') - self.acronym = attributes[:'acronym'] - end - - if attributes.key?(:'ccis') - self.ccis = attributes[:'ccis'] - end - - if attributes.key?(:'is_inherited') - self.is_inherited = attributes[:'is_inherited'] - end - - if attributes.key?(:'modified_by_overlays') - self.modified_by_overlays = attributes[:'modified_by_overlays'] - end - - if attributes.key?(:'included_status') - self.included_status = attributes[:'included_status'] - end - - if attributes.key?(:'compliance_status') - self.compliance_status = attributes[:'compliance_status'] - end - - if attributes.key?(:'responsible_entities') - self.responsible_entities = attributes[:'responsible_entities'] - end - - if attributes.key?(:'implementation_status') - self.implementation_status = attributes[:'implementation_status'] - end - - if attributes.key?(:'common_control_provider') - self.common_control_provider = attributes[:'common_control_provider'] - end - - if attributes.key?(:'na_justification') - self.na_justification = attributes[:'na_justification'] - end - - if attributes.key?(:'control_designation') - self.control_designation = attributes[:'control_designation'] - end - - if attributes.key?(:'estimated_completion_date') - self.estimated_completion_date = attributes[:'estimated_completion_date'] - end - - if attributes.key?(:'implementation_narrative') - self.implementation_narrative = attributes[:'implementation_narrative'] - end - - if attributes.key?(:'slcm_criticality') - self.slcm_criticality = attributes[:'slcm_criticality'] - end - - if attributes.key?(:'slcm_frequency') - self.slcm_frequency = attributes[:'slcm_frequency'] - end - - if attributes.key?(:'slcm_method') - self.slcm_method = attributes[:'slcm_method'] - end - - if attributes.key?(:'slcm_reporting') - self.slcm_reporting = attributes[:'slcm_reporting'] - end - - if attributes.key?(:'slcm_tracking') - self.slcm_tracking = attributes[:'slcm_tracking'] - end - - if attributes.key?(:'slcm_comments') - self.slcm_comments = attributes[:'slcm_comments'] - end - - if attributes.key?(:'severity') - self.severity = attributes[:'severity'] - end - - if attributes.key?(:'vulnerabilty_summary') - self.vulnerabilty_summary = attributes[:'vulnerabilty_summary'] - end - - if attributes.key?(:'recommendations') - self.recommendations = attributes[:'recommendations'] - end - - if attributes.key?(:'relevance_of_threat') - self.relevance_of_threat = attributes[:'relevance_of_threat'] - end - - if attributes.key?(:'likelihood') - self.likelihood = attributes[:'likelihood'] - end - - if attributes.key?(:'impact') - self.impact = attributes[:'impact'] - end - - if attributes.key?(:'impact_description') - self.impact_description = attributes[:'impact_description'] - end - - if attributes.key?(:'residual_risk_level') - self.residual_risk_level = attributes[:'residual_risk_level'] - end - - if attributes.key?(:'test_method') - self.test_method = attributes[:'test_method'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - modified_by_overlays_validator = EnumAttributeValidator.new('Object', ['Privacy', 'Requirements', 'Concurrency']) - return false unless modified_by_overlays_validator.valid?(@modified_by_overlays) - implementation_status_validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited']) - return false unless implementation_status_validator.valid?(@implementation_status) - common_control_provider_validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave']) - return false unless common_control_provider_validator.valid?(@common_control_provider) - control_designation_validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid']) - return false unless control_designation_validator.valid?(@control_designation) - slcm_frequency_validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined']) - return false unless slcm_frequency_validator.valid?(@slcm_frequency) - slcm_method_validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined']) - return false unless slcm_method_validator.valid?(@slcm_method) - severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless severity_validator.valid?(@severity) - relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless relevance_of_threat_validator.valid?(@relevance_of_threat) - likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless likelihood_validator.valid?(@likelihood) - impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless impact_validator.valid?(@impact) - residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless residual_risk_level_validator.valid?(@residual_risk_level) - test_method_validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine']) - return false unless test_method_validator.valid?(@test_method) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] modified_by_overlays Object to be assigned - def modified_by_overlays=(modified_by_overlays) - validator = EnumAttributeValidator.new('Object', ['Privacy', 'Requirements', 'Concurrency']) - unless validator.valid?(modified_by_overlays) - fail ArgumentError, "invalid value for \"modified_by_overlays\", must be one of #{validator.allowable_values}." - end - @modified_by_overlays = modified_by_overlays - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] implementation_status Object to be assigned - def implementation_status=(implementation_status) - validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited']) - unless validator.valid?(implementation_status) - fail ArgumentError, "invalid value for \"implementation_status\", must be one of #{validator.allowable_values}." - end - @implementation_status = implementation_status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] common_control_provider Object to be assigned - def common_control_provider=(common_control_provider) - validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave']) - unless validator.valid?(common_control_provider) - fail ArgumentError, "invalid value for \"common_control_provider\", must be one of #{validator.allowable_values}." - end - @common_control_provider = common_control_provider - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] control_designation Object to be assigned - def control_designation=(control_designation) - validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid']) - unless validator.valid?(control_designation) - fail ArgumentError, "invalid value for \"control_designation\", must be one of #{validator.allowable_values}." - end - @control_designation = control_designation - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] slcm_frequency Object to be assigned - def slcm_frequency=(slcm_frequency) - validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined']) - unless validator.valid?(slcm_frequency) - fail ArgumentError, "invalid value for \"slcm_frequency\", must be one of #{validator.allowable_values}." - end - @slcm_frequency = slcm_frequency - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] slcm_method Object to be assigned - def slcm_method=(slcm_method) - validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined']) - unless validator.valid?(slcm_method) - fail ArgumentError, "invalid value for \"slcm_method\", must be one of #{validator.allowable_values}." - end - @slcm_method = slcm_method - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] severity Object to be assigned - def severity=(severity) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(severity) - fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." - end - @severity = severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] relevance_of_threat Object to be assigned - def relevance_of_threat=(relevance_of_threat) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(relevance_of_threat) - fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}." - end - @relevance_of_threat = relevance_of_threat - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] likelihood Object to be assigned - def likelihood=(likelihood) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(likelihood) - fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}." - end - @likelihood = likelihood - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] impact Object to be assigned - def impact=(impact) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(impact) - fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}." - end - @impact = impact - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] residual_risk_level Object to be assigned - def residual_risk_level=(residual_risk_level) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(residual_risk_level) - fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}." - end - @residual_risk_level = residual_risk_level - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] test_method Object to be assigned - def test_method=(test_method) - validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine']) - unless validator.valid?(test_method) - fail ArgumentError, "invalid value for \"test_method\", must be one of #{validator.allowable_values}." - end - @test_method = test_method - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - name == o.name && - acronym == o.acronym && - ccis == o.ccis && - is_inherited == o.is_inherited && - modified_by_overlays == o.modified_by_overlays && - included_status == o.included_status && - compliance_status == o.compliance_status && - responsible_entities == o.responsible_entities && - implementation_status == o.implementation_status && - common_control_provider == o.common_control_provider && - na_justification == o.na_justification && - control_designation == o.control_designation && - estimated_completion_date == o.estimated_completion_date && - implementation_narrative == o.implementation_narrative && - slcm_criticality == o.slcm_criticality && - slcm_frequency == o.slcm_frequency && - slcm_method == o.slcm_method && - slcm_reporting == o.slcm_reporting && - slcm_tracking == o.slcm_tracking && - slcm_comments == o.slcm_comments && - severity == o.severity && - vulnerabilty_summary == o.vulnerabilty_summary && - recommendations == o.recommendations && - relevance_of_threat == o.relevance_of_threat && - likelihood == o.likelihood && - impact == o.impact && - impact_description == o.impact_description && - residual_risk_level == o.residual_risk_level && - test_method == o.test_method - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, name, acronym, ccis, is_inherited, modified_by_overlays, included_status, compliance_status, responsible_entities, implementation_status, common_control_provider, na_justification, control_designation, estimated_completion_date, implementation_narrative, slcm_criticality, slcm_frequency, slcm_method, slcm_reporting, slcm_tracking, slcm_comments, severity, vulnerabilty_summary, recommendations, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level, test_method].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/controls_put.rb b/emass_client/ruby_client/lib/emass_client/models/controls_put.rb deleted file mode 100644 index 13eee64..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/controls_put.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ControlsPut - # Acronym of the system record. - attr_accessor :acronym - - # Indicates if operations result (success/fail) - attr_accessor :success - - # The system identifier for the system being updated. - attr_accessor :system_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'acronym' => :'acronym', - :'success' => :'success', - :'system_id' => :'systemId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'acronym' => :'Object', - :'success' => :'Object', - :'system_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ControlsPut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ControlsPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'acronym') - self.acronym = attributes[:'acronym'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - acronym == o.acronym && - success == o.success && - system_id == o.system_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [acronym, success, system_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/controls_request_put_body.rb b/emass_client/ruby_client/lib/emass_client/models/controls_request_put_body.rb deleted file mode 100644 index 60b9bb1..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/controls_request_put_body.rb +++ /dev/null @@ -1,606 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ControlsRequestPutBody - # [Required] Required to match the NIST SP 800-53 Revision 4. - attr_accessor :acronym - - # [Required] Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000. - attr_accessor :responsible_entities - - # [Optional] Implementation Status of the Security Control for the information system. - attr_accessor :implementation_status - - # [Conditional] Indicate the type of Common Control Provider for an “Inherited” Security Control. - attr_accessor :common_control_provider - - # [Conditional] Provide justification for Security Controls deemed Not Applicable to the system. - attr_accessor :na_justification - - # [Required] Control designations - attr_accessor :control_designation - - # [Optional] Identifies the assessment method / combination that will determine if the security requirements are implemented correctly. - attr_accessor :test_method - - # [Required] Field is required for Implementation Plan. - attr_accessor :estimated_completion_date - - # [Required] Includes security control comments. Character Limit = 2,000. - attr_accessor :implementation_narrative - - # [Conditional] Criticality of Security Control regarding SLCM. Character Limit = 2,000. - attr_accessor :slcm_criticality - - # [Conditional] SLCM frequency - attr_accessor :slcm_frequency - - # [Conditional] SLCM method utilized - attr_accessor :slcm_method - - # [Conditional] Method for reporting Security Control for SLCM. Character Limit = 2,000. - attr_accessor :slcm_reporting - - # [Conditional] How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000. - attr_accessor :slcm_tracking - - # [Conditional] Additional comments for Security Control regarding SLCM. Character Limit = 4,000. - attr_accessor :slcm_comments - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :severity - - # [Optional] Include vulnerability summary. Character Limit = 2,000. - attr_accessor :vulnerabilty_summary - - # [Optional] Include recommendations. Character Limit = 2,000. - attr_accessor :recommendations - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :relevance_of_threat - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :likelihood - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :impact - - # [Optional] Include description of Security Control's impact. - attr_accessor :impact_description - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :residual_risk_level - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'acronym' => :'acronym', - :'responsible_entities' => :'responsibleEntities', - :'implementation_status' => :'implementationStatus', - :'common_control_provider' => :'commonControlProvider', - :'na_justification' => :'naJustification', - :'control_designation' => :'controlDesignation', - :'test_method' => :'testMethod', - :'estimated_completion_date' => :'estimatedCompletionDate', - :'implementation_narrative' => :'implementationNarrative', - :'slcm_criticality' => :'slcmCriticality', - :'slcm_frequency' => :'slcmFrequency', - :'slcm_method' => :'slcmMethod', - :'slcm_reporting' => :'slcmReporting', - :'slcm_tracking' => :'slcmTracking', - :'slcm_comments' => :'slcmComments', - :'severity' => :'severity', - :'vulnerabilty_summary' => :'vulnerabiltySummary', - :'recommendations' => :'recommendations', - :'relevance_of_threat' => :'relevanceOfThreat', - :'likelihood' => :'likelihood', - :'impact' => :'impact', - :'impact_description' => :'impactDescription', - :'residual_risk_level' => :'residualRiskLevel' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'acronym' => :'Object', - :'responsible_entities' => :'Object', - :'implementation_status' => :'Object', - :'common_control_provider' => :'Object', - :'na_justification' => :'Object', - :'control_designation' => :'Object', - :'test_method' => :'Object', - :'estimated_completion_date' => :'Object', - :'implementation_narrative' => :'Object', - :'slcm_criticality' => :'Object', - :'slcm_frequency' => :'Object', - :'slcm_method' => :'Object', - :'slcm_reporting' => :'Object', - :'slcm_tracking' => :'Object', - :'slcm_comments' => :'Object', - :'severity' => :'Object', - :'vulnerabilty_summary' => :'Object', - :'recommendations' => :'Object', - :'relevance_of_threat' => :'Object', - :'likelihood' => :'Object', - :'impact' => :'Object', - :'impact_description' => :'Object', - :'residual_risk_level' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ControlsRequestPutBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ControlsRequestPutBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'acronym') - self.acronym = attributes[:'acronym'] - end - - if attributes.key?(:'responsible_entities') - self.responsible_entities = attributes[:'responsible_entities'] - end - - if attributes.key?(:'implementation_status') - self.implementation_status = attributes[:'implementation_status'] - end - - if attributes.key?(:'common_control_provider') - self.common_control_provider = attributes[:'common_control_provider'] - end - - if attributes.key?(:'na_justification') - self.na_justification = attributes[:'na_justification'] - end - - if attributes.key?(:'control_designation') - self.control_designation = attributes[:'control_designation'] - end - - if attributes.key?(:'test_method') - self.test_method = attributes[:'test_method'] - end - - if attributes.key?(:'estimated_completion_date') - self.estimated_completion_date = attributes[:'estimated_completion_date'] - end - - if attributes.key?(:'implementation_narrative') - self.implementation_narrative = attributes[:'implementation_narrative'] - end - - if attributes.key?(:'slcm_criticality') - self.slcm_criticality = attributes[:'slcm_criticality'] - end - - if attributes.key?(:'slcm_frequency') - self.slcm_frequency = attributes[:'slcm_frequency'] - end - - if attributes.key?(:'slcm_method') - self.slcm_method = attributes[:'slcm_method'] - end - - if attributes.key?(:'slcm_reporting') - self.slcm_reporting = attributes[:'slcm_reporting'] - end - - if attributes.key?(:'slcm_tracking') - self.slcm_tracking = attributes[:'slcm_tracking'] - end - - if attributes.key?(:'slcm_comments') - self.slcm_comments = attributes[:'slcm_comments'] - end - - if attributes.key?(:'severity') - self.severity = attributes[:'severity'] - end - - if attributes.key?(:'vulnerabilty_summary') - self.vulnerabilty_summary = attributes[:'vulnerabilty_summary'] - end - - if attributes.key?(:'recommendations') - self.recommendations = attributes[:'recommendations'] - end - - if attributes.key?(:'relevance_of_threat') - self.relevance_of_threat = attributes[:'relevance_of_threat'] - end - - if attributes.key?(:'likelihood') - self.likelihood = attributes[:'likelihood'] - end - - if attributes.key?(:'impact') - self.impact = attributes[:'impact'] - end - - if attributes.key?(:'impact_description') - self.impact_description = attributes[:'impact_description'] - end - - if attributes.key?(:'residual_risk_level') - self.residual_risk_level = attributes[:'residual_risk_level'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @acronym.nil? - invalid_properties.push('invalid value for "acronym", acronym cannot be nil.') - end - - if @responsible_entities.nil? - invalid_properties.push('invalid value for "responsible_entities", responsible_entities cannot be nil.') - end - - if @control_designation.nil? - invalid_properties.push('invalid value for "control_designation", control_designation cannot be nil.') - end - - if @estimated_completion_date.nil? - invalid_properties.push('invalid value for "estimated_completion_date", estimated_completion_date cannot be nil.') - end - - if @implementation_narrative.nil? - invalid_properties.push('invalid value for "implementation_narrative", implementation_narrative cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @acronym.nil? - return false if @responsible_entities.nil? - implementation_status_validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited']) - return false unless implementation_status_validator.valid?(@implementation_status) - common_control_provider_validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave']) - return false unless common_control_provider_validator.valid?(@common_control_provider) - return false if @control_designation.nil? - control_designation_validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid']) - return false unless control_designation_validator.valid?(@control_designation) - test_method_validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine']) - return false unless test_method_validator.valid?(@test_method) - return false if @estimated_completion_date.nil? - return false if @implementation_narrative.nil? - slcm_frequency_validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined']) - return false unless slcm_frequency_validator.valid?(@slcm_frequency) - slcm_method_validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined']) - return false unless slcm_method_validator.valid?(@slcm_method) - severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless severity_validator.valid?(@severity) - relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless relevance_of_threat_validator.valid?(@relevance_of_threat) - likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless likelihood_validator.valid?(@likelihood) - impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless impact_validator.valid?(@impact) - residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless residual_risk_level_validator.valid?(@residual_risk_level) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] implementation_status Object to be assigned - def implementation_status=(implementation_status) - validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited']) - unless validator.valid?(implementation_status) - fail ArgumentError, "invalid value for \"implementation_status\", must be one of #{validator.allowable_values}." - end - @implementation_status = implementation_status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] common_control_provider Object to be assigned - def common_control_provider=(common_control_provider) - validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave']) - unless validator.valid?(common_control_provider) - fail ArgumentError, "invalid value for \"common_control_provider\", must be one of #{validator.allowable_values}." - end - @common_control_provider = common_control_provider - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] control_designation Object to be assigned - def control_designation=(control_designation) - validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid']) - unless validator.valid?(control_designation) - fail ArgumentError, "invalid value for \"control_designation\", must be one of #{validator.allowable_values}." - end - @control_designation = control_designation - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] test_method Object to be assigned - def test_method=(test_method) - validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine']) - unless validator.valid?(test_method) - fail ArgumentError, "invalid value for \"test_method\", must be one of #{validator.allowable_values}." - end - @test_method = test_method - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] slcm_frequency Object to be assigned - def slcm_frequency=(slcm_frequency) - validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined']) - unless validator.valid?(slcm_frequency) - fail ArgumentError, "invalid value for \"slcm_frequency\", must be one of #{validator.allowable_values}." - end - @slcm_frequency = slcm_frequency - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] slcm_method Object to be assigned - def slcm_method=(slcm_method) - validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined']) - unless validator.valid?(slcm_method) - fail ArgumentError, "invalid value for \"slcm_method\", must be one of #{validator.allowable_values}." - end - @slcm_method = slcm_method - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] severity Object to be assigned - def severity=(severity) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(severity) - fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." - end - @severity = severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] relevance_of_threat Object to be assigned - def relevance_of_threat=(relevance_of_threat) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(relevance_of_threat) - fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}." - end - @relevance_of_threat = relevance_of_threat - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] likelihood Object to be assigned - def likelihood=(likelihood) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(likelihood) - fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}." - end - @likelihood = likelihood - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] impact Object to be assigned - def impact=(impact) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(impact) - fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}." - end - @impact = impact - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] residual_risk_level Object to be assigned - def residual_risk_level=(residual_risk_level) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(residual_risk_level) - fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}." - end - @residual_risk_level = residual_risk_level - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - acronym == o.acronym && - responsible_entities == o.responsible_entities && - implementation_status == o.implementation_status && - common_control_provider == o.common_control_provider && - na_justification == o.na_justification && - control_designation == o.control_designation && - test_method == o.test_method && - estimated_completion_date == o.estimated_completion_date && - implementation_narrative == o.implementation_narrative && - slcm_criticality == o.slcm_criticality && - slcm_frequency == o.slcm_frequency && - slcm_method == o.slcm_method && - slcm_reporting == o.slcm_reporting && - slcm_tracking == o.slcm_tracking && - slcm_comments == o.slcm_comments && - severity == o.severity && - vulnerabilty_summary == o.vulnerabilty_summary && - recommendations == o.recommendations && - relevance_of_threat == o.relevance_of_threat && - likelihood == o.likelihood && - impact == o.impact && - impact_description == o.impact_description && - residual_risk_level == o.residual_risk_level - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [acronym, responsible_entities, implementation_status, common_control_provider, na_justification, control_designation, test_method, estimated_completion_date, implementation_narrative, slcm_criticality, slcm_frequency, slcm_method, slcm_reporting, slcm_tracking, slcm_comments, severity, vulnerabilty_summary, recommendations, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/controls_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/controls_response_get.rb deleted file mode 100644 index 0240772..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/controls_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ControlsResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ControlsResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ControlsResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/controls_response_put.rb b/emass_client/ruby_client/lib/emass_client/models/controls_response_put.rb deleted file mode 100644 index e59c5d7..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/controls_response_put.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class ControlsResponsePut - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ControlsResponsePut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ControlsResponsePut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/definition_transitions.rb b/emass_client/ruby_client/lib/emass_client/models/definition_transitions.rb deleted file mode 100644 index e0d3a6a..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/definition_transitions.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class DefinitionTransitions - # [Read-Only] The landing stage that is active after performing a transition. - attr_accessor :end_stage - - # [Read-Only] Description of the workflow or the stage transition. For stage transitions, this matches the action dropdown that appears for PAC users. - attr_accessor :description - - attr_accessor :roles - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'end_stage' => :'endStage', - :'description' => :'description', - :'roles' => :'roles' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'end_stage' => :'Object', - :'description' => :'Object', - :'roles' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::DefinitionTransitions` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::DefinitionTransitions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'end_stage') - self.end_stage = attributes[:'end_stage'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'roles') - if (value = attributes[:'roles']).is_a?(Array) - self.roles = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - end_stage_validator = EnumAttributeValidator.new('Object', ['Categorize System', 'Submit Categorization', 'Cancelled', 'Cancel', 'Complete']) - return false unless end_stage_validator.valid?(@end_stage) - description_validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Disapprove and Move Forward', 'Cancel', 'Deny']) - return false unless description_validator.valid?(@description) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] end_stage Object to be assigned - def end_stage=(end_stage) - validator = EnumAttributeValidator.new('Object', ['Categorize System', 'Submit Categorization', 'Cancelled', 'Cancel', 'Complete']) - unless validator.valid?(end_stage) - fail ArgumentError, "invalid value for \"end_stage\", must be one of #{validator.allowable_values}." - end - @end_stage = end_stage - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] description Object to be assigned - def description=(description) - validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Disapprove and Move Forward', 'Cancel', 'Deny']) - unless validator.valid?(description) - fail ArgumentError, "invalid value for \"description\", must be one of #{validator.allowable_values}." - end - @description = description - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - end_stage == o.end_stage && - description == o.description && - roles == o.roles - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [end_stage, description, roles].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/delete_milestone.rb b/emass_client/ruby_client/lib/emass_client/models/delete_milestone.rb deleted file mode 100644 index 3fef40d..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/delete_milestone.rb +++ /dev/null @@ -1,212 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class DeleteMilestone - # [Required] Unique item identifier - attr_accessor :milestone_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'milestone_id' => :'milestoneId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'milestone_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::DeleteMilestone` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::DeleteMilestone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'milestone_id') - self.milestone_id = attributes[:'milestone_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @milestone_id.nil? - invalid_properties.push('invalid value for "milestone_id", milestone_id cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @milestone_id.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - milestone_id == o.milestone_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [milestone_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/delete_poam.rb b/emass_client/ruby_client/lib/emass_client/models/delete_poam.rb deleted file mode 100644 index f73b39c..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/delete_poam.rb +++ /dev/null @@ -1,212 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class DeletePoam - # [Required] Unique item identifier - attr_accessor :poam_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'poam_id' => :'poamId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'poam_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::DeletePoam` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::DeletePoam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @poam_id.nil? - invalid_properties.push('invalid value for "poam_id", poam_id cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @poam_id.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - poam_id == o.poam_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [poam_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/empty200_response.rb b/emass_client/ruby_client/lib/emass_client/models/empty200_response.rb deleted file mode 100644 index 9cedd87..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/empty200_response.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Empty200Response - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Empty200Response` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Empty200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/error.rb b/emass_client/ruby_client/lib/emass_client/models/error.rb deleted file mode 100644 index c4b7463..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/error.rb +++ /dev/null @@ -1,225 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Error - attr_accessor :code - - attr_accessor :message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Error` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @code.nil? - invalid_properties.push('invalid value for "code", code cannot be nil.') - end - - if @message.nil? - invalid_properties.push('invalid value for "message", message cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @code.nil? - return false if @message.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/instances_transitions.rb b/emass_client/ruby_client/lib/emass_client/models/instances_transitions.rb deleted file mode 100644 index 09ca03d..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/instances_transitions.rb +++ /dev/null @@ -1,327 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class InstancesTransitions - # [Read-Only] Comments entered by the user when performing the transition. - attr_accessor :comments - - # [Read-Only] User that performed the workflow transition. - attr_accessor :created_by - - # [Read-Only] Date the workflow instance or the workflow transition was created. - attr_accessor :created_date - - # [Read-Only] Description of the stage transition. This matches the action dropdown that appears for PAC users. - attr_accessor :description - - # [Read-Only] The landing stage that is active after performing a transition. - attr_accessor :end_stage - - # [Read-Only] The beginning stage that is active before performing a transition. - attr_accessor :start_stage - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'comments' => :'comments', - :'created_by' => :'createdBy', - :'created_date' => :'createdDate', - :'description' => :'description', - :'end_stage' => :'endStage', - :'start_stage' => :'startStage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'comments' => :'Object', - :'created_by' => :'Object', - :'created_date' => :'Object', - :'description' => :'Object', - :'end_stage' => :'Object', - :'start_stage' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::InstancesTransitions` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::InstancesTransitions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'created_date') - self.created_date = attributes[:'created_date'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'end_stage') - self.end_stage = attributes[:'end_stage'] - end - - if attributes.key?(:'start_stage') - self.start_stage = attributes[:'start_stage'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - comments_validator = EnumAttributeValidator.new('Object', ['Approved the categorization', 'Submitted the categorization', 'Categorized the system as HMM', 'Selected POA&M Items']) - return false unless comments_validator.valid?(@comments) - description_validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Submit New Package', 'Disapprove and Move Forward', 'Cancel', 'Deny']) - return false unless description_validator.valid?(@description) - end_stage_validator = EnumAttributeValidator.new('Object', ['PM/ISO', 'Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Complete']) - return false unless end_stage_validator.valid?(@end_stage) - start_stage_validator = EnumAttributeValidator.new('Object', ['Not Started', 'PM/ISO', 'Categorize System', 'Submit Categorization', 'Approval', 'Deny']) - return false unless start_stage_validator.valid?(@start_stage) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] comments Object to be assigned - def comments=(comments) - validator = EnumAttributeValidator.new('Object', ['Approved the categorization', 'Submitted the categorization', 'Categorized the system as HMM', 'Selected POA&M Items']) - unless validator.valid?(comments) - fail ArgumentError, "invalid value for \"comments\", must be one of #{validator.allowable_values}." - end - @comments = comments - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] description Object to be assigned - def description=(description) - validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Submit New Package', 'Disapprove and Move Forward', 'Cancel', 'Deny']) - unless validator.valid?(description) - fail ArgumentError, "invalid value for \"description\", must be one of #{validator.allowable_values}." - end - @description = description - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] end_stage Object to be assigned - def end_stage=(end_stage) - validator = EnumAttributeValidator.new('Object', ['PM/ISO', 'Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Complete']) - unless validator.valid?(end_stage) - fail ArgumentError, "invalid value for \"end_stage\", must be one of #{validator.allowable_values}." - end - @end_stage = end_stage - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] start_stage Object to be assigned - def start_stage=(start_stage) - validator = EnumAttributeValidator.new('Object', ['Not Started', 'PM/ISO', 'Categorize System', 'Submit Categorization', 'Approval', 'Deny']) - unless validator.valid?(start_stage) - fail ArgumentError, "invalid value for \"start_stage\", must be one of #{validator.allowable_values}." - end - @start_stage = start_stage - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - comments == o.comments && - created_by == o.created_by && - created_date == o.created_date && - description == o.description && - end_stage == o.end_stage && - start_stage == o.start_stage - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [comments, created_by, created_date, description, end_stage, start_stage].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestone_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/milestone_response_get.rb deleted file mode 100644 index b70a427..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestone_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestoneResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestoneResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestoneResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestone_response_post.rb b/emass_client/ruby_client/lib/emass_client/models/milestone_response_post.rb deleted file mode 100644 index dbdb9dc..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestone_response_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestoneResponsePost - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestoneResponsePost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestoneResponsePost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestone_response_put.rb b/emass_client/ruby_client/lib/emass_client/models/milestone_response_put.rb deleted file mode 100644 index 182c147..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestone_response_put.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestoneResponsePut - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestoneResponsePut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestoneResponsePut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_delete.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_delete.rb deleted file mode 100644 index 69d2338..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_delete.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesDelete - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesDelete` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_get.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_get.rb deleted file mode 100644 index 9599cb4..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_get.rb +++ /dev/null @@ -1,291 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesGet - # [Required] Unique eMASS system identifier. - attr_accessor :system_id - - # [Required] Unique item identifier - attr_accessor :milestone_id - - # [Required] Unique item identifier - attr_accessor :poam_id - - # [Required] Include milestone description. - attr_accessor :description - - # [Required] Required for ongoing and completed POA&M items. Unix time format. - attr_accessor :scheduled_completion_date - - # [Read-Only] Values include the following options: (Not Approved,Under Review,Approved) - attr_accessor :review_status - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'milestone_id' => :'milestoneId', - :'poam_id' => :'poamId', - :'description' => :'description', - :'scheduled_completion_date' => :'scheduledCompletionDate', - :'review_status' => :'reviewStatus' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'milestone_id' => :'Object', - :'poam_id' => :'Object', - :'description' => :'Object', - :'scheduled_completion_date' => :'Object', - :'review_status' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'milestone_id') - self.milestone_id = attributes[:'milestone_id'] - end - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - - if attributes.key?(:'review_status') - self.review_status = attributes[:'review_status'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - review_status_validator = EnumAttributeValidator.new('Object', ['Not Approved', 'Under Review', 'Approved']) - return false unless review_status_validator.valid?(@review_status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] review_status Object to be assigned - def review_status=(review_status) - validator = EnumAttributeValidator.new('Object', ['Not Approved', 'Under Review', 'Approved']) - unless validator.valid?(review_status) - fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}." - end - @review_status = review_status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - milestone_id == o.milestone_id && - poam_id == o.poam_id && - description == o.description && - scheduled_completion_date == o.scheduled_completion_date && - review_status == o.review_status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, milestone_id, poam_id, description, scheduled_completion_date, review_status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_post.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_post.rb deleted file mode 100644 index ccff19f..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_post.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesPost - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_put.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_put.rb deleted file mode 100644 index 18081d0..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_put.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesPut - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesPut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_put_post_delete.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_put_post_delete.rb deleted file mode 100644 index 4795994..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_put_post_delete.rb +++ /dev/null @@ -1,247 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesPutPostDelete - # The system identifier that the POAM was added. - attr_accessor :system_id - - # The newly created POAM identifier - attr_accessor :poam_id - - # The Milestone unique item identifier - attr_accessor :milestone_id - - # The unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. - attr_accessor :external_uid - - # Indicates if operations result (success/fail) - attr_accessor :success - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'poam_id' => :'poamId', - :'milestone_id' => :'milestoneId', - :'external_uid' => :'externalUid', - :'success' => :'success' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'poam_id' => :'Object', - :'milestone_id' => :'Object', - :'external_uid' => :'Object', - :'success' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesPutPostDelete` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesPutPostDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - - if attributes.key?(:'milestone_id') - self.milestone_id = attributes[:'milestone_id'] - end - - if attributes.key?(:'external_uid') - self.external_uid = attributes[:'external_uid'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - poam_id == o.poam_id && - milestone_id == o.milestone_id && - external_uid == o.external_uid && - success == o.success - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, poam_id, milestone_id, external_uid, success].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_request_post_body.rb deleted file mode 100644 index 6d22991..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_request_post_body.rb +++ /dev/null @@ -1,242 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesRequestPostBody - # [Required] Unique POA&M item identifier. - attr_accessor :poam_id - - # [Required] Provide a description of the milestone. - attr_accessor :description - - # [Required] Unix date format. - attr_accessor :scheduled_completion_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'poam_id' => :'poamId', - :'description' => :'description', - :'scheduled_completion_date' => :'scheduledCompletionDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'poam_id' => :'Object', - :'description' => :'Object', - :'scheduled_completion_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @poam_id.nil? - invalid_properties.push('invalid value for "poam_id", poam_id cannot be nil.') - end - - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @scheduled_completion_date.nil? - invalid_properties.push('invalid value for "scheduled_completion_date", scheduled_completion_date cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @poam_id.nil? - return false if @description.nil? - return false if @scheduled_completion_date.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - poam_id == o.poam_id && - description == o.description && - scheduled_completion_date == o.scheduled_completion_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [poam_id, description, scheduled_completion_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_request_put_body.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_request_put_body.rb deleted file mode 100644 index 97c6563..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_request_put_body.rb +++ /dev/null @@ -1,242 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesRequestPutBody - # [Required] Unique milestone identifier. - attr_accessor :milestone_id - - # [Required] Provide a description of the milestone. - attr_accessor :description - - # [Required] Unix date format. - attr_accessor :scheduled_completion_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'milestone_id' => :'milestoneId', - :'description' => :'description', - :'scheduled_completion_date' => :'scheduledCompletionDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'milestone_id' => :'Object', - :'description' => :'Object', - :'scheduled_completion_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesRequestPutBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesRequestPutBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'milestone_id') - self.milestone_id = attributes[:'milestone_id'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @milestone_id.nil? - invalid_properties.push('invalid value for "milestone_id", milestone_id cannot be nil.') - end - - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @scheduled_completion_date.nil? - invalid_properties.push('invalid value for "scheduled_completion_date", scheduled_completion_date cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @milestone_id.nil? - return false if @description.nil? - return false if @scheduled_completion_date.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - milestone_id == o.milestone_id && - description == o.description && - scheduled_completion_date == o.scheduled_completion_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [milestone_id, description, scheduled_completion_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_required_post.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_required_post.rb deleted file mode 100644 index 0ddeb6d..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_required_post.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesRequiredPost - # [Required] Include milestone description. - attr_accessor :description - - # [Required] Required for ongoing and completed POA&M items. Unix time format. - attr_accessor :scheduled_completion_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'description' => :'description', - :'scheduled_completion_date' => :'scheduledCompletionDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'description' => :'Object', - :'scheduled_completion_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesRequiredPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesRequiredPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @scheduled_completion_date.nil? - invalid_properties.push('invalid value for "scheduled_completion_date", scheduled_completion_date cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @description.nil? - return false if @scheduled_completion_date.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - scheduled_completion_date == o.scheduled_completion_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [description, scheduled_completion_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/milestones_required_put.rb b/emass_client/ruby_client/lib/emass_client/models/milestones_required_put.rb deleted file mode 100644 index aad7ad6..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/milestones_required_put.rb +++ /dev/null @@ -1,242 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class MilestonesRequiredPut - # [Required] Unique item identifier - attr_accessor :milestone_id - - # [Required] Include milestone description. - attr_accessor :description - - # [Required] Shecdule completion date. Unix time format. - attr_accessor :scheduled_completion_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'milestone_id' => :'milestoneId', - :'description' => :'description', - :'scheduled_completion_date' => :'scheduledCompletionDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'milestone_id' => :'Object', - :'description' => :'Object', - :'scheduled_completion_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesRequiredPut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesRequiredPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'milestone_id') - self.milestone_id = attributes[:'milestone_id'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @milestone_id.nil? - invalid_properties.push('invalid value for "milestone_id", milestone_id cannot be nil.') - end - - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @scheduled_completion_date.nil? - invalid_properties.push('invalid value for "scheduled_completion_date", scheduled_completion_date cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @milestone_id.nil? - return false if @description.nil? - return false if @scheduled_completion_date.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - milestone_id == o.milestone_id && - description == o.description && - scheduled_completion_date == o.scheduled_completion_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [milestone_id, description, scheduled_completion_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_200.rb b/emass_client/ruby_client/lib/emass_client/models/model_200.rb deleted file mode 100644 index 051e525..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_200.rb +++ /dev/null @@ -1,208 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model200 - attr_accessor :code - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model200` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model200`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 200 - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_201.rb b/emass_client/ruby_client/lib/emass_client/models/model_201.rb deleted file mode 100644 index 498e68a..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_201.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model201 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model201` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model201`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_201_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_201_meta.rb deleted file mode 100644 index 94a2beb..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_201_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model201Meta - attr_accessor :code - - attr_accessor :message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'message' => :'message' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model201Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model201Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 201 - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - else - self.message = 'Request was fulfilled and resulted in on or more new resources being successfully created on the server.' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - message == o.message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_400.rb b/emass_client/ruby_client/lib/emass_client/models/model_400.rb deleted file mode 100644 index c3e92aa..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_400.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model400 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model400` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model400`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_400_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_400_meta.rb deleted file mode 100644 index 3878136..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_400_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model400Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model400Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model400Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 400 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request could not be understood by the server due to incorrect syntax or an unexpected format' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_400_response.rb b/emass_client/ruby_client/lib/emass_client/models/model_400_response.rb deleted file mode 100644 index d611f08..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_400_response.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model400Response - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model400Response` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model400Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_401.rb b/emass_client/ruby_client/lib/emass_client/models/model_401.rb deleted file mode 100644 index 3d50245..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_401.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model401 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model401` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model401`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_401_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_401_meta.rb deleted file mode 100644 index e66e378..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_401_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model401Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model401Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model401Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 401 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request has failed to provide suitable authentication from the client' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_403.rb b/emass_client/ruby_client/lib/emass_client/models/model_403.rb deleted file mode 100644 index f078183..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_403.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model403 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model403` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model403`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_403_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_403_meta.rb deleted file mode 100644 index 0c930f9..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_403_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model403Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model403Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model403Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 403 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request was blocked by the application due to a lack of client permissions to the API or to a specific endpoint' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_404.rb b/emass_client/ruby_client/lib/emass_client/models/model_404.rb deleted file mode 100644 index 098cd13..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_404.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model404 - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model404` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model404`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 404 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request has failed because the URL provided in the request did not match any available endpoint locations' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_404_response.rb b/emass_client/ruby_client/lib/emass_client/models/model_404_response.rb deleted file mode 100644 index 8c8b7b4..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_404_response.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model404Response - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model404Response` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model404Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_405.rb b/emass_client/ruby_client/lib/emass_client/models/model_405.rb deleted file mode 100644 index e52fed8..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_405.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model405 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model405` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model405`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_405_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_405_meta.rb deleted file mode 100644 index ec32f82..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_405_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model405Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model405Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model405Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 405 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request was made with a verb (GET, POST, etc.) that is not permitted for the endpoint' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_411.rb b/emass_client/ruby_client/lib/emass_client/models/model_411.rb deleted file mode 100644 index ab015ef..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_411.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model411 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model411` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model411`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_411_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_411_meta.rb deleted file mode 100644 index 5c56e1a..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_411_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model411Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model411Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model411Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 411 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request was of type POST and failed to provide the server information about the data/content length being submitted' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_490.rb b/emass_client/ruby_client/lib/emass_client/models/model_490.rb deleted file mode 100644 index 3aea005..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_490.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model490 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model490` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model490`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_490_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_490_meta.rb deleted file mode 100644 index 8940698..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_490_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model490Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model490Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model490Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 490 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Request has failed because too much data was requested in a single batch. This error is specific to eMASS' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_500.rb b/emass_client/ruby_client/lib/emass_client/models/model_500.rb deleted file mode 100644 index d337f06..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_500.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model500 - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model500` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model500`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/model_500_meta.rb b/emass_client/ruby_client/lib/emass_client/models/model_500_meta.rb deleted file mode 100644 index a73d5e1..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/model_500_meta.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Model500Meta - attr_accessor :code - - attr_accessor :error_message - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'code' => :'code', - :'error_message' => :'errorMessage' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'code' => :'Object', - :'error_message' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Model500Meta` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Model500Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'code') - self.code = attributes[:'code'] - else - self.code = 500 - end - - if attributes.key?(:'error_message') - self.error_message = attributes[:'error_message'] - else - self.error_message = 'Server encountered an unexpected condition which prevented it from fulfilling the request' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - code == o.code && - error_message == o.error_message - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [code, error_message].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/pac_get.rb b/emass_client/ruby_client/lib/emass_client/models/pac_get.rb deleted file mode 100644 index 31ba975..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/pac_get.rb +++ /dev/null @@ -1,311 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PacGet - # [Required] Unique eMASS system identifier. - attr_accessor :system_id - - # [Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval) - attr_accessor :workflow - - # [Required] Package name. 100 Characters. - attr_accessor :name - - # [Read-Only] Name of the current stage in the active workflow. - attr_accessor :current_stage_name - - # [Read-Only] Number of the current stage in the active workflow. - attr_accessor :current_stage - - # [Read-Only] Total number of stages in the active workflow. - attr_accessor :total_stages - - # [Read-Only] Indicates the number of days at current workflow stage. - attr_accessor :days_at_current_stage - - # [Required] Comments related to package approval chain. Character Limit = 4,000. - attr_accessor :comments - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'workflow' => :'workflow', - :'name' => :'name', - :'current_stage_name' => :'currentStageName', - :'current_stage' => :'currentStage', - :'total_stages' => :'totalStages', - :'days_at_current_stage' => :'daysAtCurrentStage', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'workflow' => :'Object', - :'name' => :'Object', - :'current_stage_name' => :'Object', - :'current_stage' => :'Object', - :'total_stages' => :'Object', - :'days_at_current_stage' => :'Object', - :'comments' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PacGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PacGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'workflow') - self.workflow = attributes[:'workflow'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'current_stage_name') - self.current_stage_name = attributes[:'current_stage_name'] - end - - if attributes.key?(:'current_stage') - self.current_stage = attributes[:'current_stage'] - end - - if attributes.key?(:'total_stages') - self.total_stages = attributes[:'total_stages'] - end - - if attributes.key?(:'days_at_current_stage') - self.days_at_current_stage = attributes[:'days_at_current_stage'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - workflow_validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval']) - return false unless workflow_validator.valid?(@workflow) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] workflow Object to be assigned - def workflow=(workflow) - validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval']) - unless validator.valid?(workflow) - fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}." - end - @workflow = workflow - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - workflow == o.workflow && - name == o.name && - current_stage_name == o.current_stage_name && - current_stage == o.current_stage && - total_stages == o.total_stages && - days_at_current_stage == o.days_at_current_stage && - comments == o.comments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, workflow, name, current_stage_name, current_stage, total_stages, days_at_current_stage, comments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/pac_post.rb b/emass_client/ruby_client/lib/emass_client/models/pac_post.rb deleted file mode 100644 index dcbbca2..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/pac_post.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PacPost - # [Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval) - attr_accessor :workflow - - attr_accessor :success - - attr_accessor :system_id - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'workflow' => :'workflow', - :'success' => :'success', - :'system_id' => :'systemId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'workflow' => :'Object', - :'success' => :'Object', - :'system_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PacPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PacPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'workflow') - self.workflow = attributes[:'workflow'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - workflow_validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval']) - return false unless workflow_validator.valid?(@workflow) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] workflow Object to be assigned - def workflow=(workflow) - validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval']) - unless validator.valid?(workflow) - fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}." - end - @workflow = workflow - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - workflow == o.workflow && - success == o.success && - system_id == o.system_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [workflow, success, system_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/pac_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/pac_request_post_body.rb deleted file mode 100644 index 1f63f5c..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/pac_request_post_body.rb +++ /dev/null @@ -1,261 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PacRequestPostBody - # [Required] The PAC workflow - attr_accessor :workflow - - # [Required] Package name. 100 Characters. - attr_accessor :name - - # [Required] Character Limit = 4,000. - attr_accessor :comments - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'workflow' => :'workflow', - :'name' => :'name', - :'comments' => :'comments' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'workflow' => :'Object', - :'name' => :'Object', - :'comments' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PacRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PacRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'workflow') - self.workflow = attributes[:'workflow'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - workflow_validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval']) - return false unless workflow_validator.valid?(@workflow) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] workflow Object to be assigned - def workflow=(workflow) - validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval']) - unless validator.valid?(workflow) - fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}." - end - @workflow = workflow - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - workflow == o.workflow && - name == o.name && - comments == o.comments - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [workflow, name, comments].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/pac_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/pac_response_get.rb deleted file mode 100644 index 342c0fc..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/pac_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PacResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PacResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PacResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/pac_response_post.rb b/emass_client/ruby_client/lib/emass_client/models/pac_response_post.rb deleted file mode 100644 index ac081f4..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/pac_response_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PacResponsePost - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PacResponsePost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PacResponsePost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_delete.rb b/emass_client/ruby_client/lib/emass_client/models/poam_delete.rb deleted file mode 100644 index 0a28fba..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_delete.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamDelete - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamDelete` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_get.rb b/emass_client/ruby_client/lib/emass_client/models/poam_get.rb deleted file mode 100644 index 42e8a74..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_get.rb +++ /dev/null @@ -1,646 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamGet - # [Required] Unique eMASS system identifier. - attr_accessor :system_id - - # [Required] Unique item identifier - attr_accessor :poam_id - - # [Required] Globally unique identifier for individual POA&M Items, seen on the front-end as “ID”. - attr_accessor :display_poam_id - - # [Read-only] Indicates whether a test result is inherited. - attr_accessor :is_inherited - - # [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. - attr_accessor :external_uid - - # [Optional] System acronym name. - attr_accessor :control_acronyms - - # [Optional] CCI associated with POA&M Item.. - attr_accessor :cci - - # [Required] Values include the following: (Ongoing,Risk Accepted,Completed,Not Applicable - attr_accessor :status - - # [Read-Only] Values include the following options: (Not Approved,Under Review,Approved) - attr_accessor :review_status - - # [Required] Provide a description of the POA&M Item. 2000 Characters. - attr_accessor :vulnerability_description - - # [Required] Include Source Identifying Vulnerability text. 2000 Characters. - attr_accessor :source_ident_vuln - - # [Optional] Security Checks that are associated with the POA&M. - attr_accessor :security_checks - - attr_accessor :milestones - - # [Required] Organization/Office represented. 100 Characters. - attr_accessor :poc_organization - - # [Conditional] First name of POC. 100 Characters. - attr_accessor :poc_first_name - - # [Conditional] Last name of POC. 100 Characters. - attr_accessor :poc_last_name - - # [Conditional] Email address of POC. 100 Characters. - attr_accessor :poc_email - - # [Conditional] Phone number of POC (area code) ***-**** format. 100 Characters. - attr_accessor :poc_phone_number - - # [Conditional] Required for approved items. Values include the following options (Very Low,Low,Moderate,High,Very High) - attr_accessor :severity - - # [Optional] Values include the following options (I,II,III) - attr_accessor :raw_severity - - # [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) - attr_accessor :relevance_of_threat - - # [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) - attr_accessor :likelihood - - # [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) - attr_accessor :impact - - # [Optional] Include description of Security Control’s impact. - attr_accessor :impact_description - - # [Optional] Values include the following options: (Very Low,Low,Moderate,High,Very High) - attr_accessor :residual_risk_level - - # [Optional] Include recommendations. Character Limit = 2,000. - attr_accessor :recommendations - - # [Required] List of resources used. 250 Characters. - attr_accessor :resources - - # [Conditional] Required for ongoing and completed POA&M items. Unix time format. - attr_accessor :scheduled_completion_date - - # [Conditional] Field is required for completed POA&M items. Unix time format. - attr_accessor :completion_date - - # [Read-Only] Value returned for a POA&M Item with review status Approved” and has a milestone with a scheduled completion date that extends beyond the POA&M Item’s scheduled completion date. - attr_accessor :extension_date - - # [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters - attr_accessor :comments - - # [Optional] Include mitigation explanation. 2000 Characters. - attr_accessor :mitigation - - # [Conditional] Optionally used in PUT to delete milestones when updating a POA&M. - attr_accessor :is_active - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'poam_id' => :'poamId', - :'display_poam_id' => :'displayPoamId', - :'is_inherited' => :'isInherited', - :'external_uid' => :'externalUid', - :'control_acronyms' => :'controlAcronyms', - :'cci' => :'cci', - :'status' => :'status', - :'review_status' => :'reviewStatus', - :'vulnerability_description' => :'vulnerabilityDescription', - :'source_ident_vuln' => :'sourceIdentVuln', - :'security_checks' => :'securityChecks', - :'milestones' => :'milestones', - :'poc_organization' => :'pocOrganization', - :'poc_first_name' => :'pocFirstName', - :'poc_last_name' => :'pocLastName', - :'poc_email' => :'pocEmail', - :'poc_phone_number' => :'pocPhoneNumber', - :'severity' => :'severity', - :'raw_severity' => :'rawSeverity', - :'relevance_of_threat' => :'relevanceOfThreat', - :'likelihood' => :'likelihood', - :'impact' => :'impact', - :'impact_description' => :'impactDescription', - :'residual_risk_level' => :'residualRiskLevel', - :'recommendations' => :'recommendations', - :'resources' => :'resources', - :'scheduled_completion_date' => :'scheduledCompletionDate', - :'completion_date' => :'completionDate', - :'extension_date' => :'extensionDate', - :'comments' => :'comments', - :'mitigation' => :'mitigation', - :'is_active' => :'isActive' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'poam_id' => :'Object', - :'display_poam_id' => :'Object', - :'is_inherited' => :'Object', - :'external_uid' => :'Object', - :'control_acronyms' => :'Object', - :'cci' => :'Object', - :'status' => :'Object', - :'review_status' => :'Object', - :'vulnerability_description' => :'Object', - :'source_ident_vuln' => :'Object', - :'security_checks' => :'Object', - :'milestones' => :'Object', - :'poc_organization' => :'Object', - :'poc_first_name' => :'Object', - :'poc_last_name' => :'Object', - :'poc_email' => :'Object', - :'poc_phone_number' => :'Object', - :'severity' => :'Object', - :'raw_severity' => :'Object', - :'relevance_of_threat' => :'Object', - :'likelihood' => :'Object', - :'impact' => :'Object', - :'impact_description' => :'Object', - :'residual_risk_level' => :'Object', - :'recommendations' => :'Object', - :'resources' => :'Object', - :'scheduled_completion_date' => :'Object', - :'completion_date' => :'Object', - :'extension_date' => :'Object', - :'comments' => :'Object', - :'mitigation' => :'Object', - :'is_active' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - - if attributes.key?(:'display_poam_id') - self.display_poam_id = attributes[:'display_poam_id'] - end - - if attributes.key?(:'is_inherited') - self.is_inherited = attributes[:'is_inherited'] - end - - if attributes.key?(:'external_uid') - self.external_uid = attributes[:'external_uid'] - end - - if attributes.key?(:'control_acronyms') - self.control_acronyms = attributes[:'control_acronyms'] - end - - if attributes.key?(:'cci') - self.cci = attributes[:'cci'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'review_status') - self.review_status = attributes[:'review_status'] - end - - if attributes.key?(:'vulnerability_description') - self.vulnerability_description = attributes[:'vulnerability_description'] - end - - if attributes.key?(:'source_ident_vuln') - self.source_ident_vuln = attributes[:'source_ident_vuln'] - end - - if attributes.key?(:'security_checks') - self.security_checks = attributes[:'security_checks'] - end - - if attributes.key?(:'milestones') - if (value = attributes[:'milestones']).is_a?(Array) - self.milestones = value - end - end - - if attributes.key?(:'poc_organization') - self.poc_organization = attributes[:'poc_organization'] - end - - if attributes.key?(:'poc_first_name') - self.poc_first_name = attributes[:'poc_first_name'] - end - - if attributes.key?(:'poc_last_name') - self.poc_last_name = attributes[:'poc_last_name'] - end - - if attributes.key?(:'poc_email') - self.poc_email = attributes[:'poc_email'] - end - - if attributes.key?(:'poc_phone_number') - self.poc_phone_number = attributes[:'poc_phone_number'] - end - - if attributes.key?(:'severity') - self.severity = attributes[:'severity'] - end - - if attributes.key?(:'raw_severity') - self.raw_severity = attributes[:'raw_severity'] - end - - if attributes.key?(:'relevance_of_threat') - self.relevance_of_threat = attributes[:'relevance_of_threat'] - end - - if attributes.key?(:'likelihood') - self.likelihood = attributes[:'likelihood'] - end - - if attributes.key?(:'impact') - self.impact = attributes[:'impact'] - end - - if attributes.key?(:'impact_description') - self.impact_description = attributes[:'impact_description'] - end - - if attributes.key?(:'residual_risk_level') - self.residual_risk_level = attributes[:'residual_risk_level'] - end - - if attributes.key?(:'recommendations') - self.recommendations = attributes[:'recommendations'] - end - - if attributes.key?(:'resources') - self.resources = attributes[:'resources'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - - if attributes.key?(:'completion_date') - self.completion_date = attributes[:'completion_date'] - end - - if attributes.key?(:'extension_date') - self.extension_date = attributes[:'extension_date'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - - if attributes.key?(:'mitigation') - self.mitigation = attributes[:'mitigation'] - end - - if attributes.key?(:'is_active') - self.is_active = attributes[:'is_active'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('Object', ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']) - return false unless status_validator.valid?(@status) - review_status_validator = EnumAttributeValidator.new('Object', ['Not Approved', 'Under Review', 'Approved']) - return false unless review_status_validator.valid?(@review_status) - severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless severity_validator.valid?(@severity) - raw_severity_validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - return false unless raw_severity_validator.valid?(@raw_severity) - relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless relevance_of_threat_validator.valid?(@relevance_of_threat) - likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless likelihood_validator.valid?(@likelihood) - impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless impact_validator.valid?(@impact) - residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless residual_risk_level_validator.valid?(@residual_risk_level) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('Object', ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']) - unless validator.valid?(status) - fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] review_status Object to be assigned - def review_status=(review_status) - validator = EnumAttributeValidator.new('Object', ['Not Approved', 'Under Review', 'Approved']) - unless validator.valid?(review_status) - fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}." - end - @review_status = review_status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] severity Object to be assigned - def severity=(severity) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(severity) - fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." - end - @severity = severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] raw_severity Object to be assigned - def raw_severity=(raw_severity) - validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - unless validator.valid?(raw_severity) - fail ArgumentError, "invalid value for \"raw_severity\", must be one of #{validator.allowable_values}." - end - @raw_severity = raw_severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] relevance_of_threat Object to be assigned - def relevance_of_threat=(relevance_of_threat) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(relevance_of_threat) - fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}." - end - @relevance_of_threat = relevance_of_threat - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] likelihood Object to be assigned - def likelihood=(likelihood) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(likelihood) - fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}." - end - @likelihood = likelihood - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] impact Object to be assigned - def impact=(impact) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(impact) - fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}." - end - @impact = impact - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] residual_risk_level Object to be assigned - def residual_risk_level=(residual_risk_level) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(residual_risk_level) - fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}." - end - @residual_risk_level = residual_risk_level - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - poam_id == o.poam_id && - display_poam_id == o.display_poam_id && - is_inherited == o.is_inherited && - external_uid == o.external_uid && - control_acronyms == o.control_acronyms && - cci == o.cci && - status == o.status && - review_status == o.review_status && - vulnerability_description == o.vulnerability_description && - source_ident_vuln == o.source_ident_vuln && - security_checks == o.security_checks && - milestones == o.milestones && - poc_organization == o.poc_organization && - poc_first_name == o.poc_first_name && - poc_last_name == o.poc_last_name && - poc_email == o.poc_email && - poc_phone_number == o.poc_phone_number && - severity == o.severity && - raw_severity == o.raw_severity && - relevance_of_threat == o.relevance_of_threat && - likelihood == o.likelihood && - impact == o.impact && - impact_description == o.impact_description && - residual_risk_level == o.residual_risk_level && - recommendations == o.recommendations && - resources == o.resources && - scheduled_completion_date == o.scheduled_completion_date && - completion_date == o.completion_date && - extension_date == o.extension_date && - comments == o.comments && - mitigation == o.mitigation && - is_active == o.is_active - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, poam_id, display_poam_id, is_inherited, external_uid, control_acronyms, cci, status, review_status, vulnerability_description, source_ident_vuln, security_checks, milestones, poc_organization, poc_first_name, poc_last_name, poc_email, poc_phone_number, severity, raw_severity, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level, recommendations, resources, scheduled_completion_date, completion_date, extension_date, comments, mitigation, is_active].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_post.rb b/emass_client/ruby_client/lib/emass_client/models/poam_post.rb deleted file mode 100644 index 7b0dd35..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_post.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamPost - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_post_put_del.rb b/emass_client/ruby_client/lib/emass_client/models/poam_post_put_del.rb deleted file mode 100644 index fe5fbec..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_post_put_del.rb +++ /dev/null @@ -1,237 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamPostPutDel - # The system identifier for the system being updated. - attr_accessor :system_id - - # The newly created POAM identifier - attr_accessor :poam_id - - # The unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. - attr_accessor :external_uid - - # Indicates if operations result (success/fail) - attr_accessor :success - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'poam_id' => :'poamId', - :'external_uid' => :'externalUid', - :'success' => :'success' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'poam_id' => :'Object', - :'external_uid' => :'Object', - :'success' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamPostPutDel` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamPostPutDel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - - if attributes.key?(:'external_uid') - self.external_uid = attributes[:'external_uid'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - poam_id == o.poam_id && - external_uid == o.external_uid && - success == o.success - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, poam_id, external_uid, success].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_put.rb b/emass_client/ruby_client/lib/emass_client/models/poam_put.rb deleted file mode 100644 index 6f705f1..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_put.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamPut - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamPut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/poam_request_post_body.rb deleted file mode 100644 index 6971c8b..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_request_post_body.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamRequestPostBody - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_request_put_body.rb b/emass_client/ruby_client/lib/emass_client/models/poam_request_put_body.rb deleted file mode 100644 index 30b24b2..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_request_put_body.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamRequestPutBody - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamRequestPutBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamRequestPutBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_required_post.rb b/emass_client/ruby_client/lib/emass_client/models/poam_required_post.rb deleted file mode 100644 index 05d2077..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_required_post.rb +++ /dev/null @@ -1,564 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamRequiredPost - # [Required] Values include the following: (Ongoing,Risk Accepted,Completed,Not Applicable - attr_accessor :status - - # [Required] Provide a description of the POA&M Item. 2000 Characters. - attr_accessor :vulnerability_description - - # [Required] Include Source Identifying Vulnerability text. 2000 Characters. - attr_accessor :source_ident_vuln - - # [Required] Organization/Office represented. 100 Characters. - attr_accessor :poc_organization - - # [Required] List of resources used. 250 Characters. - attr_accessor :resources - - # [Required] First name of POC. 100 Characters. - attr_accessor :poc_first_name - - # [Required] Last name of POC. 100 Characters. - attr_accessor :poc_last_name - - # [Required] Email address of POC. 100 Characters. - attr_accessor :poc_email - - # [Required] Phone number of POC (area code) ***-**** format. 100 Characters. - attr_accessor :poc_phone_number - - # [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. - attr_accessor :external_uid - - # [Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined. - attr_accessor :control_acronym - - # [Optional] CCI associated with POA&M. - attr_accessor :cci - - # [Optional] Security Checks that are associated with the POA&M. - attr_accessor :security_checks - - # [Optional] Values include the following options (I,II,III) - attr_accessor :raw_severity - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :relevance_of_threat - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :likelihood - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :impact - - # [Optional] Include description of Security Control’s impact. - attr_accessor :impact_description - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :residual_risk_level - - # [Optional] Include recommendations. Character Limit = 2,000. - attr_accessor :recommendations - - # [Optional] Include mitigation explanation. 2000 Characters. - attr_accessor :mitigation - - # [Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High) - attr_accessor :severity - - # [Conditional] Required for ongoing and completed POA&M items. Unix time format. - attr_accessor :scheduled_completion_date - - # [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters - attr_accessor :comments - - # [Conditional] Field is required for completed POA&M items. Unix time format. - attr_accessor :completion_date - - attr_accessor :milestones - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'status' => :'status', - :'vulnerability_description' => :'vulnerabilityDescription', - :'source_ident_vuln' => :'sourceIdentVuln', - :'poc_organization' => :'pocOrganization', - :'resources' => :'resources', - :'poc_first_name' => :'pocFirstName', - :'poc_last_name' => :'pocLastName', - :'poc_email' => :'pocEmail', - :'poc_phone_number' => :'pocPhoneNumber', - :'external_uid' => :'externalUid', - :'control_acronym' => :'controlAcronym', - :'cci' => :'cci', - :'security_checks' => :'securityChecks', - :'raw_severity' => :'rawSeverity', - :'relevance_of_threat' => :'relevanceOfThreat', - :'likelihood' => :'likelihood', - :'impact' => :'impact', - :'impact_description' => :'impactDescription', - :'residual_risk_level' => :'residualRiskLevel', - :'recommendations' => :'recommendations', - :'mitigation' => :'mitigation', - :'severity' => :'severity', - :'scheduled_completion_date' => :'scheduledCompletionDate', - :'comments' => :'comments', - :'completion_date' => :'completionDate', - :'milestones' => :'milestones' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'status' => :'Object', - :'vulnerability_description' => :'Object', - :'source_ident_vuln' => :'Object', - :'poc_organization' => :'Object', - :'resources' => :'Object', - :'poc_first_name' => :'Object', - :'poc_last_name' => :'Object', - :'poc_email' => :'Object', - :'poc_phone_number' => :'Object', - :'external_uid' => :'Object', - :'control_acronym' => :'Object', - :'cci' => :'Object', - :'security_checks' => :'Object', - :'raw_severity' => :'Object', - :'relevance_of_threat' => :'Object', - :'likelihood' => :'Object', - :'impact' => :'Object', - :'impact_description' => :'Object', - :'residual_risk_level' => :'Object', - :'recommendations' => :'Object', - :'mitigation' => :'Object', - :'severity' => :'Object', - :'scheduled_completion_date' => :'Object', - :'comments' => :'Object', - :'completion_date' => :'Object', - :'milestones' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamRequiredPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamRequiredPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'vulnerability_description') - self.vulnerability_description = attributes[:'vulnerability_description'] - end - - if attributes.key?(:'source_ident_vuln') - self.source_ident_vuln = attributes[:'source_ident_vuln'] - end - - if attributes.key?(:'poc_organization') - self.poc_organization = attributes[:'poc_organization'] - end - - if attributes.key?(:'resources') - self.resources = attributes[:'resources'] - end - - if attributes.key?(:'poc_first_name') - self.poc_first_name = attributes[:'poc_first_name'] - end - - if attributes.key?(:'poc_last_name') - self.poc_last_name = attributes[:'poc_last_name'] - end - - if attributes.key?(:'poc_email') - self.poc_email = attributes[:'poc_email'] - end - - if attributes.key?(:'poc_phone_number') - self.poc_phone_number = attributes[:'poc_phone_number'] - end - - if attributes.key?(:'external_uid') - self.external_uid = attributes[:'external_uid'] - end - - if attributes.key?(:'control_acronym') - self.control_acronym = attributes[:'control_acronym'] - end - - if attributes.key?(:'cci') - self.cci = attributes[:'cci'] - end - - if attributes.key?(:'security_checks') - self.security_checks = attributes[:'security_checks'] - end - - if attributes.key?(:'raw_severity') - self.raw_severity = attributes[:'raw_severity'] - end - - if attributes.key?(:'relevance_of_threat') - self.relevance_of_threat = attributes[:'relevance_of_threat'] - end - - if attributes.key?(:'likelihood') - self.likelihood = attributes[:'likelihood'] - end - - if attributes.key?(:'impact') - self.impact = attributes[:'impact'] - end - - if attributes.key?(:'impact_description') - self.impact_description = attributes[:'impact_description'] - end - - if attributes.key?(:'residual_risk_level') - self.residual_risk_level = attributes[:'residual_risk_level'] - end - - if attributes.key?(:'recommendations') - self.recommendations = attributes[:'recommendations'] - end - - if attributes.key?(:'mitigation') - self.mitigation = attributes[:'mitigation'] - end - - if attributes.key?(:'severity') - self.severity = attributes[:'severity'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - - if attributes.key?(:'completion_date') - self.completion_date = attributes[:'completion_date'] - end - - if attributes.key?(:'milestones') - if (value = attributes[:'milestones']).is_a?(Array) - self.milestones = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('Object', ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']) - return false unless status_validator.valid?(@status) - raw_severity_validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - return false unless raw_severity_validator.valid?(@raw_severity) - relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless relevance_of_threat_validator.valid?(@relevance_of_threat) - likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless likelihood_validator.valid?(@likelihood) - impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless impact_validator.valid?(@impact) - residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless residual_risk_level_validator.valid?(@residual_risk_level) - severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless severity_validator.valid?(@severity) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('Object', ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']) - unless validator.valid?(status) - fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] raw_severity Object to be assigned - def raw_severity=(raw_severity) - validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - unless validator.valid?(raw_severity) - fail ArgumentError, "invalid value for \"raw_severity\", must be one of #{validator.allowable_values}." - end - @raw_severity = raw_severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] relevance_of_threat Object to be assigned - def relevance_of_threat=(relevance_of_threat) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(relevance_of_threat) - fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}." - end - @relevance_of_threat = relevance_of_threat - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] likelihood Object to be assigned - def likelihood=(likelihood) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(likelihood) - fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}." - end - @likelihood = likelihood - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] impact Object to be assigned - def impact=(impact) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(impact) - fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}." - end - @impact = impact - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] residual_risk_level Object to be assigned - def residual_risk_level=(residual_risk_level) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(residual_risk_level) - fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}." - end - @residual_risk_level = residual_risk_level - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] severity Object to be assigned - def severity=(severity) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(severity) - fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." - end - @severity = severity - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - status == o.status && - vulnerability_description == o.vulnerability_description && - source_ident_vuln == o.source_ident_vuln && - poc_organization == o.poc_organization && - resources == o.resources && - poc_first_name == o.poc_first_name && - poc_last_name == o.poc_last_name && - poc_email == o.poc_email && - poc_phone_number == o.poc_phone_number && - external_uid == o.external_uid && - control_acronym == o.control_acronym && - cci == o.cci && - security_checks == o.security_checks && - raw_severity == o.raw_severity && - relevance_of_threat == o.relevance_of_threat && - likelihood == o.likelihood && - impact == o.impact && - impact_description == o.impact_description && - residual_risk_level == o.residual_risk_level && - recommendations == o.recommendations && - mitigation == o.mitigation && - severity == o.severity && - scheduled_completion_date == o.scheduled_completion_date && - comments == o.comments && - completion_date == o.completion_date && - milestones == o.milestones - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [status, vulnerability_description, source_ident_vuln, poc_organization, resources, poc_first_name, poc_last_name, poc_email, poc_phone_number, external_uid, control_acronym, cci, security_checks, raw_severity, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level, recommendations, mitigation, severity, scheduled_completion_date, comments, completion_date, milestones].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_required_put.rb b/emass_client/ruby_client/lib/emass_client/models/poam_required_put.rb deleted file mode 100644 index 6cf506e..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_required_put.rb +++ /dev/null @@ -1,594 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamRequiredPut - # [Required] Unique item identifier - attr_accessor :poam_id - - # [Required] Globally unique identifier for individual POA&M Items, seen on the front-end as “ID”. - attr_accessor :display_poam_id - - # [Required] The POA&M status - attr_accessor :status - - # [Required] Provide a description of the POA&M Item. 2000 Characters. - attr_accessor :vulnerability_description - - # [Required] Include Source Identifying Vulnerability text. 2000 Characters. - attr_accessor :source_ident_vuln - - # [Required] Organization/Office represented. 100 Characters. - attr_accessor :poc_organization - - # [Required] List of resources used. 250 Characters. - attr_accessor :resources - - # [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters. - attr_accessor :external_uid - - # [Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined. - attr_accessor :control_acronym - - # CCI associated with POA&M. - attr_accessor :cci - - # [Optional] Security Checks that are associated with the POA&M. - attr_accessor :security_checks - - # [Optional] Values include the following options (I,II,III) - attr_accessor :raw_severity - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :relevance_of_threat - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :likelihood - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :impact - - # [Optional] Include description of Security Control’s impact. - attr_accessor :impact_description - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :residual_risk_level - - # [Optional] Include recommendations. Character Limit = 2,000. - attr_accessor :recommendations - - # [Optional] Include mitigation explanation. 2000 Characters. - attr_accessor :mitigation - - # [Conditional] First name of POC. 100 Characters. - attr_accessor :poc_first_name - - # [Conditional] Last name of POC. 100 Characters. - attr_accessor :poc_last_name - - # [Conditional] Email address of POC. 100 Characters. - attr_accessor :poc_email - - # [Conditional] Phone number of POC (area code) ***-**** format. 100 Characters. - attr_accessor :poc_phone_number - - # [Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High) - attr_accessor :severity - - # [Conditional] Required for ongoing and completed POA&M items. Unix time format. - attr_accessor :scheduled_completion_date - - # [Conditional] Field is required for completed POA&M items. Unix time format. - attr_accessor :completion_date - - # [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters - attr_accessor :comments - - # [Conditional] Optionally used in PUT to delete milestones when updating a POA&M. - attr_accessor :is_active - - attr_accessor :milestones - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'poam_id' => :'poamId', - :'display_poam_id' => :'displayPoamId', - :'status' => :'status', - :'vulnerability_description' => :'vulnerabilityDescription', - :'source_ident_vuln' => :'sourceIdentVuln', - :'poc_organization' => :'pocOrganization', - :'resources' => :'resources', - :'external_uid' => :'externalUid', - :'control_acronym' => :'controlAcronym', - :'cci' => :'cci', - :'security_checks' => :'securityChecks', - :'raw_severity' => :'rawSeverity', - :'relevance_of_threat' => :'relevanceOfThreat', - :'likelihood' => :'likelihood', - :'impact' => :'impact', - :'impact_description' => :'impactDescription', - :'residual_risk_level' => :'residualRiskLevel', - :'recommendations' => :'recommendations', - :'mitigation' => :'mitigation', - :'poc_first_name' => :'pocFirstName', - :'poc_last_name' => :'pocLastName', - :'poc_email' => :'pocEmail', - :'poc_phone_number' => :'pocPhoneNumber', - :'severity' => :'severity', - :'scheduled_completion_date' => :'scheduledCompletionDate', - :'completion_date' => :'completionDate', - :'comments' => :'comments', - :'is_active' => :'isActive', - :'milestones' => :'milestones' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'poam_id' => :'Object', - :'display_poam_id' => :'Object', - :'status' => :'Object', - :'vulnerability_description' => :'Object', - :'source_ident_vuln' => :'Object', - :'poc_organization' => :'Object', - :'resources' => :'Object', - :'external_uid' => :'Object', - :'control_acronym' => :'Object', - :'cci' => :'Object', - :'security_checks' => :'Object', - :'raw_severity' => :'Object', - :'relevance_of_threat' => :'Object', - :'likelihood' => :'Object', - :'impact' => :'Object', - :'impact_description' => :'Object', - :'residual_risk_level' => :'Object', - :'recommendations' => :'Object', - :'mitigation' => :'Object', - :'poc_first_name' => :'Object', - :'poc_last_name' => :'Object', - :'poc_email' => :'Object', - :'poc_phone_number' => :'Object', - :'severity' => :'Object', - :'scheduled_completion_date' => :'Object', - :'completion_date' => :'Object', - :'comments' => :'Object', - :'is_active' => :'Object', - :'milestones' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamRequiredPut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamRequiredPut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'poam_id') - self.poam_id = attributes[:'poam_id'] - end - - if attributes.key?(:'display_poam_id') - self.display_poam_id = attributes[:'display_poam_id'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'vulnerability_description') - self.vulnerability_description = attributes[:'vulnerability_description'] - end - - if attributes.key?(:'source_ident_vuln') - self.source_ident_vuln = attributes[:'source_ident_vuln'] - end - - if attributes.key?(:'poc_organization') - self.poc_organization = attributes[:'poc_organization'] - end - - if attributes.key?(:'resources') - self.resources = attributes[:'resources'] - end - - if attributes.key?(:'external_uid') - self.external_uid = attributes[:'external_uid'] - end - - if attributes.key?(:'control_acronym') - self.control_acronym = attributes[:'control_acronym'] - end - - if attributes.key?(:'cci') - self.cci = attributes[:'cci'] - end - - if attributes.key?(:'security_checks') - self.security_checks = attributes[:'security_checks'] - end - - if attributes.key?(:'raw_severity') - self.raw_severity = attributes[:'raw_severity'] - end - - if attributes.key?(:'relevance_of_threat') - self.relevance_of_threat = attributes[:'relevance_of_threat'] - end - - if attributes.key?(:'likelihood') - self.likelihood = attributes[:'likelihood'] - end - - if attributes.key?(:'impact') - self.impact = attributes[:'impact'] - end - - if attributes.key?(:'impact_description') - self.impact_description = attributes[:'impact_description'] - end - - if attributes.key?(:'residual_risk_level') - self.residual_risk_level = attributes[:'residual_risk_level'] - end - - if attributes.key?(:'recommendations') - self.recommendations = attributes[:'recommendations'] - end - - if attributes.key?(:'mitigation') - self.mitigation = attributes[:'mitigation'] - end - - if attributes.key?(:'poc_first_name') - self.poc_first_name = attributes[:'poc_first_name'] - end - - if attributes.key?(:'poc_last_name') - self.poc_last_name = attributes[:'poc_last_name'] - end - - if attributes.key?(:'poc_email') - self.poc_email = attributes[:'poc_email'] - end - - if attributes.key?(:'poc_phone_number') - self.poc_phone_number = attributes[:'poc_phone_number'] - end - - if attributes.key?(:'severity') - self.severity = attributes[:'severity'] - end - - if attributes.key?(:'scheduled_completion_date') - self.scheduled_completion_date = attributes[:'scheduled_completion_date'] - end - - if attributes.key?(:'completion_date') - self.completion_date = attributes[:'completion_date'] - end - - if attributes.key?(:'comments') - self.comments = attributes[:'comments'] - end - - if attributes.key?(:'is_active') - self.is_active = attributes[:'is_active'] - end - - if attributes.key?(:'milestones') - if (value = attributes[:'milestones']).is_a?(Array) - self.milestones = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - status_validator = EnumAttributeValidator.new('Object', ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']) - return false unless status_validator.valid?(@status) - raw_severity_validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - return false unless raw_severity_validator.valid?(@raw_severity) - relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless relevance_of_threat_validator.valid?(@relevance_of_threat) - likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless likelihood_validator.valid?(@likelihood) - impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless impact_validator.valid?(@impact) - residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless residual_risk_level_validator.valid?(@residual_risk_level) - severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - return false unless severity_validator.valid?(@severity) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('Object', ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable']) - unless validator.valid?(status) - fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." - end - @status = status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] raw_severity Object to be assigned - def raw_severity=(raw_severity) - validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - unless validator.valid?(raw_severity) - fail ArgumentError, "invalid value for \"raw_severity\", must be one of #{validator.allowable_values}." - end - @raw_severity = raw_severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] relevance_of_threat Object to be assigned - def relevance_of_threat=(relevance_of_threat) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(relevance_of_threat) - fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}." - end - @relevance_of_threat = relevance_of_threat - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] likelihood Object to be assigned - def likelihood=(likelihood) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(likelihood) - fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}." - end - @likelihood = likelihood - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] impact Object to be assigned - def impact=(impact) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(impact) - fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}." - end - @impact = impact - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] residual_risk_level Object to be assigned - def residual_risk_level=(residual_risk_level) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(residual_risk_level) - fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}." - end - @residual_risk_level = residual_risk_level - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] severity Object to be assigned - def severity=(severity) - validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High']) - unless validator.valid?(severity) - fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}." - end - @severity = severity - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - poam_id == o.poam_id && - display_poam_id == o.display_poam_id && - status == o.status && - vulnerability_description == o.vulnerability_description && - source_ident_vuln == o.source_ident_vuln && - poc_organization == o.poc_organization && - resources == o.resources && - external_uid == o.external_uid && - control_acronym == o.control_acronym && - cci == o.cci && - security_checks == o.security_checks && - raw_severity == o.raw_severity && - relevance_of_threat == o.relevance_of_threat && - likelihood == o.likelihood && - impact == o.impact && - impact_description == o.impact_description && - residual_risk_level == o.residual_risk_level && - recommendations == o.recommendations && - mitigation == o.mitigation && - poc_first_name == o.poc_first_name && - poc_last_name == o.poc_last_name && - poc_email == o.poc_email && - poc_phone_number == o.poc_phone_number && - severity == o.severity && - scheduled_completion_date == o.scheduled_completion_date && - completion_date == o.completion_date && - comments == o.comments && - is_active == o.is_active && - milestones == o.milestones - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [poam_id, display_poam_id, status, vulnerability_description, source_ident_vuln, poc_organization, resources, external_uid, control_acronym, cci, security_checks, raw_severity, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level, recommendations, mitigation, poc_first_name, poc_last_name, poc_email, poc_phone_number, severity, scheduled_completion_date, completion_date, comments, is_active, milestones].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_response_delete.rb b/emass_client/ruby_client/lib/emass_client/models/poam_response_delete.rb deleted file mode 100644 index 28f7f06..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_response_delete.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamResponseDelete - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamResponseDelete` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamResponseDelete`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/poam_response_get.rb deleted file mode 100644 index 0c250c2..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_response_post.rb b/emass_client/ruby_client/lib/emass_client/models/poam_response_post.rb deleted file mode 100644 index 3e03c09..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_response_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamResponsePost - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamResponsePost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamResponsePost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/poam_response_put.rb b/emass_client/ruby_client/lib/emass_client/models/poam_response_put.rb deleted file mode 100644 index e991233..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/poam_response_put.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class PoamResponsePut - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamResponsePut` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamResponsePut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/register.rb b/emass_client/ruby_client/lib/emass_client/models/register.rb deleted file mode 100644 index 482732c..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/register.rb +++ /dev/null @@ -1,215 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Register - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Register` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Register`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/register_data.rb b/emass_client/ruby_client/lib/emass_client/models/register_data.rb deleted file mode 100644 index 1f0fabd..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/register_data.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class RegisterData - attr_accessor :apikey - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'apikey' => :'apikey' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'apikey' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::RegisterData` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::RegisterData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'apikey') - self.apikey = attributes[:'apikey'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - apikey == o.apikey - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [apikey].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/register_user_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/register_user_request_post_body.rb deleted file mode 100644 index 0ca6e61..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/register_user_request_post_body.rb +++ /dev/null @@ -1,211 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class RegisterUserRequestPostBody - attr_accessor :user_uid - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'user_uid' => :'user-uid' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'user_uid' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::RegisterUserRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::RegisterUserRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'user_uid') - self.user_uid = attributes[:'user_uid'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @user_uid.nil? - invalid_properties.push('invalid value for "user_uid", user_uid cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @user_uid.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user_uid == o.user_uid - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [user_uid].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/role_category.rb b/emass_client/ruby_client/lib/emass_client/models/role_category.rb deleted file mode 100644 index db7b547..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/role_category.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class RoleCategory - # [Read-only] Unique system record identifier. - attr_accessor :system_id - - # [Read-only] Name of the system record. - attr_accessor :system_name - - # [Read-only] Acronym of the system record. - attr_accessor :system_acronym - - attr_accessor :roles - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'system_name' => :'systemName', - :'system_acronym' => :'systemAcronym', - :'roles' => :'roles' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'system_name' => :'Object', - :'system_acronym' => :'Object', - :'roles' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::RoleCategory` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::RoleCategory`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'system_name') - self.system_name = attributes[:'system_name'] - end - - if attributes.key?(:'system_acronym') - self.system_acronym = attributes[:'system_acronym'] - end - - if attributes.key?(:'roles') - if (value = attributes[:'roles']).is_a?(Array) - self.roles = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - system_name_validator = EnumAttributeValidator.new('Object', ['Test system 1', 'Test system 2', 'Test system 3', 'Test system 4']) - return false unless system_name_validator.valid?(@system_name) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] system_name Object to be assigned - def system_name=(system_name) - validator = EnumAttributeValidator.new('Object', ['Test system 1', 'Test system 2', 'Test system 3', 'Test system 4']) - unless validator.valid?(system_name) - fail ArgumentError, "invalid value for \"system_name\", must be one of #{validator.allowable_values}." - end - @system_name = system_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - system_name == o.system_name && - system_acronym == o.system_acronym && - roles == o.roles - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, system_name, system_acronym, roles].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/roles.rb b/emass_client/ruby_client/lib/emass_client/models/roles.rb deleted file mode 100644 index cc27523..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/roles.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Roles - # [Required] System role categories - attr_accessor :role_category - - # [Required] System role description - attr_accessor :role - - attr_accessor :users - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'role_category' => :'roleCategory', - :'role' => :'role', - :'users' => :'users' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'role_category' => :'Object', - :'role' => :'Object', - :'users' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Roles` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Roles`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'role_category') - self.role_category = attributes[:'role_category'] - end - - if attributes.key?(:'role') - self.role = attributes[:'role'] - end - - if attributes.key?(:'users') - if (value = attributes[:'users']).is_a?(Array) - self.users = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - role_category_validator = EnumAttributeValidator.new('Object', ['CAC', 'PAC', 'Other']) - return false unless role_category_validator.valid?(@role_category) - role_validator = EnumAttributeValidator.new('Object', ['PM/IAM', 'SCA', 'AO', 'ISSO', 'IAO', 'Validator (IV&V)', 'User Rep (View Only)', 'Auditor', 'Artifact Manager', 'C&A Team']) - return false unless role_validator.valid?(@role) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] role_category Object to be assigned - def role_category=(role_category) - validator = EnumAttributeValidator.new('Object', ['CAC', 'PAC', 'Other']) - unless validator.valid?(role_category) - fail ArgumentError, "invalid value for \"role_category\", must be one of #{validator.allowable_values}." - end - @role_category = role_category - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] role Object to be assigned - def role=(role) - validator = EnumAttributeValidator.new('Object', ['PM/IAM', 'SCA', 'AO', 'ISSO', 'IAO', 'Validator (IV&V)', 'User Rep (View Only)', 'Auditor', 'Artifact Manager', 'C&A Team']) - unless validator.valid?(role) - fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}." - end - @role = role - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - role_category == o.role_category && - role == o.role && - users == o.users - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [role_category, role, users].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/ssps.rb b/emass_client/ruby_client/lib/emass_client/models/ssps.rb deleted file mode 100644 index a60d35e..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/ssps.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Ssps - # [Read-Only] Name of the System Security Plan. - attr_accessor :ssp_name - - # [Read-Only] Version of the System Security Plan. - attr_accessor :ssp_version - - # Date of the System Security Plan. Unix date format. - attr_accessor :ssp_date - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'ssp_name' => :'sspName', - :'ssp_version' => :'sspVersion', - :'ssp_date' => :'sspDate' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'ssp_name' => :'Object', - :'ssp_version' => :'Object', - :'ssp_date' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Ssps` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Ssps`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'ssp_name') - self.ssp_name = attributes[:'ssp_name'] - end - - if attributes.key?(:'ssp_version') - self.ssp_version = attributes[:'ssp_version'] - end - - if attributes.key?(:'ssp_date') - self.ssp_date = attributes[:'ssp_date'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ssp_name == o.ssp_name && - ssp_version == o.ssp_version && - ssp_date == o.ssp_date - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [ssp_name, ssp_version, ssp_date].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/stage.rb b/emass_client/ruby_client/lib/emass_client/models/stage.rb deleted file mode 100644 index 93b0656..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/stage.rb +++ /dev/null @@ -1,252 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Stage - # [Read-Only] Name of the stage. - attr_accessor :name - - attr_accessor :transitions - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'name' => :'name', - :'transitions' => :'transitions' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'name' => :'Object', - :'transitions' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Stage` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Stage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'transitions') - if (value = attributes[:'transitions']).is_a?(Array) - self.transitions = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - name_validator = EnumAttributeValidator.new('Object', ['Not Started', 'Categorize System', 'Submit Categorization', 'Approval', 'Complete']) - return false unless name_validator.valid?(@name) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] name Object to be assigned - def name=(name) - validator = EnumAttributeValidator.new('Object', ['Not Started', 'Categorize System', 'Submit Categorization', 'Approval', 'Complete']) - unless validator.valid?(name) - fail ArgumentError, "invalid value for \"name\", must be one of #{validator.allowable_values}." - end - @name = name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - transitions == o.transitions - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [name, transitions].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/static_code_application.rb b/emass_client/ruby_client/lib/emass_client/models/static_code_application.rb deleted file mode 100644 index 94019ef..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/static_code_application.rb +++ /dev/null @@ -1,303 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class StaticCodeApplication - # [Optional] Scan vulnerability ratting - attr_accessor :raw_severity - - # [Required] Name of the software vulnerability or weakness. - attr_accessor :code_check_name - - # [Optional] Number of instances observed for a specified finding. - attr_accessor :count - - # [Required] The date of the scan. Unix date format. - attr_accessor :scan_date - - # [Required] The Common Weakness Enumerator (CWE) identifier. - attr_accessor :cwe_id - - # [Optional] When used by itself, can clear out all application findings for a single application/version pairing. - attr_accessor :clear_findings - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'raw_severity' => :'rawSeverity', - :'code_check_name' => :'codeCheckName', - :'count' => :'count', - :'scan_date' => :'scanDate', - :'cwe_id' => :'cweId', - :'clear_findings' => :'clearFindings' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'raw_severity' => :'Object', - :'code_check_name' => :'Object', - :'count' => :'Object', - :'scan_date' => :'Object', - :'cwe_id' => :'Object', - :'clear_findings' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::StaticCodeApplication` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::StaticCodeApplication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'raw_severity') - self.raw_severity = attributes[:'raw_severity'] - end - - if attributes.key?(:'code_check_name') - self.code_check_name = attributes[:'code_check_name'] - end - - if attributes.key?(:'count') - self.count = attributes[:'count'] - end - - if attributes.key?(:'scan_date') - self.scan_date = attributes[:'scan_date'] - end - - if attributes.key?(:'cwe_id') - self.cwe_id = attributes[:'cwe_id'] - end - - if attributes.key?(:'clear_findings') - self.clear_findings = attributes[:'clear_findings'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - raw_severity_validator = EnumAttributeValidator.new('Object', ['Low', 'Medium', 'Moderate', 'High', 'Critical']) - return false unless raw_severity_validator.valid?(@raw_severity) - code_check_name_validator = EnumAttributeValidator.new('Object', ['Hidden Field', 'Redundant Check', 'Invalid Field', 'Vulnerable Field']) - return false unless code_check_name_validator.valid?(@code_check_name) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] raw_severity Object to be assigned - def raw_severity=(raw_severity) - validator = EnumAttributeValidator.new('Object', ['Low', 'Medium', 'Moderate', 'High', 'Critical']) - unless validator.valid?(raw_severity) - fail ArgumentError, "invalid value for \"raw_severity\", must be one of #{validator.allowable_values}." - end - @raw_severity = raw_severity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] code_check_name Object to be assigned - def code_check_name=(code_check_name) - validator = EnumAttributeValidator.new('Object', ['Hidden Field', 'Redundant Check', 'Invalid Field', 'Vulnerable Field']) - unless validator.valid?(code_check_name) - fail ArgumentError, "invalid value for \"code_check_name\", must be one of #{validator.allowable_values}." - end - @code_check_name = code_check_name - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - raw_severity == o.raw_severity && - code_check_name == o.code_check_name && - count == o.count && - scan_date == o.scan_date && - cwe_id == o.cwe_id && - clear_findings == o.clear_findings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [raw_severity, code_check_name, count, scan_date, cwe_id, clear_findings].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/static_code_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/static_code_request_post_body.rb deleted file mode 100644 index 651da63..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/static_code_request_post_body.rb +++ /dev/null @@ -1,197 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class StaticCodeRequestPostBody - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - } - end - - # Attribute type mapping. - def self.openapi_types - { - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::StaticCodeRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::StaticCodeRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/static_code_required_post.rb b/emass_client/ruby_client/lib/emass_client/models/static_code_required_post.rb deleted file mode 100644 index 44ab797..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/static_code_required_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class StaticCodeRequiredPost - attr_accessor :application - - attr_accessor :application_findings - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'application' => :'application', - :'application_findings' => :'applicationFindings' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'application' => :'Object', - :'application_findings' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::StaticCodeRequiredPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::StaticCodeRequiredPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'application') - self.application = attributes[:'application'] - end - - if attributes.key?(:'application_findings') - if (value = attributes[:'application_findings']).is_a?(Array) - self.application_findings = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - application == o.application && - application_findings == o.application_findings - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [application, application_findings].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/static_code_required_post_application.rb b/emass_client/ruby_client/lib/emass_client/models/static_code_required_post_application.rb deleted file mode 100644 index 5e325f2..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/static_code_required_post_application.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class StaticCodeRequiredPostApplication - # [Required] Name of the software application that was assessed. - attr_accessor :application_name - - # [Required] The version of the application. - attr_accessor :version - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'application_name' => :'applicationName', - :'version' => :'version' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'application_name' => :'Object', - :'version' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::StaticCodeRequiredPostApplication` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::StaticCodeRequiredPostApplication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'application_name') - self.application_name = attributes[:'application_name'] - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - application_name == o.application_name && - version == o.version - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [application_name, version].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/success200_response.rb b/emass_client/ruby_client/lib/emass_client/models/success200_response.rb deleted file mode 100644 index 9a2c408..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/success200_response.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Success200Response - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Success200Response` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Success200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/system_id_artifacts_body.rb b/emass_client/ruby_client/lib/emass_client/models/system_id_artifacts_body.rb deleted file mode 100644 index 6072c56..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/system_id_artifacts_body.rb +++ /dev/null @@ -1,284 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class SystemIdArtifactsBody - attr_accessor :is_template - - attr_accessor :type - - attr_accessor :category - - attr_accessor :zipper - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'is_template' => :'isTemplate', - :'type' => :'type', - :'category' => :'category', - :'zipper' => :'Zipper' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'is_template' => :'Object', - :'type' => :'Object', - :'category' => :'Object', - :'zipper' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::SystemIdArtifactsBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemIdArtifactsBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'is_template') - self.is_template = attributes[:'is_template'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'category') - self.category = attributes[:'category'] - end - - if attributes.key?(:'zipper') - self.zipper = attributes[:'zipper'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @zipper.nil? - invalid_properties.push('invalid value for "zipper", zipper cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - type_validator = EnumAttributeValidator.new('Object', ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result', 'Auditor Report']) - return false unless type_validator.valid?(@type) - category_validator = EnumAttributeValidator.new('Object', ['Implementation Guidance', 'Evidence']) - return false unless category_validator.valid?(@category) - return false if @zipper.nil? - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('Object', ['Procedure', 'Diagram', 'Policy', 'Labor', 'Document', 'Image', 'Other', 'Scan Result', 'Auditor Report']) - unless validator.valid?(type) - fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." - end - @type = type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] category Object to be assigned - def category=(category) - validator = EnumAttributeValidator.new('Object', ['Implementation Guidance', 'Evidence']) - unless validator.valid?(category) - fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}." - end - @category = category - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - is_template == o.is_template && - type == o.type && - category == o.category && - zipper == o.zipper - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [is_template, type, category, zipper].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/system_response.rb b/emass_client/ruby_client/lib/emass_client/models/system_response.rb deleted file mode 100644 index 47ffba7..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/system_response.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class SystemResponse - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::SystemResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/system_roles_category_response.rb b/emass_client/ruby_client/lib/emass_client/models/system_roles_category_response.rb deleted file mode 100644 index eb623c2..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/system_roles_category_response.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class SystemRolesCategoryResponse - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::SystemRolesCategoryResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemRolesCategoryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/system_roles_response.rb b/emass_client/ruby_client/lib/emass_client/models/system_roles_response.rb deleted file mode 100644 index 162847c..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/system_roles_response.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class SystemRolesResponse - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::SystemRolesResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemRolesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/system_roles_response_data.rb b/emass_client/ruby_client/lib/emass_client/models/system_roles_response_data.rb deleted file mode 100644 index c29be35..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/system_roles_response_data.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class SystemRolesResponseData - attr_accessor :role_category - - attr_accessor :role - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'role_category' => :'roleCategory', - :'role' => :'role' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'role_category' => :'Object', - :'role' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::SystemRolesResponseData` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemRolesResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'role_category') - self.role_category = attributes[:'role_category'] - else - self.role_category = 'PAC' - end - - if attributes.key?(:'role') - self.role = attributes[:'role'] - else - self.role = 'PM/IAM' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - role_category == o.role_category && - role == o.role - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [role_category, role].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/systems.rb b/emass_client/ruby_client/lib/emass_client/models/systems.rb deleted file mode 100644 index d1f5277..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/systems.rb +++ /dev/null @@ -1,1137 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Systems - # [Read-only] Unique system record identifier. - attr_accessor :system_id - - # [Read-only] RMF/DIACAP Policy identifier for the system record. - attr_accessor :policy - - # [Read-Only] Registration types parameters (assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider.) - attr_accessor :registration_type - - # [Read-only] Name of the system record. - attr_accessor :name - - # [Read-only] Acronym of the system record. - attr_accessor :acronym - - # [Read-only] Description of the system record. - attr_accessor :description - - # [Read-only] Owning organization of the system record. - attr_accessor :system_owner - - # [Read-only] Name of the top-level component that owns the system (e.g. Navy, Air Force, Army, etc..). - attr_accessor :organization_name - - # [Read-only] Secondary organization that owns the system record (i.e. Sub-Organization-level. - attr_accessor :secondary_organization - - # [Read-only] Version/Release Number of system record. - attr_accessor :version_release_no - - # [Read-only] Type of the system record. RMF values include the following options (IS Major Application, IS Enclave, Platform IT System). DIACAP values include the following options (Platform IT, Interconnection, AIS Application) - attr_accessor :system_type - - # [Read-only] Is the system record a National Security System? - attr_accessor :is_nss - - # [Read-only] Does the system record have a public facing component/presence. - attr_accessor :is_public_facing - - # [Read-only] Corresponding Cyber Operational Attributes Management System (COAMS) identifier for the system record. - attr_accessor :coams_id - - # [Read-only] Identifies if system is a Type Authorization. - attr_accessor :is_type_authorization - - # [Read-only] DITPR ID of the system record. - attr_accessor :ditpr_id - - # [Read-only] Authorization Status of the system record. - attr_accessor :authorization_status - - # [Read-only] Authorization Date of the system record. - attr_accessor :authorization_date - - # [Read-only] Authorization Termination Date of the system record. - attr_accessor :authorization_termination_date - - # [Read-only] Length of system’s Authorization. Calculated based off of Authorization Date & Authorization Termination Date. - attr_accessor :authorization_length - - # [Read-only] Terms/Conditions for receiving and maintaining the system’s Authorization. Assigned by the Authorizing Official. - attr_accessor :terms_for_auth - - # [Read-only] Status of the approval of the system’s RMF Security Plan. Values include the following options (Approved, Denied, Not Yet Approved). - attr_accessor :security_plan_approval_status - - # [Read-only] Approval date of the system’s RMF Security Plan. - attr_accessor :security_plan_approval_date - - # [Read-only] Mission Criticality of the system record. Values include the following options (Mission Critical (MC), Mission Essential (ME), Mission Support (MS). - attr_accessor :mission_criticality - - # [Read-only] Geographical Association of the system record (VA only). - attr_accessor :geographical_association - - # [Read-only] Ownership of the system record (VA only). - attr_accessor :system_ownership - - # [Read-only] Governing Mission Area of the system record. - attr_accessor :governing_mission_area - - # [Read-only] Primary functional area of the system record. - attr_accessor :primary_functional_area - - # [Read-only] Secondary functional area of the system record. - attr_accessor :secondary_functional_area - - # [Read-only] Primary Control Set of the system record. RMF values include the following options (NIST SP 800-53 Revision 4), DIACAP values include the following options (DoDI 8500.2) - attr_accessor :primary_control_set - - # [Read-only] Confidentiality of the system record. RMF values include the following options (High, Moderate, Low) - attr_accessor :confidentiality - - # [Read-only] Integrity of the system record. RMF values include the following options (High, Moderate, Low) - attr_accessor :integrity - - # [Read-only] Availability of the system record. RMF values include the following options (High, Moderate, Low) - attr_accessor :availability - - # [Read-only] Overlays applied to the system record. - attr_accessor :applied_overlays - - # [Read-only] RMF Activity of the system record. - attr_accessor :rmf_activity - - # [Read-only] Cross Domain Tickets of the system record. - attr_accessor :cross_domain_ticket - - # [Read-Only] DITPR-DON identifier of the system record. - attr_accessor :ditpr_don_id - - # [Read-Only] MAC level of the system record. - attr_accessor :mac - - # [Read-Only] DoD Confidentiality level of the system record. - attr_accessor :dod_confidentiality - - # [Read-only] Has the system record’s Contingency Plan been tested? - attr_accessor :contingency_plan_tested - - # [Read-only] Date the system record’s Contingency Plan was tested. - attr_accessor :contingency_plan_test_date - - # [Read-only] Date the system record’s Annual Security Review was conducted. - attr_accessor :security_review_date - - # [Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item? - attr_accessor :has_open_poam_item - - # [Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item 90 to 120 days past its Scheduled Completion Date? - attr_accessor :has_open_poam_item90to120_past_scheduled_completion_date - - # [Read-Only] Does the system record have an Ongoing or Risk Accepted POA&M Item 120 days past its Scheduled Completion Date? - attr_accessor :has_open_poam_item120_plus_past_scheudled_completion_date - - # [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High) - attr_accessor :impact - - # [Read-only] Does the system record contain and/or process Controlled Unclassified information? - attr_accessor :has_cui - - # [Read-only] Does the system record contain and/or process Personally Identifiable Information? - attr_accessor :has_pii - - # [Read-only] Does the system record contain and/or process Personal Health Information? - attr_accessor :has_phi - - # [Read-only] Unique identifier for the DoD’s Ports, Protocols, and Services Management Registry system. - attr_accessor :ppsm_registry_number - - # [Read-only] Identify the interconnected information systems and corresponding identifiers within control CA-3. - attr_accessor :interconnected_information_system_and_identifiers - - # [Read-only] Does the system require a Privacy Impact Assessment? - attr_accessor :is_pia_required - - # [Read-only] Status of the PIA, availability values include the following options (Not Started, In Progress, Completed) - attr_accessor :pia_status - - # [Read-only] Date in which the system’s PIA took place. - attr_accessor :pia_date - - # [Read-only] User-defined field to augment Ad Hoc Reporting. - attr_accessor :user_defined_field1 - - # [Read-only] User-defined field to augment Ad Hoc Reporting. - attr_accessor :user_defined_field2 - - # [Read-only] User-defined field to augment Ad Hoc Reporting. - attr_accessor :user_defined_field3 - - # [Read-only] User-defined field to augment Ad Hoc Reporting. - attr_accessor :user_defined_field4 - - # [Read-only] User-defined field to augment Ad Hoc Reporting. - attr_accessor :user_defined_field5 - - # [Read-only] Displays the system’s current step within the RMF Lifecycle. - attr_accessor :current_rmf_lifecycle_step - - # [Read-only] Include any additional information required by the organization. - attr_accessor :other_information - - # [Read-only] Indicates if the system reports to the DoD Cyber Hygiene Scorecard. - attr_accessor :reports_for_scorecard - - attr_accessor :package - - attr_accessor :connectivity_ccsd - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'policy' => :'policy', - :'registration_type' => :'registrationType', - :'name' => :'name', - :'acronym' => :'acronym', - :'description' => :'description', - :'system_owner' => :'systemOwner', - :'organization_name' => :'organizationName', - :'secondary_organization' => :'secondaryOrganization', - :'version_release_no' => :'versionReleaseNo', - :'system_type' => :'systemType', - :'is_nss' => :'isNSS', - :'is_public_facing' => :'isPublicFacing', - :'coams_id' => :'coamsId', - :'is_type_authorization' => :'isTypeAuthorization', - :'ditpr_id' => :'ditprId', - :'authorization_status' => :'authorizationStatus', - :'authorization_date' => :'authorizationDate', - :'authorization_termination_date' => :'authorizationTerminationDate', - :'authorization_length' => :'authorizationLength', - :'terms_for_auth' => :'termsForAuth', - :'security_plan_approval_status' => :'securityPlanApprovalStatus', - :'security_plan_approval_date' => :'securityPlanApprovalDate', - :'mission_criticality' => :'missionCriticality', - :'geographical_association' => :'geographicalAssociation', - :'system_ownership' => :'systemOwnership', - :'governing_mission_area' => :'governingMissionArea', - :'primary_functional_area' => :'primaryFunctionalArea', - :'secondary_functional_area' => :'secondaryFunctionalArea', - :'primary_control_set' => :'primaryControlSet', - :'confidentiality' => :'confidentiality', - :'integrity' => :'integrity', - :'availability' => :'availability', - :'applied_overlays' => :'appliedOverlays', - :'rmf_activity' => :'rmfActivity', - :'cross_domain_ticket' => :'crossDomainTicket', - :'ditpr_don_id' => :'ditprDonId', - :'mac' => :'mac', - :'dod_confidentiality' => :'dodConfidentiality', - :'contingency_plan_tested' => :'contingencyPlanTested', - :'contingency_plan_test_date' => :'contingencyPlanTestDate', - :'security_review_date' => :'securityReviewDate', - :'has_open_poam_item' => :'hasOpenPoamItem', - :'has_open_poam_item90to120_past_scheduled_completion_date' => :'hasOpenPoamItem90to120PastScheduledCompletionDate', - :'has_open_poam_item120_plus_past_scheudled_completion_date' => :'hasOpenPoamItem120PlusPastScheudledCompletionDate', - :'impact' => :'impact', - :'has_cui' => :'hasCUI', - :'has_pii' => :'hasPII', - :'has_phi' => :'hasPHI', - :'ppsm_registry_number' => :'ppsmRegistryNumber', - :'interconnected_information_system_and_identifiers' => :'interconnectedInformationSystemAndIdentifiers', - :'is_pia_required' => :'isPiaRequired', - :'pia_status' => :'piaStatus', - :'pia_date' => :'piaDate', - :'user_defined_field1' => :'userDefinedField1', - :'user_defined_field2' => :'userDefinedField2', - :'user_defined_field3' => :'userDefinedField3', - :'user_defined_field4' => :'userDefinedField4', - :'user_defined_field5' => :'userDefinedField5', - :'current_rmf_lifecycle_step' => :'currentRmfLifecycleStep', - :'other_information' => :'otherInformation', - :'reports_for_scorecard' => :'reportsForScorecard', - :'package' => :'package', - :'connectivity_ccsd' => :'connectivityCcsd' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'policy' => :'Object', - :'registration_type' => :'Object', - :'name' => :'Object', - :'acronym' => :'Object', - :'description' => :'Object', - :'system_owner' => :'Object', - :'organization_name' => :'Object', - :'secondary_organization' => :'Object', - :'version_release_no' => :'Object', - :'system_type' => :'Object', - :'is_nss' => :'Object', - :'is_public_facing' => :'Object', - :'coams_id' => :'Object', - :'is_type_authorization' => :'Object', - :'ditpr_id' => :'Object', - :'authorization_status' => :'Object', - :'authorization_date' => :'Object', - :'authorization_termination_date' => :'Object', - :'authorization_length' => :'Object', - :'terms_for_auth' => :'Object', - :'security_plan_approval_status' => :'Object', - :'security_plan_approval_date' => :'Object', - :'mission_criticality' => :'Object', - :'geographical_association' => :'Object', - :'system_ownership' => :'Object', - :'governing_mission_area' => :'Object', - :'primary_functional_area' => :'Object', - :'secondary_functional_area' => :'Object', - :'primary_control_set' => :'Object', - :'confidentiality' => :'Object', - :'integrity' => :'Object', - :'availability' => :'Object', - :'applied_overlays' => :'Object', - :'rmf_activity' => :'Object', - :'cross_domain_ticket' => :'Object', - :'ditpr_don_id' => :'Object', - :'mac' => :'Object', - :'dod_confidentiality' => :'Object', - :'contingency_plan_tested' => :'Object', - :'contingency_plan_test_date' => :'Object', - :'security_review_date' => :'Object', - :'has_open_poam_item' => :'Object', - :'has_open_poam_item90to120_past_scheduled_completion_date' => :'Object', - :'has_open_poam_item120_plus_past_scheudled_completion_date' => :'Object', - :'impact' => :'Object', - :'has_cui' => :'Object', - :'has_pii' => :'Object', - :'has_phi' => :'Object', - :'ppsm_registry_number' => :'Object', - :'interconnected_information_system_and_identifiers' => :'Object', - :'is_pia_required' => :'Object', - :'pia_status' => :'Object', - :'pia_date' => :'Object', - :'user_defined_field1' => :'Object', - :'user_defined_field2' => :'Object', - :'user_defined_field3' => :'Object', - :'user_defined_field4' => :'Object', - :'user_defined_field5' => :'Object', - :'current_rmf_lifecycle_step' => :'Object', - :'other_information' => :'Object', - :'reports_for_scorecard' => :'Object', - :'package' => :'Object', - :'connectivity_ccsd' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Systems` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Systems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'policy') - self.policy = attributes[:'policy'] - end - - if attributes.key?(:'registration_type') - self.registration_type = attributes[:'registration_type'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'acronym') - self.acronym = attributes[:'acronym'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'system_owner') - self.system_owner = attributes[:'system_owner'] - end - - if attributes.key?(:'organization_name') - self.organization_name = attributes[:'organization_name'] - end - - if attributes.key?(:'secondary_organization') - self.secondary_organization = attributes[:'secondary_organization'] - end - - if attributes.key?(:'version_release_no') - self.version_release_no = attributes[:'version_release_no'] - end - - if attributes.key?(:'system_type') - self.system_type = attributes[:'system_type'] - end - - if attributes.key?(:'is_nss') - self.is_nss = attributes[:'is_nss'] - end - - if attributes.key?(:'is_public_facing') - self.is_public_facing = attributes[:'is_public_facing'] - end - - if attributes.key?(:'coams_id') - self.coams_id = attributes[:'coams_id'] - end - - if attributes.key?(:'is_type_authorization') - self.is_type_authorization = attributes[:'is_type_authorization'] - end - - if attributes.key?(:'ditpr_id') - self.ditpr_id = attributes[:'ditpr_id'] - end - - if attributes.key?(:'authorization_status') - self.authorization_status = attributes[:'authorization_status'] - end - - if attributes.key?(:'authorization_date') - self.authorization_date = attributes[:'authorization_date'] - end - - if attributes.key?(:'authorization_termination_date') - self.authorization_termination_date = attributes[:'authorization_termination_date'] - end - - if attributes.key?(:'authorization_length') - self.authorization_length = attributes[:'authorization_length'] - end - - if attributes.key?(:'terms_for_auth') - self.terms_for_auth = attributes[:'terms_for_auth'] - end - - if attributes.key?(:'security_plan_approval_status') - self.security_plan_approval_status = attributes[:'security_plan_approval_status'] - end - - if attributes.key?(:'security_plan_approval_date') - self.security_plan_approval_date = attributes[:'security_plan_approval_date'] - end - - if attributes.key?(:'mission_criticality') - self.mission_criticality = attributes[:'mission_criticality'] - end - - if attributes.key?(:'geographical_association') - self.geographical_association = attributes[:'geographical_association'] - end - - if attributes.key?(:'system_ownership') - self.system_ownership = attributes[:'system_ownership'] - end - - if attributes.key?(:'governing_mission_area') - self.governing_mission_area = attributes[:'governing_mission_area'] - end - - if attributes.key?(:'primary_functional_area') - self.primary_functional_area = attributes[:'primary_functional_area'] - end - - if attributes.key?(:'secondary_functional_area') - self.secondary_functional_area = attributes[:'secondary_functional_area'] - end - - if attributes.key?(:'primary_control_set') - self.primary_control_set = attributes[:'primary_control_set'] - end - - if attributes.key?(:'confidentiality') - self.confidentiality = attributes[:'confidentiality'] - end - - if attributes.key?(:'integrity') - self.integrity = attributes[:'integrity'] - end - - if attributes.key?(:'availability') - self.availability = attributes[:'availability'] - end - - if attributes.key?(:'applied_overlays') - self.applied_overlays = attributes[:'applied_overlays'] - end - - if attributes.key?(:'rmf_activity') - self.rmf_activity = attributes[:'rmf_activity'] - end - - if attributes.key?(:'cross_domain_ticket') - self.cross_domain_ticket = attributes[:'cross_domain_ticket'] - end - - if attributes.key?(:'ditpr_don_id') - self.ditpr_don_id = attributes[:'ditpr_don_id'] - end - - if attributes.key?(:'mac') - self.mac = attributes[:'mac'] - end - - if attributes.key?(:'dod_confidentiality') - self.dod_confidentiality = attributes[:'dod_confidentiality'] - end - - if attributes.key?(:'contingency_plan_tested') - self.contingency_plan_tested = attributes[:'contingency_plan_tested'] - end - - if attributes.key?(:'contingency_plan_test_date') - self.contingency_plan_test_date = attributes[:'contingency_plan_test_date'] - end - - if attributes.key?(:'security_review_date') - self.security_review_date = attributes[:'security_review_date'] - end - - if attributes.key?(:'has_open_poam_item') - self.has_open_poam_item = attributes[:'has_open_poam_item'] - end - - if attributes.key?(:'has_open_poam_item90to120_past_scheduled_completion_date') - self.has_open_poam_item90to120_past_scheduled_completion_date = attributes[:'has_open_poam_item90to120_past_scheduled_completion_date'] - end - - if attributes.key?(:'has_open_poam_item120_plus_past_scheudled_completion_date') - self.has_open_poam_item120_plus_past_scheudled_completion_date = attributes[:'has_open_poam_item120_plus_past_scheudled_completion_date'] - end - - if attributes.key?(:'impact') - self.impact = attributes[:'impact'] - end - - if attributes.key?(:'has_cui') - self.has_cui = attributes[:'has_cui'] - end - - if attributes.key?(:'has_pii') - self.has_pii = attributes[:'has_pii'] - end - - if attributes.key?(:'has_phi') - self.has_phi = attributes[:'has_phi'] - end - - if attributes.key?(:'ppsm_registry_number') - self.ppsm_registry_number = attributes[:'ppsm_registry_number'] - end - - if attributes.key?(:'interconnected_information_system_and_identifiers') - self.interconnected_information_system_and_identifiers = attributes[:'interconnected_information_system_and_identifiers'] - end - - if attributes.key?(:'is_pia_required') - self.is_pia_required = attributes[:'is_pia_required'] - end - - if attributes.key?(:'pia_status') - self.pia_status = attributes[:'pia_status'] - end - - if attributes.key?(:'pia_date') - self.pia_date = attributes[:'pia_date'] - end - - if attributes.key?(:'user_defined_field1') - self.user_defined_field1 = attributes[:'user_defined_field1'] - end - - if attributes.key?(:'user_defined_field2') - self.user_defined_field2 = attributes[:'user_defined_field2'] - end - - if attributes.key?(:'user_defined_field3') - self.user_defined_field3 = attributes[:'user_defined_field3'] - end - - if attributes.key?(:'user_defined_field4') - self.user_defined_field4 = attributes[:'user_defined_field4'] - end - - if attributes.key?(:'user_defined_field5') - self.user_defined_field5 = attributes[:'user_defined_field5'] - end - - if attributes.key?(:'current_rmf_lifecycle_step') - self.current_rmf_lifecycle_step = attributes[:'current_rmf_lifecycle_step'] - end - - if attributes.key?(:'other_information') - self.other_information = attributes[:'other_information'] - end - - if attributes.key?(:'reports_for_scorecard') - self.reports_for_scorecard = attributes[:'reports_for_scorecard'] - end - - if attributes.key?(:'package') - if (value = attributes[:'package']).is_a?(Array) - self.package = value - end - end - - if attributes.key?(:'connectivity_ccsd') - if (value = attributes[:'connectivity_ccsd']).is_a?(Array) - self.connectivity_ccsd = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - policy_validator = EnumAttributeValidator.new('Object', ['RMF', 'DIACAP']) - return false unless policy_validator.valid?(@policy) - registration_type_validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Guest', 'Regular', 'Functional', 'Cloud Service Provider', 'Common Control Provider']) - return false unless registration_type_validator.valid?(@registration_type) - organization_name_validator = EnumAttributeValidator.new('Object', ['Army', 'Navy', 'Air Force', 'Marines', 'DoD', 'Defense Information Systems Agency']) - return false unless organization_name_validator.valid?(@organization_name) - system_type_validator = EnumAttributeValidator.new('Object', ['IS Major Application', 'IS Enclave', 'Platform IT', 'Platform IT System', 'Platform IT Interconnection', 'AIS Application', 'Outsourced IT-Based Process (DoD-controlled)', 'Enclave', 'Outsourced IT-Based Process (service provider shared)']) - return false unless system_type_validator.valid?(@system_type) - authorization_status_validator = EnumAttributeValidator.new('Object', ['Authority to Operate (ATO)', 'Authority to Operate with Conditions (ATO) w/Conditions)', 'Interim Authority to Test (IATT)', 'Interim Authority to Operate (IATO)', 'Denied Authority to Operate (DATO)', 'Not Yet Authorized', 'Unaccredited', 'Decommissioned']) - return false unless authorization_status_validator.valid?(@authorization_status) - security_plan_approval_status_validator = EnumAttributeValidator.new('Object', ['Approved', 'Not Yet Approved', 'Denied']) - return false unless security_plan_approval_status_validator.valid?(@security_plan_approval_status) - mission_criticality_validator = EnumAttributeValidator.new('Object', ['Mission Critical (MC)', 'Mission Essential (ME)', 'Mission Support (MS)']) - return false unless mission_criticality_validator.valid?(@mission_criticality) - geographical_association_validator = EnumAttributeValidator.new('Object', ['VA Operated IS', 'non-VA Operated IS']) - return false unless geographical_association_validator.valid?(@geographical_association) - system_ownership_validator = EnumAttributeValidator.new('Object', ['Region 1', 'Region 2', 'Region 3', 'Region 4']) - return false unless system_ownership_validator.valid?(@system_ownership) - governing_mission_area_validator = EnumAttributeValidator.new('Object', ['Business MA (BMA)', 'DoD portion of the Intelligence MA (DIMA)', 'Enterprise Information Environment MA (EIEMA)', 'Warfighting MA (WMA)']) - return false unless governing_mission_area_validator.valid?(@governing_mission_area) - primary_functional_area_validator = EnumAttributeValidator.new('Object', ['Allies', 'CBRNE', 'Civilian Personnel & Readiness', 'Command and Control', 'Communications', 'Communications Security (COMSEC)', 'Economic', 'Environmental Security', 'Facilities', 'Finance', 'Health/Medical', 'Human Resources', 'Information Management', 'Inspector General', 'Intelligence', 'Logistics', 'Military Personnel and Readiness', 'Nuclear', 'Nuclear, Chemical, and Biological', 'Operations', 'Personnel and Readiness', 'Procurement/Acquisition', 'Reserve Components', 'Scientific and Engineering', 'Space and Weather', 'Test and Evaluation', 'Trainers', 'Weapons', 'Legal', 'Transportation', 'Not Applicable (N/A)', 'Integration and Testing']) - return false unless primary_functional_area_validator.valid?(@primary_functional_area) - secondary_functional_area_validator = EnumAttributeValidator.new('Object', ['Allies', 'CBRNE', 'Civilian Personnel & Readiness', 'Command and Control', 'Communications', 'Communications Security (COMSEC)', 'Economic', 'Environmental Security', 'Facilities', 'Finance', 'Health/Medical', 'Human Resources', 'Information Management', 'Inspector General', 'Intelligence', 'Logistics', 'Military Personnel and Readiness', 'Nuclear', 'Nuclear, Chemical, and Biological', 'Operations', 'Personnel and Readiness', 'Procurement/Acquisition', 'Reserve Components', 'Scientific and Engineering', 'Space and Weather', 'Test and Evaluation', 'Trainers', 'Weapons', 'Legal', 'Transportation', 'Not Applicable (N/A)', 'Integration and Testing']) - return false unless secondary_functional_area_validator.valid?(@secondary_functional_area) - primary_control_set_validator = EnumAttributeValidator.new('Object', ['NIST SP 800-53 Revision 4', 'DoDI 8500.2']) - return false unless primary_control_set_validator.valid?(@primary_control_set) - confidentiality_validator = EnumAttributeValidator.new('Object', ['High', 'Moderate', 'Low']) - return false unless confidentiality_validator.valid?(@confidentiality) - integrity_validator = EnumAttributeValidator.new('Object', ['High', 'Moderate', 'Low']) - return false unless integrity_validator.valid?(@integrity) - availability_validator = EnumAttributeValidator.new('Object', ['High', 'Moderate', 'Low']) - return false unless availability_validator.valid?(@availability) - applied_overlays_validator = EnumAttributeValidator.new('Object', ['Classified Information', 'Privacy', 'Cross Domain Solution (CDS)', 'Financial Management', 'Intelligence', 'Nuclear Command, Communication, Control Systems (NC3)', 'Cloud Service Provider (CSP)']) - return false unless applied_overlays_validator.valid?(@applied_overlays) - rmf_activity_validator = EnumAttributeValidator.new('Object', ['Initiate and plan C&A', 'Initiate and plan cybersecurity Assessment Authorization', 'Implement and validate assigned security controls', 'Make assessment determination and authorization decision', 'Maintain ATO and conduct reviews', 'Decommission']) - return false unless rmf_activity_validator.valid?(@rmf_activity) - mac_validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - return false unless mac_validator.valid?(@mac) - dod_confidentiality_validator = EnumAttributeValidator.new('Object', ['Public', 'Sensitive', 'Classified']) - return false unless dod_confidentiality_validator.valid?(@dod_confidentiality) - impact_validator = EnumAttributeValidator.new('Object', ['low', 'Moderate', 'High']) - return false unless impact_validator.valid?(@impact) - pia_status_validator = EnumAttributeValidator.new('Object', ['Not Started', 'In Progress', 'Completed']) - return false unless pia_status_validator.valid?(@pia_status) - current_rmf_lifecycle_step_validator = EnumAttributeValidator.new('Object', ['1 – Categorize', '2 – Select', '3 – Implement', '4 – Assess', '5 – Authorize', '6 – Monitor']) - return false unless current_rmf_lifecycle_step_validator.valid?(@current_rmf_lifecycle_step) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] policy Object to be assigned - def policy=(policy) - validator = EnumAttributeValidator.new('Object', ['RMF', 'DIACAP']) - unless validator.valid?(policy) - fail ArgumentError, "invalid value for \"policy\", must be one of #{validator.allowable_values}." - end - @policy = policy - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] registration_type Object to be assigned - def registration_type=(registration_type) - validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Guest', 'Regular', 'Functional', 'Cloud Service Provider', 'Common Control Provider']) - unless validator.valid?(registration_type) - fail ArgumentError, "invalid value for \"registration_type\", must be one of #{validator.allowable_values}." - end - @registration_type = registration_type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] organization_name Object to be assigned - def organization_name=(organization_name) - validator = EnumAttributeValidator.new('Object', ['Army', 'Navy', 'Air Force', 'Marines', 'DoD', 'Defense Information Systems Agency']) - unless validator.valid?(organization_name) - fail ArgumentError, "invalid value for \"organization_name\", must be one of #{validator.allowable_values}." - end - @organization_name = organization_name - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] system_type Object to be assigned - def system_type=(system_type) - validator = EnumAttributeValidator.new('Object', ['IS Major Application', 'IS Enclave', 'Platform IT', 'Platform IT System', 'Platform IT Interconnection', 'AIS Application', 'Outsourced IT-Based Process (DoD-controlled)', 'Enclave', 'Outsourced IT-Based Process (service provider shared)']) - unless validator.valid?(system_type) - fail ArgumentError, "invalid value for \"system_type\", must be one of #{validator.allowable_values}." - end - @system_type = system_type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] authorization_status Object to be assigned - def authorization_status=(authorization_status) - validator = EnumAttributeValidator.new('Object', ['Authority to Operate (ATO)', 'Authority to Operate with Conditions (ATO) w/Conditions)', 'Interim Authority to Test (IATT)', 'Interim Authority to Operate (IATO)', 'Denied Authority to Operate (DATO)', 'Not Yet Authorized', 'Unaccredited', 'Decommissioned']) - unless validator.valid?(authorization_status) - fail ArgumentError, "invalid value for \"authorization_status\", must be one of #{validator.allowable_values}." - end - @authorization_status = authorization_status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] security_plan_approval_status Object to be assigned - def security_plan_approval_status=(security_plan_approval_status) - validator = EnumAttributeValidator.new('Object', ['Approved', 'Not Yet Approved', 'Denied']) - unless validator.valid?(security_plan_approval_status) - fail ArgumentError, "invalid value for \"security_plan_approval_status\", must be one of #{validator.allowable_values}." - end - @security_plan_approval_status = security_plan_approval_status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] mission_criticality Object to be assigned - def mission_criticality=(mission_criticality) - validator = EnumAttributeValidator.new('Object', ['Mission Critical (MC)', 'Mission Essential (ME)', 'Mission Support (MS)']) - unless validator.valid?(mission_criticality) - fail ArgumentError, "invalid value for \"mission_criticality\", must be one of #{validator.allowable_values}." - end - @mission_criticality = mission_criticality - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] geographical_association Object to be assigned - def geographical_association=(geographical_association) - validator = EnumAttributeValidator.new('Object', ['VA Operated IS', 'non-VA Operated IS']) - unless validator.valid?(geographical_association) - fail ArgumentError, "invalid value for \"geographical_association\", must be one of #{validator.allowable_values}." - end - @geographical_association = geographical_association - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] system_ownership Object to be assigned - def system_ownership=(system_ownership) - validator = EnumAttributeValidator.new('Object', ['Region 1', 'Region 2', 'Region 3', 'Region 4']) - unless validator.valid?(system_ownership) - fail ArgumentError, "invalid value for \"system_ownership\", must be one of #{validator.allowable_values}." - end - @system_ownership = system_ownership - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] governing_mission_area Object to be assigned - def governing_mission_area=(governing_mission_area) - validator = EnumAttributeValidator.new('Object', ['Business MA (BMA)', 'DoD portion of the Intelligence MA (DIMA)', 'Enterprise Information Environment MA (EIEMA)', 'Warfighting MA (WMA)']) - unless validator.valid?(governing_mission_area) - fail ArgumentError, "invalid value for \"governing_mission_area\", must be one of #{validator.allowable_values}." - end - @governing_mission_area = governing_mission_area - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] primary_functional_area Object to be assigned - def primary_functional_area=(primary_functional_area) - validator = EnumAttributeValidator.new('Object', ['Allies', 'CBRNE', 'Civilian Personnel & Readiness', 'Command and Control', 'Communications', 'Communications Security (COMSEC)', 'Economic', 'Environmental Security', 'Facilities', 'Finance', 'Health/Medical', 'Human Resources', 'Information Management', 'Inspector General', 'Intelligence', 'Logistics', 'Military Personnel and Readiness', 'Nuclear', 'Nuclear, Chemical, and Biological', 'Operations', 'Personnel and Readiness', 'Procurement/Acquisition', 'Reserve Components', 'Scientific and Engineering', 'Space and Weather', 'Test and Evaluation', 'Trainers', 'Weapons', 'Legal', 'Transportation', 'Not Applicable (N/A)', 'Integration and Testing']) - unless validator.valid?(primary_functional_area) - fail ArgumentError, "invalid value for \"primary_functional_area\", must be one of #{validator.allowable_values}." - end - @primary_functional_area = primary_functional_area - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] secondary_functional_area Object to be assigned - def secondary_functional_area=(secondary_functional_area) - validator = EnumAttributeValidator.new('Object', ['Allies', 'CBRNE', 'Civilian Personnel & Readiness', 'Command and Control', 'Communications', 'Communications Security (COMSEC)', 'Economic', 'Environmental Security', 'Facilities', 'Finance', 'Health/Medical', 'Human Resources', 'Information Management', 'Inspector General', 'Intelligence', 'Logistics', 'Military Personnel and Readiness', 'Nuclear', 'Nuclear, Chemical, and Biological', 'Operations', 'Personnel and Readiness', 'Procurement/Acquisition', 'Reserve Components', 'Scientific and Engineering', 'Space and Weather', 'Test and Evaluation', 'Trainers', 'Weapons', 'Legal', 'Transportation', 'Not Applicable (N/A)', 'Integration and Testing']) - unless validator.valid?(secondary_functional_area) - fail ArgumentError, "invalid value for \"secondary_functional_area\", must be one of #{validator.allowable_values}." - end - @secondary_functional_area = secondary_functional_area - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] primary_control_set Object to be assigned - def primary_control_set=(primary_control_set) - validator = EnumAttributeValidator.new('Object', ['NIST SP 800-53 Revision 4', 'DoDI 8500.2']) - unless validator.valid?(primary_control_set) - fail ArgumentError, "invalid value for \"primary_control_set\", must be one of #{validator.allowable_values}." - end - @primary_control_set = primary_control_set - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] confidentiality Object to be assigned - def confidentiality=(confidentiality) - validator = EnumAttributeValidator.new('Object', ['High', 'Moderate', 'Low']) - unless validator.valid?(confidentiality) - fail ArgumentError, "invalid value for \"confidentiality\", must be one of #{validator.allowable_values}." - end - @confidentiality = confidentiality - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] integrity Object to be assigned - def integrity=(integrity) - validator = EnumAttributeValidator.new('Object', ['High', 'Moderate', 'Low']) - unless validator.valid?(integrity) - fail ArgumentError, "invalid value for \"integrity\", must be one of #{validator.allowable_values}." - end - @integrity = integrity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] availability Object to be assigned - def availability=(availability) - validator = EnumAttributeValidator.new('Object', ['High', 'Moderate', 'Low']) - unless validator.valid?(availability) - fail ArgumentError, "invalid value for \"availability\", must be one of #{validator.allowable_values}." - end - @availability = availability - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] applied_overlays Object to be assigned - def applied_overlays=(applied_overlays) - validator = EnumAttributeValidator.new('Object', ['Classified Information', 'Privacy', 'Cross Domain Solution (CDS)', 'Financial Management', 'Intelligence', 'Nuclear Command, Communication, Control Systems (NC3)', 'Cloud Service Provider (CSP)']) - unless validator.valid?(applied_overlays) - fail ArgumentError, "invalid value for \"applied_overlays\", must be one of #{validator.allowable_values}." - end - @applied_overlays = applied_overlays - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] rmf_activity Object to be assigned - def rmf_activity=(rmf_activity) - validator = EnumAttributeValidator.new('Object', ['Initiate and plan C&A', 'Initiate and plan cybersecurity Assessment Authorization', 'Implement and validate assigned security controls', 'Make assessment determination and authorization decision', 'Maintain ATO and conduct reviews', 'Decommission']) - unless validator.valid?(rmf_activity) - fail ArgumentError, "invalid value for \"rmf_activity\", must be one of #{validator.allowable_values}." - end - @rmf_activity = rmf_activity - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] mac Object to be assigned - def mac=(mac) - validator = EnumAttributeValidator.new('Object', ['I', 'II', 'III']) - unless validator.valid?(mac) - fail ArgumentError, "invalid value for \"mac\", must be one of #{validator.allowable_values}." - end - @mac = mac - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] dod_confidentiality Object to be assigned - def dod_confidentiality=(dod_confidentiality) - validator = EnumAttributeValidator.new('Object', ['Public', 'Sensitive', 'Classified']) - unless validator.valid?(dod_confidentiality) - fail ArgumentError, "invalid value for \"dod_confidentiality\", must be one of #{validator.allowable_values}." - end - @dod_confidentiality = dod_confidentiality - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] impact Object to be assigned - def impact=(impact) - validator = EnumAttributeValidator.new('Object', ['low', 'Moderate', 'High']) - unless validator.valid?(impact) - fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}." - end - @impact = impact - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] pia_status Object to be assigned - def pia_status=(pia_status) - validator = EnumAttributeValidator.new('Object', ['Not Started', 'In Progress', 'Completed']) - unless validator.valid?(pia_status) - fail ArgumentError, "invalid value for \"pia_status\", must be one of #{validator.allowable_values}." - end - @pia_status = pia_status - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] current_rmf_lifecycle_step Object to be assigned - def current_rmf_lifecycle_step=(current_rmf_lifecycle_step) - validator = EnumAttributeValidator.new('Object', ['1 – Categorize', '2 – Select', '3 – Implement', '4 – Assess', '5 – Authorize', '6 – Monitor']) - unless validator.valid?(current_rmf_lifecycle_step) - fail ArgumentError, "invalid value for \"current_rmf_lifecycle_step\", must be one of #{validator.allowable_values}." - end - @current_rmf_lifecycle_step = current_rmf_lifecycle_step - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - policy == o.policy && - registration_type == o.registration_type && - name == o.name && - acronym == o.acronym && - description == o.description && - system_owner == o.system_owner && - organization_name == o.organization_name && - secondary_organization == o.secondary_organization && - version_release_no == o.version_release_no && - system_type == o.system_type && - is_nss == o.is_nss && - is_public_facing == o.is_public_facing && - coams_id == o.coams_id && - is_type_authorization == o.is_type_authorization && - ditpr_id == o.ditpr_id && - authorization_status == o.authorization_status && - authorization_date == o.authorization_date && - authorization_termination_date == o.authorization_termination_date && - authorization_length == o.authorization_length && - terms_for_auth == o.terms_for_auth && - security_plan_approval_status == o.security_plan_approval_status && - security_plan_approval_date == o.security_plan_approval_date && - mission_criticality == o.mission_criticality && - geographical_association == o.geographical_association && - system_ownership == o.system_ownership && - governing_mission_area == o.governing_mission_area && - primary_functional_area == o.primary_functional_area && - secondary_functional_area == o.secondary_functional_area && - primary_control_set == o.primary_control_set && - confidentiality == o.confidentiality && - integrity == o.integrity && - availability == o.availability && - applied_overlays == o.applied_overlays && - rmf_activity == o.rmf_activity && - cross_domain_ticket == o.cross_domain_ticket && - ditpr_don_id == o.ditpr_don_id && - mac == o.mac && - dod_confidentiality == o.dod_confidentiality && - contingency_plan_tested == o.contingency_plan_tested && - contingency_plan_test_date == o.contingency_plan_test_date && - security_review_date == o.security_review_date && - has_open_poam_item == o.has_open_poam_item && - has_open_poam_item90to120_past_scheduled_completion_date == o.has_open_poam_item90to120_past_scheduled_completion_date && - has_open_poam_item120_plus_past_scheudled_completion_date == o.has_open_poam_item120_plus_past_scheudled_completion_date && - impact == o.impact && - has_cui == o.has_cui && - has_pii == o.has_pii && - has_phi == o.has_phi && - ppsm_registry_number == o.ppsm_registry_number && - interconnected_information_system_and_identifiers == o.interconnected_information_system_and_identifiers && - is_pia_required == o.is_pia_required && - pia_status == o.pia_status && - pia_date == o.pia_date && - user_defined_field1 == o.user_defined_field1 && - user_defined_field2 == o.user_defined_field2 && - user_defined_field3 == o.user_defined_field3 && - user_defined_field4 == o.user_defined_field4 && - user_defined_field5 == o.user_defined_field5 && - current_rmf_lifecycle_step == o.current_rmf_lifecycle_step && - other_information == o.other_information && - reports_for_scorecard == o.reports_for_scorecard && - package == o.package && - connectivity_ccsd == o.connectivity_ccsd - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, policy, registration_type, name, acronym, description, system_owner, organization_name, secondary_organization, version_release_no, system_type, is_nss, is_public_facing, coams_id, is_type_authorization, ditpr_id, authorization_status, authorization_date, authorization_termination_date, authorization_length, terms_for_auth, security_plan_approval_status, security_plan_approval_date, mission_criticality, geographical_association, system_ownership, governing_mission_area, primary_functional_area, secondary_functional_area, primary_control_set, confidentiality, integrity, availability, applied_overlays, rmf_activity, cross_domain_ticket, ditpr_don_id, mac, dod_confidentiality, contingency_plan_tested, contingency_plan_test_date, security_review_date, has_open_poam_item, has_open_poam_item90to120_past_scheduled_completion_date, has_open_poam_item120_plus_past_scheudled_completion_date, impact, has_cui, has_pii, has_phi, ppsm_registry_number, interconnected_information_system_and_identifiers, is_pia_required, pia_status, pia_date, user_defined_field1, user_defined_field2, user_defined_field3, user_defined_field4, user_defined_field5, current_rmf_lifecycle_step, other_information, reports_for_scorecard, package, connectivity_ccsd].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test.rb b/emass_client/ruby_client/lib/emass_client/models/test.rb deleted file mode 100644 index 25993c2..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test.rb +++ /dev/null @@ -1,215 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Test - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Test` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Test`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test_data.rb b/emass_client/ruby_client/lib/emass_client/models/test_data.rb deleted file mode 100644 index b201829..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test_data.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class TestData - attr_accessor :success - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'success' => :'success' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'success' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::TestData` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - success == o.success - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [success].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test_results_get.rb b/emass_client/ruby_client/lib/emass_client/models/test_results_get.rb deleted file mode 100644 index 41a03c9..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test_results_get.rb +++ /dev/null @@ -1,333 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class TestResultsGet - # [Required] Unique eMASS identifier. Will need to provide correct number - attr_accessor :system_id - - # [Read-Only] Control acronym associated with the test result. NIST SP 800-53 Revision 4 defined. - attr_accessor :control - - # [Required] CCI associated with test result. - attr_accessor :cci - - # [Read-only] Indicates whether a test result is inherited. - attr_accessor :is_inherited - - # [Required] Last Name, First Name. 100 Characters. - attr_accessor :tested_by - - # [Required] Unix time format. - attr_accessor :test_date - - # [Required] Include description of test result. 4000 Characters. - attr_accessor :description - - # [Read-Only] Indicates the location in the Control Approval Chain when the test result is submitted. - attr_accessor :type - - # [Required] Test result compliance status - attr_accessor :compliance_status - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'system_id' => :'systemId', - :'control' => :'control', - :'cci' => :'cci', - :'is_inherited' => :'isInherited', - :'tested_by' => :'testedBy', - :'test_date' => :'testDate', - :'description' => :'description', - :'type' => :'type', - :'compliance_status' => :'complianceStatus' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'system_id' => :'Object', - :'control' => :'Object', - :'cci' => :'Object', - :'is_inherited' => :'Object', - :'tested_by' => :'Object', - :'test_date' => :'Object', - :'description' => :'Object', - :'type' => :'Object', - :'compliance_status' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::TestResultsGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - - if attributes.key?(:'control') - self.control = attributes[:'control'] - end - - if attributes.key?(:'cci') - self.cci = attributes[:'cci'] - end - - if attributes.key?(:'is_inherited') - self.is_inherited = attributes[:'is_inherited'] - end - - if attributes.key?(:'tested_by') - self.tested_by = attributes[:'tested_by'] - end - - if attributes.key?(:'test_date') - self.test_date = attributes[:'test_date'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'compliance_status') - self.compliance_status = attributes[:'compliance_status'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - type_validator = EnumAttributeValidator.new('Object', ['Self-Assessment', 'Schedule-Assessment', 'Deep Evaluation']) - return false unless type_validator.valid?(@type) - compliance_status_validator = EnumAttributeValidator.new('Object', ['Compliant', 'Non-Compliant', 'Not Applicable']) - return false unless compliance_status_validator.valid?(@compliance_status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] type Object to be assigned - def type=(type) - validator = EnumAttributeValidator.new('Object', ['Self-Assessment', 'Schedule-Assessment', 'Deep Evaluation']) - unless validator.valid?(type) - fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." - end - @type = type - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] compliance_status Object to be assigned - def compliance_status=(compliance_status) - validator = EnumAttributeValidator.new('Object', ['Compliant', 'Non-Compliant', 'Not Applicable']) - unless validator.valid?(compliance_status) - fail ArgumentError, "invalid value for \"compliance_status\", must be one of #{validator.allowable_values}." - end - @compliance_status = compliance_status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - system_id == o.system_id && - control == o.control && - cci == o.cci && - is_inherited == o.is_inherited && - tested_by == o.tested_by && - test_date == o.test_date && - description == o.description && - type == o.type && - compliance_status == o.compliance_status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [system_id, control, cci, is_inherited, tested_by, test_date, description, type, compliance_status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test_results_post.rb b/emass_client/ruby_client/lib/emass_client/models/test_results_post.rb deleted file mode 100644 index e4fb729..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test_results_post.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class TestResultsPost - # CCI associated with test result. - attr_accessor :cci - - # Indicates if operations result (success/fail) - attr_accessor :success - - # The system identifier for the system being updated. - attr_accessor :system_id - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cci' => :'cci', - :'success' => :'success', - :'system_id' => :'systemId' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'cci' => :'Object', - :'success' => :'Object', - :'system_id' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::TestResultsPost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'cci') - self.cci = attributes[:'cci'] - end - - if attributes.key?(:'success') - self.success = attributes[:'success'] - end - - if attributes.key?(:'system_id') - self.system_id = attributes[:'system_id'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - cci == o.cci && - success == o.success && - system_id == o.system_id - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [cci, success, system_id].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test_results_request_post_body.rb b/emass_client/ruby_client/lib/emass_client/models/test_results_request_post_body.rb deleted file mode 100644 index 974677f..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test_results_request_post_body.rb +++ /dev/null @@ -1,306 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class TestResultsRequestPostBody - # [Required] CCI associated with test result. - attr_accessor :cci - - # [Required] Last Name, First Name. 100 Characters. - attr_accessor :tested_by - - # [Required] Unix time format. - attr_accessor :test_date - - # [Required] Include description of test result. 4000 Characters. - attr_accessor :description - - # [Required] Test result compliance status - attr_accessor :compliance_status - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cci' => :'cci', - :'tested_by' => :'testedBy', - :'test_date' => :'testDate', - :'description' => :'description', - :'compliance_status' => :'complianceStatus' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'cci' => :'Object', - :'tested_by' => :'Object', - :'test_date' => :'Object', - :'description' => :'Object', - :'compliance_status' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::TestResultsRequestPostBody` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsRequestPostBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'cci') - self.cci = attributes[:'cci'] - end - - if attributes.key?(:'tested_by') - self.tested_by = attributes[:'tested_by'] - end - - if attributes.key?(:'test_date') - self.test_date = attributes[:'test_date'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'compliance_status') - self.compliance_status = attributes[:'compliance_status'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @cci.nil? - invalid_properties.push('invalid value for "cci", cci cannot be nil.') - end - - if @tested_by.nil? - invalid_properties.push('invalid value for "tested_by", tested_by cannot be nil.') - end - - if @test_date.nil? - invalid_properties.push('invalid value for "test_date", test_date cannot be nil.') - end - - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @compliance_status.nil? - invalid_properties.push('invalid value for "compliance_status", compliance_status cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @cci.nil? - return false if @tested_by.nil? - return false if @test_date.nil? - return false if @description.nil? - return false if @compliance_status.nil? - compliance_status_validator = EnumAttributeValidator.new('Object', ['Compliant', 'Non-Compliant', 'Not Applicable']) - return false unless compliance_status_validator.valid?(@compliance_status) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] compliance_status Object to be assigned - def compliance_status=(compliance_status) - validator = EnumAttributeValidator.new('Object', ['Compliant', 'Non-Compliant', 'Not Applicable']) - unless validator.valid?(compliance_status) - fail ArgumentError, "invalid value for \"compliance_status\", must be one of #{validator.allowable_values}." - end - @compliance_status = compliance_status - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - cci == o.cci && - tested_by == o.tested_by && - test_date == o.test_date && - description == o.description && - compliance_status == o.compliance_status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [cci, tested_by, test_date, description, compliance_status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test_results_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/test_results_response_get.rb deleted file mode 100644 index b58e849..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test_results_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class TestResultsResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::TestResultsResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/test_results_response_post.rb b/emass_client/ruby_client/lib/emass_client/models/test_results_response_post.rb deleted file mode 100644 index 8a69eab..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/test_results_response_post.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class TestResultsResponsePost - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::TestResultsResponsePost` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsResponsePost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/users.rb b/emass_client/ruby_client/lib/emass_client/models/users.rb deleted file mode 100644 index 3bbee58..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/users.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class Users - attr_accessor :first_name - - attr_accessor :last_name - - attr_accessor :email - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'first_name' => :'firstName', - :'last_name' => :'lastName', - :'email' => :'email' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'first_name' => :'Object', - :'last_name' => :'Object', - :'email' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Users` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Users`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'first_name') - self.first_name = attributes[:'first_name'] - end - - if attributes.key?(:'last_name') - self.last_name = attributes[:'last_name'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - first_name == o.first_name && - last_name == o.last_name && - email == o.email - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [first_name, last_name, email].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/workflow_definition_get.rb b/emass_client/ruby_client/lib/emass_client/models/workflow_definition_get.rb deleted file mode 100644 index a7c457d..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/workflow_definition_get.rb +++ /dev/null @@ -1,282 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class WorkflowDefinitionGet - # [Read-Only] Description of the workflow or the stage transition. For stage transitions, this matches the action dropdown that appears for PAC users. - attr_accessor :description - - # [Read-Only] Returns true if the workflow is available to the site. - attr_accessor :is_active - - # [Read-Only] Version of the workflow definition. - attr_accessor :version - - # [Read-Only] The workflow type. - attr_accessor :workflow - - attr_accessor :stages - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'description' => :'description', - :'is_active' => :'isActive', - :'version' => :'version', - :'workflow' => :'workflow', - :'stages' => :'stages' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'description' => :'Object', - :'is_active' => :'Object', - :'version' => :'Object', - :'workflow' => :'Object', - :'stages' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::WorkflowDefinitionGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::WorkflowDefinitionGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'is_active') - self.is_active = attributes[:'is_active'] - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - end - - if attributes.key?(:'workflow') - self.workflow = attributes[:'workflow'] - end - - if attributes.key?(:'stages') - if (value = attributes[:'stages']).is_a?(Array) - self.stages = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - workflow_validator = EnumAttributeValidator.new('Object', ['RMF Step 1: Security Category', 'RMF Step 2: Security Category', 'RMF Step 3: Security Category']) - return false unless workflow_validator.valid?(@workflow) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] workflow Object to be assigned - def workflow=(workflow) - validator = EnumAttributeValidator.new('Object', ['RMF Step 1: Security Category', 'RMF Step 2: Security Category', 'RMF Step 3: Security Category']) - unless validator.valid?(workflow) - fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}." - end - @workflow = workflow - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - is_active == o.is_active && - version == o.version && - workflow == o.workflow && - stages == o.stages - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [description, is_active, version, workflow, stages].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/workflow_definition_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/workflow_definition_response_get.rb deleted file mode 100644 index 2e03137..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/workflow_definition_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class WorkflowDefinitionResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::WorkflowDefinitionResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::WorkflowDefinitionResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/workflow_instances_get.rb b/emass_client/ruby_client/lib/emass_client/models/workflow_instances_get.rb deleted file mode 100644 index 048d5a6..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/workflow_instances_get.rb +++ /dev/null @@ -1,368 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class WorkflowInstancesGet - # [Read-Only] Date the workflow instance or the workflow transition was created. - attr_accessor :created_date - - # [Read-Only] Name of the current stage. - attr_accessor :current_stage - - # [Read-Only] User that last acted on the workflow. - attr_accessor :last_edited_by - - # [Read-Only] Date the workflow was last acted on. - attr_accessor :last_edited_date - - # [Read-Only] The package name. - attr_accessor :package_name - - # [Read-Only] The system name. - attr_accessor :system_name - - # [Read-Only] Version of the workflow definition. - attr_accessor :version - - # [Read-Only] The workflow type. - attr_accessor :workflow - - # [Read-Only] Unique workflow instance identifier. - attr_accessor :workflow_instance_id - - attr_accessor :transitions - - class EnumAttributeValidator - attr_reader :datatype - attr_reader :allowable_values - - def initialize(datatype, allowable_values) - @allowable_values = allowable_values.map do |value| - case datatype.to_s - when /Integer/i - value.to_i - when /Float/i - value.to_f - else - value - end - end - end - - def valid?(value) - !value || allowable_values.include?(value) - end - end - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'created_date' => :'createdDate', - :'current_stage' => :'currentStage', - :'last_edited_by' => :'lastEditedBy', - :'last_edited_date' => :'lastEditedDate', - :'package_name' => :'packageName', - :'system_name' => :'systemName', - :'version' => :'version', - :'workflow' => :'workflow', - :'workflow_instance_id' => :'workflowInstanceId', - :'transitions' => :'transitions' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'created_date' => :'Object', - :'current_stage' => :'Object', - :'last_edited_by' => :'Object', - :'last_edited_date' => :'Object', - :'package_name' => :'Object', - :'system_name' => :'Object', - :'version' => :'Object', - :'workflow' => :'Object', - :'workflow_instance_id' => :'Object', - :'transitions' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::WorkflowInstancesGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::WorkflowInstancesGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'created_date') - self.created_date = attributes[:'created_date'] - end - - if attributes.key?(:'current_stage') - self.current_stage = attributes[:'current_stage'] - end - - if attributes.key?(:'last_edited_by') - self.last_edited_by = attributes[:'last_edited_by'] - end - - if attributes.key?(:'last_edited_date') - self.last_edited_date = attributes[:'last_edited_date'] - end - - if attributes.key?(:'package_name') - self.package_name = attributes[:'package_name'] - end - - if attributes.key?(:'system_name') - self.system_name = attributes[:'system_name'] - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - end - - if attributes.key?(:'workflow') - self.workflow = attributes[:'workflow'] - end - - if attributes.key?(:'workflow_instance_id') - self.workflow_instance_id = attributes[:'workflow_instance_id'] - end - - if attributes.key?(:'transitions') - if (value = attributes[:'transitions']).is_a?(Array) - self.transitions = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - current_stage_validator = EnumAttributeValidator.new('Object', ['Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Cancel', 'Complete']) - return false unless current_stage_validator.valid?(@current_stage) - package_name_validator = EnumAttributeValidator.new('Object', ['Test POA&M Approval', 'Test RMF Step 1 package', 'Test RMF Step 2 package', 'Test RMF Step 3 package']) - return false unless package_name_validator.valid?(@package_name) - system_name_validator = EnumAttributeValidator.new('Object', ['Test system 1', 'Test system 2', 'Test system 3', 'Test system 4']) - return false unless system_name_validator.valid?(@system_name) - workflow_validator = EnumAttributeValidator.new('Object', ['POA&M Approval', 'RMF Step 1: Security Category', 'RMF Step 2: Security Category', 'RMF Step 3: Security Category']) - return false unless workflow_validator.valid?(@workflow) - true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] current_stage Object to be assigned - def current_stage=(current_stage) - validator = EnumAttributeValidator.new('Object', ['Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Cancel', 'Complete']) - unless validator.valid?(current_stage) - fail ArgumentError, "invalid value for \"current_stage\", must be one of #{validator.allowable_values}." - end - @current_stage = current_stage - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] package_name Object to be assigned - def package_name=(package_name) - validator = EnumAttributeValidator.new('Object', ['Test POA&M Approval', 'Test RMF Step 1 package', 'Test RMF Step 2 package', 'Test RMF Step 3 package']) - unless validator.valid?(package_name) - fail ArgumentError, "invalid value for \"package_name\", must be one of #{validator.allowable_values}." - end - @package_name = package_name - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] system_name Object to be assigned - def system_name=(system_name) - validator = EnumAttributeValidator.new('Object', ['Test system 1', 'Test system 2', 'Test system 3', 'Test system 4']) - unless validator.valid?(system_name) - fail ArgumentError, "invalid value for \"system_name\", must be one of #{validator.allowable_values}." - end - @system_name = system_name - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] workflow Object to be assigned - def workflow=(workflow) - validator = EnumAttributeValidator.new('Object', ['POA&M Approval', 'RMF Step 1: Security Category', 'RMF Step 2: Security Category', 'RMF Step 3: Security Category']) - unless validator.valid?(workflow) - fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}." - end - @workflow = workflow - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_date == o.created_date && - current_stage == o.current_stage && - last_edited_by == o.last_edited_by && - last_edited_date == o.last_edited_date && - package_name == o.package_name && - system_name == o.system_name && - version == o.version && - workflow == o.workflow && - workflow_instance_id == o.workflow_instance_id && - transitions == o.transitions - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [created_date, current_stage, last_edited_by, last_edited_date, package_name, system_name, version, workflow, workflow_instance_id, transitions].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/models/workflow_instances_response_get.rb b/emass_client/ruby_client/lib/emass_client/models/workflow_instances_response_get.rb deleted file mode 100644 index 842a8f4..0000000 --- a/emass_client/ruby_client/lib/emass_client/models/workflow_instances_response_get.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'date' - -module EmassClient - class WorkflowInstancesResponseGet - attr_accessor :meta - - attr_accessor :data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'meta' => :'meta', - :'data' => :'data' - } - end - - # Attribute type mapping. - def self.openapi_types - { - :'meta' => :'Object', - :'data' => :'Object' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::WorkflowInstancesResponseGet` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::WorkflowInstancesResponseGet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - meta == o.meta && - data == o.data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [meta, data].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :DateTime - DateTime.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - EmassClient.const_get(type).build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end end -end diff --git a/emass_client/ruby_client/lib/emass_client/version.rb b/emass_client/ruby_client/lib/emass_client/version.rb deleted file mode 100644 index 105cf4e..0000000 --- a/emass_client/ruby_client/lib/emass_client/version.rb +++ /dev/null @@ -1,14 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -module EmassClient - VERSION = '1.0.3' -end diff --git a/emass_client/ruby_client/spec/api/artifacts_api_spec.rb b/emass_client/ruby_client/spec/api/artifacts_api_spec.rb deleted file mode 100644 index 84322ec..0000000 --- a/emass_client/ruby_client/spec/api/artifacts_api_spec.rb +++ /dev/null @@ -1,92 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::ArtifactsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsApi' do - before do - # run before each test - @instance = EmassClient::ArtifactsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsApi' do - it 'should create an instance of ArtifactsApi' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsApi) - end - end - - # unit tests for add_artifacts_by_system_id - # Add one or many artifacts in a system - # <strong>Information</strong><br> The request body of a POST request through the Artifact Endpoint accepts a single binary file with file extension \".zip\" only. This accepted .zip file should contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt. Filename uniqueness throughout eMASS will be enforced by the API.<br><br> Upon successful receipt of a file, if a file within the .zip is matched via filename to an artifact existing within the application, the file associated with the artifact will be updated. If no artifact is matched via filename to the application, a new artifact will be created with the following default values. Any values not specified below will be blank. <ul> <li>isTemplate: false</li> <li>type: other</li> <li>category: evidence</li> </ul> To update values other than the file itself, please submit a PUT request.<br> <strong>Zip file information</strong><br> Upload a zip file contain one or more files corresponding to existing artifacts or new artifacts that will be created upon successful receipt.<br><br> <strong>Business Rules</strong><br> Artifact cannot be saved if the file does not have the following file extensions: .docx,.doc,.txt,.rtf,.xfdl,.xml,.mht,.mh,tml,.html,.htm,.pdf,.mdb,.accdb,.ppt, .pptx,.xls,.xlsx,.csv,.log,.jpeg,.jpg,.tiff,.bmp,.tif,.png,.gif,.zip,.rar,.msg, .vsd,.vsw,.vdx,.z{#},.ckl,.avi,.vsdx Artifact version cannot be saved if an Artifact with the same file name already exist in the system. Artifact cannot be saved if the file size exceeds 30MB. - # @param is_template - # @param type - # @param category - # @param zipper - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ArtifactsResponsePutPost] - describe 'add_artifacts_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_artifact - # Remove one or many artifacts in a system - # Remove the Artifact(s) matching `systemId` path parameter and request body artifact(s) file name<br><br> <b>Note:</b> Multiple files can be deleted by providing multiple file names at the CL (comma delimited) Example: --files file1.txt, file2.txt - # @param body See notes above for additional information - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ArtifactsResponseDel] - describe 'delete_artifact test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_artifacts - # Get one or many artifacts in a system - # Returns selected artifacts matching parameters to include the file name containing the artifacts. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :filename **File Name**: The file name (to include file-extension). - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. - # @return [ArtifactsResponseGet] - describe 'get_system_artifacts test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_artifact_by_system_id - # Update one or many artifacts in a system - # Updates an artifact for given `systemId` path parameter<br><br> **Request Body Required Fields** - `filename` - `isTemplate` - `type` - `category` - # @param body See `information` above for additional instructions - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ArtifactsResponsePutPost] - describe 'update_artifact_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/artifacts_export_api_spec.rb b/emass_client/ruby_client/spec/api/artifacts_export_api_spec.rb deleted file mode 100644 index 22c04ed..0000000 --- a/emass_client/ruby_client/spec/api/artifacts_export_api_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::ArtifactsExportApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsExportApi' do - before do - # run before each test - @instance = EmassClient::ArtifactsExportApi.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsExportApi' do - it 'should create an instance of ArtifactsExportApi' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsExportApi) - end - end - - # unit tests for get_system_artifacts_export - # Get the file of an artifact in a system - # <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. - # @param system_id **System Id**: The unique system record identifier. - # @param filename **File Name**: The file name (to include file-extension). - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :compress **Compress File**: Determines if returned file is compressed. - # @return [String] - describe 'get_system_artifacts_export test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/cac_api_spec.rb b/emass_client/ruby_client/spec/api/cac_api_spec.rb deleted file mode 100644 index 5b59767..0000000 --- a/emass_client/ruby_client/spec/api/cac_api_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::CACApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CACApi' do - before do - # run before each test - @instance = EmassClient::CACApi.new - end - - after do - # run after each test - end - - describe 'test an instance of CACApi' do - it 'should create an instance of CACApi' do - expect(@instance).to be_instance_of(EmassClient::CACApi) - end - end - - # unit tests for add_system_cac - # Submit control to second role of CAC - # Adds a Control Approval Chain (CAC) for given `systemId` path parameter<br><br> 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. - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [CacResponsePost] - describe 'add_system_cac test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_cac - # Get location of one or many controls in CAC - # Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @return [CacResponseGet] - describe 'get_system_cac test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/cmmc_assessments_api_spec.rb b/emass_client/ruby_client/spec/api/cmmc_assessments_api_spec.rb deleted file mode 100644 index d20b5b0..0000000 --- a/emass_client/ruby_client/spec/api/cmmc_assessments_api_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::CMMCAssessmentsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CMMCAssessmentsApi' do - before do - # run before each test - @instance = EmassClient::CMMCAssessmentsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of CMMCAssessmentsApi' do - it 'should create an instance of CMMCAssessmentsApi' do - expect(@instance).to be_instance_of(EmassClient::CMMCAssessmentsApi) - end - end - - # unit tests for get_cmmc_assessments - # Get CMMC assessment information - # Get all CMMC assessment after the given date `sinceDate` parameter. It is available to CMMC eMASS only. - # @param since_date **Date** CMMC date (Unix date format) - # @param [Hash] opts the optional parameters - # @return [CmmcResponseGet] - describe 'get_cmmc_assessments test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/controls_api_spec.rb b/emass_client/ruby_client/spec/api/controls_api_spec.rb deleted file mode 100644 index d2ba2dd..0000000 --- a/emass_client/ruby_client/spec/api/controls_api_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::ControlsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ControlsApi' do - before do - # run before each test - @instance = EmassClient::ControlsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of ControlsApi' do - it 'should create an instance of ControlsApi' do - expect(@instance).to be_instance_of(EmassClient::ControlsApi) - end - end - - # unit tests for get_system_controls - # Get control information in a system for one or many controls - # Returns system control information for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :acronyms **Acronym**: The system acronym(s) being queried (single value or comma delimited values). - # @return [ControlsResponseGet] - describe 'get_system_controls test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_control_by_system_id - # Update control information in a system for one or many controls - # Update a Control for given `systemId`<br> **Request Body Required Fields** - `acronym` - `responsibleEntities` - `controlDesignation` - `estimatedCompletionDate` - `implementationNarrative` The following optional fields are required based on the Implementation Status `implementationStatus` value<br> | Value | Required Fields |--------------------------|--------------------------------------------------- | Planned or Implemented | `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` | Not Applicable | `naJustification`, `responsibleEntities` | Manually Inherited | `commonControlProvider`, `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` If the Implementation Status `implementationStatus` value is \"Inherited\", only the following fields can be updated: - `controlDesignation` - `commonnControlProvider` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [ControlsResponsePut] - describe 'update_control_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/milestones_api_spec.rb b/emass_client/ruby_client/spec/api/milestones_api_spec.rb deleted file mode 100644 index 0b9bf22..0000000 --- a/emass_client/ruby_client/spec/api/milestones_api_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::MilestonesApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesApi' do - before do - # run before each test - @instance = EmassClient::MilestonesApi.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesApi' do - it 'should create an instance of MilestonesApi' do - expect(@instance).to be_instance_of(EmassClient::MilestonesApi) - end - end - - # unit tests for add_milestone_by_system_id_and_poam_id - # Add milestones to one or many POA&M items in a system - # Adds a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate` - # @param body Update an existing milestone - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [MilestoneResponsePost] - describe 'add_milestone_by_system_id_and_poam_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_milestone - # Remove milestones in a system for one or many POA&M items - # Remove the POA&M matching `systemId` path parameter<br> **Notes**<br> To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`). - # @param body Delete the given Milestone Id - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [Empty200Response] - describe 'delete_milestone test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_milestones_by_poam_id - # Get milestones in one or many POA&M items in a system - # Returns system containing milestones for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - # @return [MilestoneResponseGet] - describe 'get_system_milestones_by_poam_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_milestones_by_poam_id_and_milestone_id - # Get milestone by ID in POA&M item in a system - # Returns systems containing milestones for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param milestone_id **Milestone Id**: The unique milestone record identifier. - # @param [Hash] opts the optional parameters - # @return [MilestoneResponseGet] - describe 'get_system_milestones_by_poam_id_and_milestone_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_milestone_by_system_id_and_poam_id - # Update one or many POA&M items in a system - # Updates a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [MilestoneResponsePut] - describe 'update_milestone_by_system_id_and_poam_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/pac_api_spec.rb b/emass_client/ruby_client/spec/api/pac_api_spec.rb deleted file mode 100644 index 0975da4..0000000 --- a/emass_client/ruby_client/spec/api/pac_api_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::PACApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PACApi' do - before do - # run before each test - @instance = EmassClient::PACApi.new - end - - after do - # run after each test - end - - describe 'test an instance of PACApi' do - it 'should create an instance of PACApi' do - expect(@instance).to be_instance_of(EmassClient::PACApi) - end - end - - # unit tests for add_system_pac - # Submit system package for review - # Adds a Package Approval Chain (PAC) for given `systemId` path parameter - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PacResponsePost] - describe 'add_system_pac test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_pac - # Get location of system package in PAC - # Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PacResponseGet] - describe 'get_system_pac test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/poam_api_spec.rb b/emass_client/ruby_client/spec/api/poam_api_spec.rb deleted file mode 100644 index 7120f37..0000000 --- a/emass_client/ruby_client/spec/api/poam_api_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::POAMApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'POAMApi' do - before do - # run before each test - @instance = EmassClient::POAMApi.new - end - - after do - # run after each test - end - - describe 'test an instance of POAMApi' do - it 'should create an instance of POAMApi' do - expect(@instance).to be_instance_of(EmassClient::POAMApi) - end - end - - # unit tests for add_poam_by_system_id - # Add one or many POA&M items in a system - # Add a POA&M for given `systemId`<br> **Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` **Note**<br /> If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocFirstName`, `pocLastName`, `pocPhoneNumber`<br /> - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponsePost] - describe 'add_poam_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_poam - # Remove one or many POA&M items in a system - # Remove the POA&M matching `systemId` path parameter and `poamId` query parameter<br> - # @param body Delete the given POA&M Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponseDelete] - describe 'delete_poam test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_poams - # Get one or many POA&M items in a system - # Returns system(s) containing POA&M items for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format). - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. - # @return [PoamResponseGet] - describe 'get_system_poams test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_poams_by_poam_id - # Get POA&M item by ID in a system - # Returns system(s) containing POA&M items for matching parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param poam_id **POA&M Id**: The unique POA&M record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponseGet] - describe 'get_system_poams_by_poam_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_poam_by_system_id - # Update one or many POA&M items in a system - # Update a POA&M for given `systemId`<br> **Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` **Notes** - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`<br /> - To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`. - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [PoamResponsePut] - describe 'update_poam_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/registration_api_spec.rb b/emass_client/ruby_client/spec/api/registration_api_spec.rb deleted file mode 100644 index d484f13..0000000 --- a/emass_client/ruby_client/spec/api/registration_api_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::RegistrationApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'RegistrationApi' do - before do - # run before each test - @instance = EmassClient::RegistrationApi.new - end - - after do - # run after each test - end - - describe 'test an instance of RegistrationApi' do - it 'should create an instance of RegistrationApi' do - expect(@instance).to be_instance_of(EmassClient::RegistrationApi) - end - end - - # unit tests for register_user - # Register user certificate and obtain an API key - # Returns the api-key - This API key must be provided in the request header for all endpoint calls (api-key). - # @param body User certificate previously provided by eMASS. - # @param [Hash] opts the optional parameters - # @return [Register] - describe 'register_user test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/static_code_scans_api_spec.rb b/emass_client/ruby_client/spec/api/static_code_scans_api_spec.rb deleted file mode 100644 index cf6ba29..0000000 --- a/emass_client/ruby_client/spec/api/static_code_scans_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::StaticCodeScansApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'StaticCodeScansApi' do - before do - # run before each test - @instance = EmassClient::StaticCodeScansApi.new - end - - after do - # run after each test - end - - describe 'test an instance of StaticCodeScansApi' do - it 'should create an instance of StaticCodeScansApi' do - expect(@instance).to be_instance_of(EmassClient::StaticCodeScansApi) - end - end - - # unit tests for add_static_code_scans_by_system_id - # Upload static code scans or Clear static code scans - # Upload or clear application scan findings into a system's `systemId` assets module. **Note:** To clear an application's findings, use only the field `clearFindings` as the Request body and set it to true. - # @param body Update an existing Artifact by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [Success200Response] - describe 'add_static_code_scans_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/system_roles_api_spec.rb b/emass_client/ruby_client/spec/api/system_roles_api_spec.rb deleted file mode 100644 index 29c09eb..0000000 --- a/emass_client/ruby_client/spec/api/system_roles_api_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::SystemRolesApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemRolesApi' do - before do - # run before each test - @instance = EmassClient::SystemRolesApi.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemRolesApi' do - it 'should create an instance of SystemRolesApi' do - expect(@instance).to be_instance_of(EmassClient::SystemRolesApi) - end - end - - # unit tests for get_system_roles - # Get available roles - # Returns all available roles - # @param [Hash] opts the optional parameters - # @return [SystemRolesResponse] - describe 'get_system_roles test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_roles_by_category_id - # Get system roles - # Returns the role(s) data matching parameters. - # @param role_category **Role Category**: The system role category been queried - # @param role **Role**: Accepts single value from options available at base system-roles endpoint e.g., SCA. - # @param [Hash] opts the optional parameters - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - # @option opts [BOOLEAN] :include_decommissioned **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. - # @return [SystemRolesCategoryResponse] - describe 'get_system_roles_by_category_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/systems_api_spec.rb b/emass_client/ruby_client/spec/api/systems_api_spec.rb deleted file mode 100644 index e46535e..0000000 --- a/emass_client/ruby_client/spec/api/systems_api_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::SystemsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemsApi' do - before do - # run before each test - @instance = EmassClient::SystemsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemsApi' do - it 'should create an instance of SystemsApi' do - expect(@instance).to be_instance_of(EmassClient::SystemsApi) - end - end - - # unit tests for get_system - # Get system information for a specific system - # Returns the system matching provided parameters - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_package **Include Package**: Indicates if additional packages information is retrieved for queried system. - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - # @return [SystemResponse] - describe 'get_system test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_systems - # Get system information - # Returns all system(s) that match the query parameters - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_package **Include Package**: Indicates if additional packages information is retrieved for queried system. - # @option opts [String] :registration_type **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider - # @option opts [String] :ditpr_id **DITPR ID**: Filter query by DoD Information Technology (IT) Portfolio Repository (DITPR). - # @option opts [String] :coams_id **COAMS ID**: Filter query by Cyber Operational Attributes Management System (COAMS). - # @option opts [String] :policy **System Policy**: Filter query by system policy. If no value is specified and more than one policy is available, the default return is the RMF policy information. - # @option opts [BOOLEAN] :include_ditpr_metrics **Include DITPR**: Indicates if DITPR metrics are retrieved. This query string parameter can only be used in conjunction with the following parameters:<br> <ul> <li>registrationType</li> <li>policy</li> </ul> - # @option opts [BOOLEAN] :include_decommissioned **Include Decommissioned Systems**: Indicates if decommissioned systems are retrieved. If no value is specified, the default returns true to include decommissioned systems. - # @option opts [BOOLEAN] :reports_for_scorecard **DoD Cyber Hygiene Scorecard**: Indicates if the system reports to the DoD Cyber Hygiene Scorecard. - # @return [SystemResponse] - describe 'get_systems test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/test_api_spec.rb b/emass_client/ruby_client/spec/api/test_api_spec.rb deleted file mode 100644 index 1efcb3d..0000000 --- a/emass_client/ruby_client/spec/api/test_api_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::TestApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestApi' do - before do - # run before each test - @instance = EmassClient::TestApi.new - end - - after do - # run after each test - end - - describe 'test an instance of TestApi' do - it 'should create an instance of TestApi' do - expect(@instance).to be_instance_of(EmassClient::TestApi) - end - end - - # unit tests for test_connection - # Test connection to the API - # Returns endpoint call status - # @param [Hash] opts the optional parameters - # @return [Test] - describe 'test_connection test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/test_results_api_spec.rb b/emass_client/ruby_client/spec/api/test_results_api_spec.rb deleted file mode 100644 index df88085..0000000 --- a/emass_client/ruby_client/spec/api/test_results_api_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::TestResultsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestResultsApi' do - before do - # run before each test - @instance = EmassClient::TestResultsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of TestResultsApi' do - it 'should create an instance of TestResultsApi' do - expect(@instance).to be_instance_of(EmassClient::TestResultsApi) - end - end - - # unit tests for add_test_results_by_system_id - # Add one or many test results in a system - # Adds test results for given `systemId` **Request Body Required Fields** - `cci` - `testedBy` - `testDate` - `description` - `complianceStatus` - # @param body Update an existing control by Id - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @return [TestResultsResponsePost] - describe 'add_test_results_by_system_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_test_results - # Get one or many test results in a system - # Returns system test results information for matching parameters.<br> - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). - # @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs). - # @option opts [BOOLEAN] :latest_only **Latest Results Only**: Indicates that only the latest test resultes are retrieved (single or comma separated). - # @return [TestResultsResponseGet] - describe 'get_system_test_results test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/workflow_definitions_api_spec.rb b/emass_client/ruby_client/spec/api/workflow_definitions_api_spec.rb deleted file mode 100644 index 1f3fcef..0000000 --- a/emass_client/ruby_client/spec/api/workflow_definitions_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::WorkflowDefinitionsApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'WorkflowDefinitionsApi' do - before do - # run before each test - @instance = EmassClient::WorkflowDefinitionsApi.new - end - - after do - # run after each test - end - - describe 'test an instance of WorkflowDefinitionsApi' do - it 'should create an instance of WorkflowDefinitionsApi' do - expect(@instance).to be_instance_of(EmassClient::WorkflowDefinitionsApi) - end - end - - # unit tests for get_workflow_definitions - # Get workflow definitions in a site - # View all workflow schemas available on the eMASS instance filtered by status `includeInactive` and registration type `registrationType`. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_inactive **Include Inactive**: If no value is specified, the default returns false to not include outdated workflow definitions. - # @option opts [String] :registration_type **Registration Type**: Filter record by selected registration type (single value or comma delimited values). *Available values:* assessAndAuthorize, assessOnly, guest, regular, functional, cloudServiceProvider, commonControlProvider - # @return [WorkflowDefinitionResponseGet] - describe 'get_workflow_definitions test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api/workflow_instances_api_spec.rb b/emass_client/ruby_client/spec/api/workflow_instances_api_spec.rb deleted file mode 100644 index 566689e..0000000 --- a/emass_client/ruby_client/spec/api/workflow_instances_api_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' - -# Unit tests for EmassClient::WorkflowInstancesApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'WorkflowInstancesApi' do - before do - # run before each test - @instance = EmassClient::WorkflowInstancesApi.new - end - - after do - # run after each test - end - - describe 'test an instance of WorkflowInstancesApi' do - it 'should create an instance of WorkflowInstancesApi' do - expect(@instance).to be_instance_of(EmassClient::WorkflowInstancesApi) - end - end - - # unit tests for get_system_workflow_instances - # Get workflow instances in a system - # View detailed information on all active and historical workflows for a system `systemId` and filtered by provided parameters. - # @param system_id **System Id**: The unique system record identifier. - # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :include_comments **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. - # @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns true to not include transition comments. - # @option opts [String] :since_date **Date**: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. - # @option opts [String] :status **Status**: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. - # @return [WorkflowInstancesResponseGet] - describe 'get_system_workflow_instances test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_system_workflow_instances_by_workflow_instance_id - # Get workflow instance by ID in a system - # View detailed information on all active and historical workflows for a system `systemId` and `workflowInstanceId`. - # @param system_id **System Id**: The unique system record identifier. - # @param workflow_instance_id **Workflow Instance Id**: The unique milestone record identifier. - # @param [Hash] opts the optional parameters - # @return [WorkflowInstancesResponseGet] - describe 'get_system_workflow_instances_by_workflow_instance_id test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/api_client_spec.rb b/emass_client/ruby_client/spec/api_client_spec.rb deleted file mode 100644 index 9fd88ce..0000000 --- a/emass_client/ruby_client/spec/api_client_spec.rb +++ /dev/null @@ -1,225 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' - -describe EmassClient::ApiClient do - context 'initialization' do - context 'URL stuff' do - context 'host' do - it 'removes http from host' do - EmassClient.configure { |c| c.host = 'http://example.com' } - expect(EmassClient::Configuration.default.host).to eq('example.com') - end - - it 'removes https from host' do - EmassClient.configure { |c| c.host = 'https://wookiee.com' } - expect(EmassClient::ApiClient.default.config.host).to eq('wookiee.com') - end - - it 'removes trailing path from host' do - EmassClient.configure { |c| c.host = 'hobo.com/v4' } - expect(EmassClient::Configuration.default.host).to eq('hobo.com') - end - end - - context 'base_path' do - it "prepends a slash to base_path" do - EmassClient.configure { |c| c.base_path = 'v4/dog' } - expect(EmassClient::Configuration.default.base_path).to eq('/v4/dog') - end - - it "doesn't prepend a slash if one is already there" do - EmassClient.configure { |c| c.base_path = '/v4/dog' } - expect(EmassClient::Configuration.default.base_path).to eq('/v4/dog') - end - - it "ends up as a blank string if nil" do - EmassClient.configure { |c| c.base_path = nil } - expect(EmassClient::Configuration.default.base_path).to eq('') - end - end - end - end - - describe 'params_encoding in #build_request' do - let(:config) { EmassClient::Configuration.new } - let(:api_client) { EmassClient::ApiClient.new(config) } - - it 'defaults to nil' do - expect(EmassClient::Configuration.default.params_encoding).to eq(nil) - expect(config.params_encoding).to eq(nil) - - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(nil) - end - - it 'can be customized' do - config.params_encoding = :multi - request = api_client.build_request(:get, '/test') - expect(request.options[:params_encoding]).to eq(:multi) - end - end - - describe 'timeout in #build_request' do - let(:config) { EmassClient::Configuration.new } - let(:api_client) { EmassClient::ApiClient.new(config) } - - it 'defaults to 0' do - expect(EmassClient::Configuration.default.timeout).to eq(0) - expect(config.timeout).to eq(0) - - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(0) - end - - it 'can be customized' do - config.timeout = 100 - request = api_client.build_request(:get, '/test') - expect(request.options[:timeout]).to eq(100) - end - end - - describe '#deserialize' do - it "handles Array" do - api_client = EmassClient::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[12, 34]') - data = api_client.deserialize(response, 'Array') - expect(data).to be_instance_of(Array) - expect(data).to eq([12, 34]) - end - - it 'handles Array>' do - api_client = EmassClient::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '[[12, 34], [56]]') - data = api_client.deserialize(response, 'Array>') - expect(data).to be_instance_of(Array) - expect(data).to eq([[12, 34], [56]]) - end - - it 'handles Hash' do - api_client = EmassClient::ApiClient.new - headers = { 'Content-Type' => 'application/json' } - response = double('response', headers: headers, body: '{"message": "Hello"}') - data = api_client.deserialize(response, 'Hash') - expect(data).to be_instance_of(Hash) - expect(data).to eq(:message => 'Hello') - end - end - - describe "#object_to_hash" do - it 'ignores nils and includes empty arrays' do - # uncomment below to test object_to_hash for model - # api_client = EmassClient::ApiClient.new - # _model = EmassClient::ModelName.new - # update the model attribute below - # _model.id = 1 - # update the expected value (hash) below - # expected = {id: 1, name: '', tags: []} - # expect(api_client.object_to_hash(_model)).to eq(expected) - end - end - - describe '#build_collection_param' do - let(:param) { ['aa', 'bb', 'cc'] } - let(:api_client) { EmassClient::ApiClient.new } - - it 'works for csv' do - expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc') - end - - it 'works for ssv' do - expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc') - end - - it 'works for tsv' do - expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc") - end - - it 'works for pipes' do - expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc') - end - - it 'works for multi' do - expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc']) - end - - it 'fails for invalid collection format' do - expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID') - end - end - - describe '#json_mime?' do - let(:api_client) { EmassClient::ApiClient.new } - - it 'works' do - expect(api_client.json_mime?(nil)).to eq false - expect(api_client.json_mime?('')).to eq false - - expect(api_client.json_mime?('application/json')).to eq true - expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true - expect(api_client.json_mime?('APPLICATION/JSON')).to eq true - - expect(api_client.json_mime?('application/xml')).to eq false - expect(api_client.json_mime?('text/plain')).to eq false - expect(api_client.json_mime?('application/jsonp')).to eq false - end - end - - describe '#select_header_accept' do - let(:api_client) { EmassClient::ApiClient.new } - - it 'works' do - expect(api_client.select_header_accept(nil)).to be_nil - expect(api_client.select_header_accept([])).to be_nil - - expect(api_client.select_header_accept(['application/json'])).to eq('application/json') - expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - - expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml') - end - end - - describe '#select_header_content_type' do - let(:api_client) { EmassClient::ApiClient.new } - - it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') - - expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') - expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') - expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON') - expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml') - expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain') - end - end - - describe '#sanitize_filename' do - let(:api_client) { EmassClient::ApiClient.new } - - it 'works' do - expect(api_client.sanitize_filename('sun')).to eq('sun') - expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif') - expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif') - end - end -end diff --git a/emass_client/ruby_client/spec/base_object_spec.rb b/emass_client/ruby_client/spec/base_object_spec.rb deleted file mode 100644 index 7376cd1..0000000 --- a/emass_client/ruby_client/spec/base_object_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'spec_helper' - -class ArrayMapObject < Petstore::Category - attr_accessor :int_arr, :pet_arr, :int_map, :pet_map, :int_arr_map, :pet_arr_map, :boolean_true_arr, :boolean_false_arr - - def self.attribute_map - { - :int_arr => :int_arr, - :pet_arr => :pet_arr, - :int_map => :int_map, - :pet_map => :pet_map, - :int_arr_map => :int_arr_map, - :pet_arr_map => :pet_arr_map, - :boolean_true_arr => :boolean_true_arr, - :boolean_false_arr => :boolean_false_arr, - } - end - - def self.swagger_types - { - :int_arr => :'Array', - :pet_arr => :'Array', - :int_map => :'Hash', - :pet_map => :'Hash', - :int_arr_map => :'Hash>', - :pet_arr_map => :'Hash>', - :boolean_true_arr => :'Array', - :boolean_false_arr => :'Array', - } - end -end - -describe 'BaseObject' do - describe 'boolean values' do - let(:obj) { Petstore::Cat.new({declawed: false}) } - - it 'should have values set' do - expect(obj.declawed).not_to be_nil - expect(obj.declawed).to eq(false) - end - end - - describe 'array and map properties' do - let(:obj) { ArrayMapObject.new } - - let(:data) do - {int_arr: [123, 456], - pet_arr: [{name: 'Kitty'}], - int_map: {'int' => 123}, - pet_map: {'pet' => {name: 'Kitty'}}, - int_arr_map: {'int_arr' => [123, 456]}, - pet_arr_map: {'pet_arr' => [{name: 'Kitty'}]}, - boolean_true_arr: [true, "true", "TruE", 1, "y", "yes", "1", "t", "T"], - boolean_false_arr: [false, "", 0, "0", "f", nil, "null"], - } - end - - it 'works for #build_from_hash' do - obj.build_from_hash(data) - - expect(obj.int_arr).to match_array([123, 456]) - - expect(obj.pet_arr).to be_instance_of(Array) - expect(obj.pet_arr).to be_instance_of(1) - - pet = obj.pet_arr.first - expect(pet).to be_instance_of(Petstore::Pet) - expect(pet.name).to eq('Kitty') - - expect(obj.int_map).to be_instance_of(Hash) - expect(obj.int_map).to eq({'int' => 123}) - - expect(obj.pet_map).to be_instance_of(Hash) - pet = obj.pet_map['pet'] - expect(pet).to be_instance_of(Petstore::Pet) - expect(pet.name).to eq('Kitty') - - expect(obj.int_arr_map).to be_instance_of(Hash) - arr = obj.int_arr_map['int_arr'] - expect(arr).to match_array([123, 456]) - - expect(obj.pet_arr_map).to be_instance_of(Hash) - arr = obj.pet_arr_map['pet_arr'] - expect(arr).to be_instance_of(Array) - expect(arr.size).to eq(1) - pet = arr.first - expect(pet).to be_instance_of(Petstore::Pet) - expect(pet.name).to eq('Kitty') - - expect(obj.boolean_true_arr).to be_instance_of(Array) - obj.boolean_true_arr.each do |b| - expect(b).to eq(true) - end - - expect(obj.boolean_false_arr).to be_instance_of(Array) - obj.boolean_false_arr.each do |b| - expect(b).to eq(false) - end - end - - it 'works for #to_hash' do - obj.build_from_hash(data) - expect_data = data.dup - expect_data[:boolean_true_arr].map! {true} - expect_data[:boolean_false_arr].map! {false} - expect(obj.to_hash).to eq(expect_data) - end - end -end diff --git a/emass_client/ruby_client/spec/configuration_spec.rb b/emass_client/ruby_client/spec/configuration_spec.rb deleted file mode 100644 index 2fe4854..0000000 --- a/emass_client/ruby_client/spec/configuration_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' - -describe EmassClient::Configuration do - let(:config) { EmassClient::Configuration.default } - - before(:each) do - # uncomment below to setup host and base_path - # require 'URI' - # uri = URI.parse("http://localhost:4010") - # EmassClient.configure do |c| - # c.host = uri.host - # c.base_path = uri.path - # end - end - - describe '#base_url' do - it 'should have the default value' do - # uncomment below to test default value of the base path - # expect(config.base_url).to eq("http://localhost:4010") - end - - it 'should remove trailing slashes' do - [nil, '', '/', '//'].each do |base_path| - config.base_path = base_path - # uncomment below to test trailing slashes - # expect(config.base_url).to eq("http://localhost:4010") - end - end - end -end diff --git a/emass_client/ruby_client/spec/models/artifacts_delete_inner_spec.rb b/emass_client/ruby_client/spec/models/artifacts_delete_inner_spec.rb deleted file mode 100644 index ea49bd4..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_delete_inner_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsDeleteInner -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsDeleteInner' do - before do - # run before each test - @instance = EmassClient::ArtifactsDeleteInner.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsDeleteInner' do - it 'should create an instance of ArtifactsDeleteInner' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsDeleteInner) - end - end - describe 'test attribute "filename"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/artifacts_delete_spec.rb b/emass_client/ruby_client/spec/models/artifacts_delete_spec.rb deleted file mode 100644 index 1c0ed02..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_delete_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsDelete -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsDelete' do - before do - # run before each test - @instance = EmassClient::ArtifactsDelete.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsDelete' do - it 'should create an instance of ArtifactsDelete' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsDelete) - end - end -end diff --git a/emass_client/ruby_client/spec/models/artifacts_get_spec.rb b/emass_client/ruby_client/spec/models/artifacts_get_spec.rb deleted file mode 100644 index 0ba8b95..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_get_spec.rb +++ /dev/null @@ -1,126 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsGet' do - before do - # run before each test - @instance = EmassClient::ArtifactsGet.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsGet' do - it 'should create an instance of ArtifactsGet' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "filename"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_inherited"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_template"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Procedure", "Diagram", "Policy", "Labor", "Document", "Image", "Other", "Scan Result", "Auditor Report"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "category"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Implementation Guidance", "Evidence"]) - # validator.allowable_values.each do |value| - # expect { @instance.category = value }.not_to raise_error - # end - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ref_page_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ccis"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "controls"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mime_content_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "file_size"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "artifact_expiration_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_reviewed_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/artifacts_request_put_body_spec.rb b/emass_client/ruby_client/spec/models/artifacts_request_put_body_spec.rb deleted file mode 100644 index a4d5123..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_request_put_body_spec.rb +++ /dev/null @@ -1,102 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsRequestPutBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsRequestPutBody' do - before do - # run before each test - @instance = EmassClient::ArtifactsRequestPutBody.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsRequestPutBody' do - it 'should create an instance of ArtifactsRequestPutBody' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsRequestPutBody) - end - end - describe 'test attribute "filename"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_template"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Procedure", "Diagram", "Policy", "Labor", "Document", "Image", "Other", "Scan Result"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "category"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Implementation Guidance", "Evidence"]) - # validator.allowable_values.each do |value| - # expect { @instance.category = value }.not_to raise_error - # end - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ref_page_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ccis"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "controls"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "artifact_expiration_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_reviewed_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/artifacts_response_del_data_spec.rb b/emass_client/ruby_client/spec/models/artifacts_response_del_data_spec.rb deleted file mode 100644 index d8b6435..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_response_del_data_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsResponseDelData -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsResponseDelData' do - before do - # run before each test - @instance = EmassClient::ArtifactsResponseDelData.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsResponseDelData' do - it 'should create an instance of ArtifactsResponseDelData' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsResponseDelData) - end - end - describe 'test attribute "filename"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/artifacts_response_del_spec.rb b/emass_client/ruby_client/spec/models/artifacts_response_del_spec.rb deleted file mode 100644 index 8198569..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_response_del_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsResponseDel -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsResponseDel' do - before do - # run before each test - @instance = EmassClient::ArtifactsResponseDel.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsResponseDel' do - it 'should create an instance of ArtifactsResponseDel' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsResponseDel) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/artifacts_response_get_spec.rb b/emass_client/ruby_client/spec/models/artifacts_response_get_spec.rb deleted file mode 100644 index 229ba63..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsResponseGet' do - before do - # run before each test - @instance = EmassClient::ArtifactsResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsResponseGet' do - it 'should create an instance of ArtifactsResponseGet' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/artifacts_response_put_post_spec.rb b/emass_client/ruby_client/spec/models/artifacts_response_put_post_spec.rb deleted file mode 100644 index 65aff4a..0000000 --- a/emass_client/ruby_client/spec/models/artifacts_response_put_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ArtifactsResponsePutPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ArtifactsResponsePutPost' do - before do - # run before each test - @instance = EmassClient::ArtifactsResponsePutPost.new - end - - after do - # run after each test - end - - describe 'test an instance of ArtifactsResponsePutPost' do - it 'should create an instance of ArtifactsResponsePutPost' do - expect(@instance).to be_instance_of(EmassClient::ArtifactsResponsePutPost) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cac_get_spec.rb b/emass_client/ruby_client/spec/models/cac_get_spec.rb deleted file mode 100644 index 8262def..0000000 --- a/emass_client/ruby_client/spec/models/cac_get_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CacGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CacGet' do - before do - # run before each test - @instance = EmassClient::CacGet.new - end - - after do - # run after each test - end - - describe 'test an instance of CacGet' do - it 'should create an instance of CacGet' do - expect(@instance).to be_instance_of(EmassClient::CacGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control_acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "compliance_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Compliant", "Not Compliant", "No Status", "Not Applicable"]) - # validator.allowable_values.each do |value| - # expect { @instance.compliance_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "current_stage_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "current_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "total_stages"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cac_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/cac_request_post_body_spec.rb deleted file mode 100644 index 3cea6c5..0000000 --- a/emass_client/ruby_client/spec/models/cac_request_post_body_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CacRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CacRequestPostBody' do - before do - # run before each test - @instance = EmassClient::CacRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of CacRequestPostBody' do - it 'should create an instance of CacRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::CacRequestPostBody) - end - end - describe 'test attribute "control_acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cac_response_get_spec.rb b/emass_client/ruby_client/spec/models/cac_response_get_spec.rb deleted file mode 100644 index 16eb329..0000000 --- a/emass_client/ruby_client/spec/models/cac_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CacResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CacResponseGet' do - before do - # run before each test - @instance = EmassClient::CacResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of CacResponseGet' do - it 'should create an instance of CacResponseGet' do - expect(@instance).to be_instance_of(EmassClient::CacResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cac_response_post_data_spec.rb b/emass_client/ruby_client/spec/models/cac_response_post_data_spec.rb deleted file mode 100644 index 4564cb1..0000000 --- a/emass_client/ruby_client/spec/models/cac_response_post_data_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CacResponsePostData -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CacResponsePostData' do - before do - # run before each test - @instance = EmassClient::CacResponsePostData.new - end - - after do - # run after each test - end - - describe 'test an instance of CacResponsePostData' do - it 'should create an instance of CacResponsePostData' do - expect(@instance).to be_instance_of(EmassClient::CacResponsePostData) - end - end - describe 'test attribute "control_acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cac_response_post_spec.rb b/emass_client/ruby_client/spec/models/cac_response_post_spec.rb deleted file mode 100644 index dd71e3c..0000000 --- a/emass_client/ruby_client/spec/models/cac_response_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CacResponsePost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CacResponsePost' do - before do - # run before each test - @instance = EmassClient::CacResponsePost.new - end - - after do - # run after each test - end - - describe 'test an instance of CacResponsePost' do - it 'should create an instance of CacResponsePost' do - expect(@instance).to be_instance_of(EmassClient::CacResponsePost) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cmmc_get_spec.rb b/emass_client/ruby_client/spec/models/cmmc_get_spec.rb deleted file mode 100644 index 835485f..0000000 --- a/emass_client/ruby_client/spec/models/cmmc_get_spec.rb +++ /dev/null @@ -1,128 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CmmcGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CmmcGet' do - before do - # run before each test - @instance = EmassClient::CmmcGet.new - end - - after do - # run after each test - end - - describe 'test an instance of CmmcGet' do - it 'should create an instance of CmmcGet' do - expect(@instance).to be_instance_of(EmassClient::CmmcGet) - end - end - describe 'test attribute "operation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ADDED", "UPDATED", "DELETED"]) - # validator.allowable_values.each do |value| - # expect { @instance.operation = value }.not_to raise_error - # end - end - end - - describe 'test attribute "hq_organization_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "duns"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "unique_entity_identifier"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cage_codes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["89ED9; 99D8B", "34TH5; 23YH6", "75F8H; 2GH5I", "45RF9", "58H9L; 45UH8; 75F8H; 2GH5I"]) - # validator.allowable_values.each do |value| - # expect { @instance.cage_codes = value }.not_to raise_error - # end - end - end - - describe 'test attribute "osc_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scope"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Enterprise", "Non-Enterprise"]) - # validator.allowable_values.each do |value| - # expect { @instance.scope = value }.not_to raise_error - # end - end - end - - describe 'test attribute "scope_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "awarded_cmmc_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Not Certified", "Level 1", "Level 2", "Level 3", "Level 4", "Level 5"]) - # validator.allowable_values.each do |value| - # expect { @instance.awarded_cmmc_level = value }.not_to raise_error - # end - end - end - - describe 'test attribute "expiration_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "certificate_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "model_version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ssps"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/cmmc_response_get_spec.rb b/emass_client/ruby_client/spec/models/cmmc_response_get_spec.rb deleted file mode 100644 index e3353ea..0000000 --- a/emass_client/ruby_client/spec/models/cmmc_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::CmmcResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'CmmcResponseGet' do - before do - # run before each test - @instance = EmassClient::CmmcResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of CmmcResponseGet' do - it 'should create an instance of CmmcResponseGet' do - expect(@instance).to be_instance_of(EmassClient::CmmcResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/connectivity_ccsd_spec.rb b/emass_client/ruby_client/spec/models/connectivity_ccsd_spec.rb deleted file mode 100644 index 188f80e..0000000 --- a/emass_client/ruby_client/spec/models/connectivity_ccsd_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ConnectivityCcsd -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ConnectivityCcsd' do - before do - # run before each test - @instance = EmassClient::ConnectivityCcsd.new - end - - after do - # run after each test - end - - describe 'test an instance of ConnectivityCcsd' do - it 'should create an instance of ConnectivityCcsd' do - expect(@instance).to be_instance_of(EmassClient::ConnectivityCcsd) - end - end - describe 'test attribute "ccsd_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "connectivity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/controls_get_spec.rb b/emass_client/ruby_client/spec/models/controls_get_spec.rb deleted file mode 100644 index 834c5b0..0000000 --- a/emass_client/ruby_client/spec/models/controls_get_spec.rb +++ /dev/null @@ -1,262 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ControlsGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ControlsGet' do - before do - # run before each test - @instance = EmassClient::ControlsGet.new - end - - after do - # run after each test - end - - describe 'test an instance of ControlsGet' do - it 'should create an instance of ControlsGet' do - expect(@instance).to be_instance_of(EmassClient::ControlsGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ccis"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_inherited"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "modified_by_overlays"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Privacy", "Requirements", "Concurrency"]) - # validator.allowable_values.each do |value| - # expect { @instance.modified_by_overlays = value }.not_to raise_error - # end - end - end - - describe 'test attribute "included_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "compliance_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "responsible_entities"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "implementation_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Planned", "Implemented", "Inherited", "Not Applicable", "Manually Inherited"]) - # validator.allowable_values.each do |value| - # expect { @instance.implementation_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "common_control_provider"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DoD", "Component", "Enclave"]) - # validator.allowable_values.each do |value| - # expect { @instance.common_control_provider = value }.not_to raise_error - # end - end - end - - describe 'test attribute "na_justification"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control_designation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Common", "System-Specific", "Hybrid"]) - # validator.allowable_values.each do |value| - # expect { @instance.control_designation = value }.not_to raise_error - # end - end - end - - describe 'test attribute "estimated_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "implementation_narrative"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_criticality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_frequency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Constantly", "Daily", "Weekly", "Monthly", "Quarterly", "Semi-Annually", "Annually", "Every Two Years", "Every Three Years", "Undetermined"]) - # validator.allowable_values.each do |value| - # expect { @instance.slcm_frequency = value }.not_to raise_error - # end - end - end - - describe 'test attribute "slcm_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Automated", "Semi-Automated", "Manual", "Undetermined"]) - # validator.allowable_values.each do |value| - # expect { @instance.slcm_method = value }.not_to raise_error - # end - end - end - - describe 'test attribute "slcm_reporting"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_tracking"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "vulnerabilty_summary"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "recommendations"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "relevance_of_threat"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.relevance_of_threat = value }.not_to raise_error - # end - end - end - - describe 'test attribute "likelihood"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.likelihood = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.impact = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "residual_risk_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.residual_risk_level = value }.not_to raise_error - # end - end - end - - describe 'test attribute "test_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Test", "Interview", "Examine", "Test, Interview", "Test, Examine", "Interview, Examine", "Test, Interview, Examine"]) - # validator.allowable_values.each do |value| - # expect { @instance.test_method = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/controls_put_spec.rb b/emass_client/ruby_client/spec/models/controls_put_spec.rb deleted file mode 100644 index 21a89e3..0000000 --- a/emass_client/ruby_client/spec/models/controls_put_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ControlsPut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ControlsPut' do - before do - # run before each test - @instance = EmassClient::ControlsPut.new - end - - after do - # run after each test - end - - describe 'test an instance of ControlsPut' do - it 'should create an instance of ControlsPut' do - expect(@instance).to be_instance_of(EmassClient::ControlsPut) - end - end - describe 'test attribute "acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/controls_request_put_body_spec.rb b/emass_client/ruby_client/spec/models/controls_request_put_body_spec.rb deleted file mode 100644 index 700ae91..0000000 --- a/emass_client/ruby_client/spec/models/controls_request_put_body_spec.rb +++ /dev/null @@ -1,216 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ControlsRequestPutBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ControlsRequestPutBody' do - before do - # run before each test - @instance = EmassClient::ControlsRequestPutBody.new - end - - after do - # run after each test - end - - describe 'test an instance of ControlsRequestPutBody' do - it 'should create an instance of ControlsRequestPutBody' do - expect(@instance).to be_instance_of(EmassClient::ControlsRequestPutBody) - end - end - describe 'test attribute "acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "responsible_entities"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "implementation_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Planned", "Implemented", "Inherited", "Not Applicable", "Manually Inherited"]) - # validator.allowable_values.each do |value| - # expect { @instance.implementation_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "common_control_provider"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DoD", "Component", "Enclave"]) - # validator.allowable_values.each do |value| - # expect { @instance.common_control_provider = value }.not_to raise_error - # end - end - end - - describe 'test attribute "na_justification"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control_designation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Common", "System-Specific", "Hybrid"]) - # validator.allowable_values.each do |value| - # expect { @instance.control_designation = value }.not_to raise_error - # end - end - end - - describe 'test attribute "test_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Test", "Interview", "Examine", "Test, Interview", "Test, Examine", "Interview, Examine", "Test, Interview, Examine"]) - # validator.allowable_values.each do |value| - # expect { @instance.test_method = value }.not_to raise_error - # end - end - end - - describe 'test attribute "estimated_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "implementation_narrative"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_criticality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_frequency"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Constantly", "Daily", "Weekly", "Monthly", "Quarterly", "Semi-Annually", "Annually", "Every Two Years", "Every Three Years", "Undetermined"]) - # validator.allowable_values.each do |value| - # expect { @instance.slcm_frequency = value }.not_to raise_error - # end - end - end - - describe 'test attribute "slcm_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Automated", "Semi-Automated", "Manual", "Undetermined"]) - # validator.allowable_values.each do |value| - # expect { @instance.slcm_method = value }.not_to raise_error - # end - end - end - - describe 'test attribute "slcm_reporting"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_tracking"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "slcm_comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "vulnerabilty_summary"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "recommendations"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "relevance_of_threat"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.relevance_of_threat = value }.not_to raise_error - # end - end - end - - describe 'test attribute "likelihood"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.likelihood = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.impact = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "residual_risk_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.residual_risk_level = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/controls_response_get_spec.rb b/emass_client/ruby_client/spec/models/controls_response_get_spec.rb deleted file mode 100644 index 880fa43..0000000 --- a/emass_client/ruby_client/spec/models/controls_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ControlsResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ControlsResponseGet' do - before do - # run before each test - @instance = EmassClient::ControlsResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of ControlsResponseGet' do - it 'should create an instance of ControlsResponseGet' do - expect(@instance).to be_instance_of(EmassClient::ControlsResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/controls_response_put_spec.rb b/emass_client/ruby_client/spec/models/controls_response_put_spec.rb deleted file mode 100644 index abde8ed..0000000 --- a/emass_client/ruby_client/spec/models/controls_response_put_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::ControlsResponsePut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'ControlsResponsePut' do - before do - # run before each test - @instance = EmassClient::ControlsResponsePut.new - end - - after do - # run after each test - end - - describe 'test an instance of ControlsResponsePut' do - it 'should create an instance of ControlsResponsePut' do - expect(@instance).to be_instance_of(EmassClient::ControlsResponsePut) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/definition_transitions_spec.rb b/emass_client/ruby_client/spec/models/definition_transitions_spec.rb deleted file mode 100644 index d1f4a7e..0000000 --- a/emass_client/ruby_client/spec/models/definition_transitions_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::DefinitionTransitions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'DefinitionTransitions' do - before do - # run before each test - @instance = EmassClient::DefinitionTransitions.new - end - - after do - # run after each test - end - - describe 'test an instance of DefinitionTransitions' do - it 'should create an instance of DefinitionTransitions' do - expect(@instance).to be_instance_of(EmassClient::DefinitionTransitions) - end - end - describe 'test attribute "end_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Categorize System", "Submit Categorization", "Cancelled", "Cancel", "Complete"]) - # validator.allowable_values.each do |value| - # expect { @instance.end_stage = value }.not_to raise_error - # end - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Initiate Workflow", "Approve", "Disapprove and Move Forward", "Cancel", "Deny"]) - # validator.allowable_values.each do |value| - # expect { @instance.description = value }.not_to raise_error - # end - end - end - - describe 'test attribute "roles"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["PM/ISO", "System Admin", "eMASS System Admin", "ISSE", "ISSM", "IO", "Other", "Unknown"]) - # validator.allowable_values.each do |value| - # expect { @instance.roles = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/delete_milestone_spec.rb b/emass_client/ruby_client/spec/models/delete_milestone_spec.rb deleted file mode 100644 index 0e7f1bd..0000000 --- a/emass_client/ruby_client/spec/models/delete_milestone_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::DeleteMilestone -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'DeleteMilestone' do - before do - # run before each test - @instance = EmassClient::DeleteMilestone.new - end - - after do - # run after each test - end - - describe 'test an instance of DeleteMilestone' do - it 'should create an instance of DeleteMilestone' do - expect(@instance).to be_instance_of(EmassClient::DeleteMilestone) - end - end - describe 'test attribute "milestone_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/delete_poam_spec.rb b/emass_client/ruby_client/spec/models/delete_poam_spec.rb deleted file mode 100644 index d7d8ad7..0000000 --- a/emass_client/ruby_client/spec/models/delete_poam_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::DeletePoam -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'DeletePoam' do - before do - # run before each test - @instance = EmassClient::DeletePoam.new - end - - after do - # run after each test - end - - describe 'test an instance of DeletePoam' do - it 'should create an instance of DeletePoam' do - expect(@instance).to be_instance_of(EmassClient::DeletePoam) - end - end - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/empty200_response_spec.rb b/emass_client/ruby_client/spec/models/empty200_response_spec.rb deleted file mode 100644 index 7d8759a..0000000 --- a/emass_client/ruby_client/spec/models/empty200_response_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Empty200Response -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Empty200Response' do - before do - # run before each test - @instance = EmassClient::Empty200Response.new - end - - after do - # run after each test - end - - describe 'test an instance of Empty200Response' do - it 'should create an instance of Empty200Response' do - expect(@instance).to be_instance_of(EmassClient::Empty200Response) - end - end -end diff --git a/emass_client/ruby_client/spec/models/error_spec.rb b/emass_client/ruby_client/spec/models/error_spec.rb deleted file mode 100644 index 4bcbb12..0000000 --- a/emass_client/ruby_client/spec/models/error_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Error -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Error' do - before do - # run before each test - @instance = EmassClient::Error.new - end - - after do - # run after each test - end - - describe 'test an instance of Error' do - it 'should create an instance of Error' do - expect(@instance).to be_instance_of(EmassClient::Error) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/instances_transitions_spec.rb b/emass_client/ruby_client/spec/models/instances_transitions_spec.rb deleted file mode 100644 index 91303bc..0000000 --- a/emass_client/ruby_client/spec/models/instances_transitions_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::InstancesTransitions -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'InstancesTransitions' do - before do - # run before each test - @instance = EmassClient::InstancesTransitions.new - end - - after do - # run after each test - end - - describe 'test an instance of InstancesTransitions' do - it 'should create an instance of InstancesTransitions' do - expect(@instance).to be_instance_of(EmassClient::InstancesTransitions) - end - end - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Approved the categorization", "Submitted the categorization", "Categorized the system as HMM", "Selected POA&M Items"]) - # validator.allowable_values.each do |value| - # expect { @instance.comments = value }.not_to raise_error - # end - end - end - - describe 'test attribute "created_by"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "created_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Initiate Workflow", "Approve", "Submit New Package", "Disapprove and Move Forward", "Cancel", "Deny"]) - # validator.allowable_values.each do |value| - # expect { @instance.description = value }.not_to raise_error - # end - end - end - - describe 'test attribute "end_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PM/ISO", "Echelon I", "Echelon II", "Echelon III", "Categorize System", "Submit Categorization", "Approval", "Complete"]) - # validator.allowable_values.each do |value| - # expect { @instance.end_stage = value }.not_to raise_error - # end - end - end - - describe 'test attribute "start_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Not Started", "PM/ISO", "Categorize System", "Submit Categorization", "Approval", "Deny"]) - # validator.allowable_values.each do |value| - # expect { @instance.start_stage = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestone_response_get_spec.rb b/emass_client/ruby_client/spec/models/milestone_response_get_spec.rb deleted file mode 100644 index 7b05023..0000000 --- a/emass_client/ruby_client/spec/models/milestone_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestoneResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestoneResponseGet' do - before do - # run before each test - @instance = EmassClient::MilestoneResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestoneResponseGet' do - it 'should create an instance of MilestoneResponseGet' do - expect(@instance).to be_instance_of(EmassClient::MilestoneResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestone_response_post_spec.rb b/emass_client/ruby_client/spec/models/milestone_response_post_spec.rb deleted file mode 100644 index c636d35..0000000 --- a/emass_client/ruby_client/spec/models/milestone_response_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestoneResponsePost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestoneResponsePost' do - before do - # run before each test - @instance = EmassClient::MilestoneResponsePost.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestoneResponsePost' do - it 'should create an instance of MilestoneResponsePost' do - expect(@instance).to be_instance_of(EmassClient::MilestoneResponsePost) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestone_response_put_spec.rb b/emass_client/ruby_client/spec/models/milestone_response_put_spec.rb deleted file mode 100644 index 9bac04c..0000000 --- a/emass_client/ruby_client/spec/models/milestone_response_put_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestoneResponsePut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestoneResponsePut' do - before do - # run before each test - @instance = EmassClient::MilestoneResponsePut.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestoneResponsePut' do - it 'should create an instance of MilestoneResponsePut' do - expect(@instance).to be_instance_of(EmassClient::MilestoneResponsePut) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestones_delete_spec.rb b/emass_client/ruby_client/spec/models/milestones_delete_spec.rb deleted file mode 100644 index be4999e..0000000 --- a/emass_client/ruby_client/spec/models/milestones_delete_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesDelete -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesDelete' do - before do - # run before each test - @instance = EmassClient::MilestonesDelete.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesDelete' do - it 'should create an instance of MilestonesDelete' do - expect(@instance).to be_instance_of(EmassClient::MilestonesDelete) - end - end -end diff --git a/emass_client/ruby_client/spec/models/milestones_get_spec.rb b/emass_client/ruby_client/spec/models/milestones_get_spec.rb deleted file mode 100644 index 1067f71..0000000 --- a/emass_client/ruby_client/spec/models/milestones_get_spec.rb +++ /dev/null @@ -1,74 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesGet' do - before do - # run before each test - @instance = EmassClient::MilestonesGet.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesGet' do - it 'should create an instance of MilestonesGet' do - expect(@instance).to be_instance_of(EmassClient::MilestonesGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "milestone_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "review_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved"]) - # validator.allowable_values.each do |value| - # expect { @instance.review_status = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestones_post_spec.rb b/emass_client/ruby_client/spec/models/milestones_post_spec.rb deleted file mode 100644 index 1c9905f..0000000 --- a/emass_client/ruby_client/spec/models/milestones_post_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesPost' do - before do - # run before each test - @instance = EmassClient::MilestonesPost.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesPost' do - it 'should create an instance of MilestonesPost' do - expect(@instance).to be_instance_of(EmassClient::MilestonesPost) - end - end -end diff --git a/emass_client/ruby_client/spec/models/milestones_put_post_delete_spec.rb b/emass_client/ruby_client/spec/models/milestones_put_post_delete_spec.rb deleted file mode 100644 index bef2e40..0000000 --- a/emass_client/ruby_client/spec/models/milestones_put_post_delete_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesPutPostDelete -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesPutPostDelete' do - before do - # run before each test - @instance = EmassClient::MilestonesPutPostDelete.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesPutPostDelete' do - it 'should create an instance of MilestonesPutPostDelete' do - expect(@instance).to be_instance_of(EmassClient::MilestonesPutPostDelete) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "milestone_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "external_uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestones_put_spec.rb b/emass_client/ruby_client/spec/models/milestones_put_spec.rb deleted file mode 100644 index daded34..0000000 --- a/emass_client/ruby_client/spec/models/milestones_put_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesPut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesPut' do - before do - # run before each test - @instance = EmassClient::MilestonesPut.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesPut' do - it 'should create an instance of MilestonesPut' do - expect(@instance).to be_instance_of(EmassClient::MilestonesPut) - end - end -end diff --git a/emass_client/ruby_client/spec/models/milestones_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/milestones_request_post_body_spec.rb deleted file mode 100644 index ee5e600..0000000 --- a/emass_client/ruby_client/spec/models/milestones_request_post_body_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesRequestPostBody' do - before do - # run before each test - @instance = EmassClient::MilestonesRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesRequestPostBody' do - it 'should create an instance of MilestonesRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::MilestonesRequestPostBody) - end - end - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestones_request_put_body_spec.rb b/emass_client/ruby_client/spec/models/milestones_request_put_body_spec.rb deleted file mode 100644 index e78929d..0000000 --- a/emass_client/ruby_client/spec/models/milestones_request_put_body_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesRequestPutBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesRequestPutBody' do - before do - # run before each test - @instance = EmassClient::MilestonesRequestPutBody.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesRequestPutBody' do - it 'should create an instance of MilestonesRequestPutBody' do - expect(@instance).to be_instance_of(EmassClient::MilestonesRequestPutBody) - end - end - describe 'test attribute "milestone_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestones_required_post_spec.rb b/emass_client/ruby_client/spec/models/milestones_required_post_spec.rb deleted file mode 100644 index f78a01e..0000000 --- a/emass_client/ruby_client/spec/models/milestones_required_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesRequiredPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesRequiredPost' do - before do - # run before each test - @instance = EmassClient::MilestonesRequiredPost.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesRequiredPost' do - it 'should create an instance of MilestonesRequiredPost' do - expect(@instance).to be_instance_of(EmassClient::MilestonesRequiredPost) - end - end - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/milestones_required_put_spec.rb b/emass_client/ruby_client/spec/models/milestones_required_put_spec.rb deleted file mode 100644 index e7087f5..0000000 --- a/emass_client/ruby_client/spec/models/milestones_required_put_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::MilestonesRequiredPut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'MilestonesRequiredPut' do - before do - # run before each test - @instance = EmassClient::MilestonesRequiredPut.new - end - - after do - # run after each test - end - - describe 'test an instance of MilestonesRequiredPut' do - it 'should create an instance of MilestonesRequiredPut' do - expect(@instance).to be_instance_of(EmassClient::MilestonesRequiredPut) - end - end - describe 'test attribute "milestone_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_200_spec.rb b/emass_client/ruby_client/spec/models/model_200_spec.rb deleted file mode 100644 index 9948201..0000000 --- a/emass_client/ruby_client/spec/models/model_200_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model200 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model200' do - before do - # run before each test - @instance = EmassClient::Model200.new - end - - after do - # run after each test - end - - describe 'test an instance of Model200' do - it 'should create an instance of Model200' do - expect(@instance).to be_instance_of(EmassClient::Model200) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_201_meta_spec.rb b/emass_client/ruby_client/spec/models/model_201_meta_spec.rb deleted file mode 100644 index 3b43fe4..0000000 --- a/emass_client/ruby_client/spec/models/model_201_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model201Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model201Meta' do - before do - # run before each test - @instance = EmassClient::Model201Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model201Meta' do - it 'should create an instance of Model201Meta' do - expect(@instance).to be_instance_of(EmassClient::Model201Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_201_spec.rb b/emass_client/ruby_client/spec/models/model_201_spec.rb deleted file mode 100644 index bd76855..0000000 --- a/emass_client/ruby_client/spec/models/model_201_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model201 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model201' do - before do - # run before each test - @instance = EmassClient::Model201.new - end - - after do - # run after each test - end - - describe 'test an instance of Model201' do - it 'should create an instance of Model201' do - expect(@instance).to be_instance_of(EmassClient::Model201) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_400_meta_spec.rb b/emass_client/ruby_client/spec/models/model_400_meta_spec.rb deleted file mode 100644 index 9cfed0a..0000000 --- a/emass_client/ruby_client/spec/models/model_400_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model400Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model400Meta' do - before do - # run before each test - @instance = EmassClient::Model400Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model400Meta' do - it 'should create an instance of Model400Meta' do - expect(@instance).to be_instance_of(EmassClient::Model400Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_400_response_spec.rb b/emass_client/ruby_client/spec/models/model_400_response_spec.rb deleted file mode 100644 index 2002b18..0000000 --- a/emass_client/ruby_client/spec/models/model_400_response_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model400Response -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model400Response' do - before do - # run before each test - @instance = EmassClient::Model400Response.new - end - - after do - # run after each test - end - - describe 'test an instance of Model400Response' do - it 'should create an instance of Model400Response' do - expect(@instance).to be_instance_of(EmassClient::Model400Response) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_400_spec.rb b/emass_client/ruby_client/spec/models/model_400_spec.rb deleted file mode 100644 index 964a75f..0000000 --- a/emass_client/ruby_client/spec/models/model_400_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model400 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model400' do - before do - # run before each test - @instance = EmassClient::Model400.new - end - - after do - # run after each test - end - - describe 'test an instance of Model400' do - it 'should create an instance of Model400' do - expect(@instance).to be_instance_of(EmassClient::Model400) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_401_meta_spec.rb b/emass_client/ruby_client/spec/models/model_401_meta_spec.rb deleted file mode 100644 index 3fe27dd..0000000 --- a/emass_client/ruby_client/spec/models/model_401_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model401Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model401Meta' do - before do - # run before each test - @instance = EmassClient::Model401Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model401Meta' do - it 'should create an instance of Model401Meta' do - expect(@instance).to be_instance_of(EmassClient::Model401Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_401_spec.rb b/emass_client/ruby_client/spec/models/model_401_spec.rb deleted file mode 100644 index 4086514..0000000 --- a/emass_client/ruby_client/spec/models/model_401_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model401 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model401' do - before do - # run before each test - @instance = EmassClient::Model401.new - end - - after do - # run after each test - end - - describe 'test an instance of Model401' do - it 'should create an instance of Model401' do - expect(@instance).to be_instance_of(EmassClient::Model401) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_403_meta_spec.rb b/emass_client/ruby_client/spec/models/model_403_meta_spec.rb deleted file mode 100644 index 1f7fe5e..0000000 --- a/emass_client/ruby_client/spec/models/model_403_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model403Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model403Meta' do - before do - # run before each test - @instance = EmassClient::Model403Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model403Meta' do - it 'should create an instance of Model403Meta' do - expect(@instance).to be_instance_of(EmassClient::Model403Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_403_spec.rb b/emass_client/ruby_client/spec/models/model_403_spec.rb deleted file mode 100644 index 704bd80..0000000 --- a/emass_client/ruby_client/spec/models/model_403_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model403 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model403' do - before do - # run before each test - @instance = EmassClient::Model403.new - end - - after do - # run after each test - end - - describe 'test an instance of Model403' do - it 'should create an instance of Model403' do - expect(@instance).to be_instance_of(EmassClient::Model403) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_404_response_spec.rb b/emass_client/ruby_client/spec/models/model_404_response_spec.rb deleted file mode 100644 index 5b1d39c..0000000 --- a/emass_client/ruby_client/spec/models/model_404_response_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model404Response -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model404Response' do - before do - # run before each test - @instance = EmassClient::Model404Response.new - end - - after do - # run after each test - end - - describe 'test an instance of Model404Response' do - it 'should create an instance of Model404Response' do - expect(@instance).to be_instance_of(EmassClient::Model404Response) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_404_spec.rb b/emass_client/ruby_client/spec/models/model_404_spec.rb deleted file mode 100644 index 61b12ba..0000000 --- a/emass_client/ruby_client/spec/models/model_404_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model404 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model404' do - before do - # run before each test - @instance = EmassClient::Model404.new - end - - after do - # run after each test - end - - describe 'test an instance of Model404' do - it 'should create an instance of Model404' do - expect(@instance).to be_instance_of(EmassClient::Model404) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_405_meta_spec.rb b/emass_client/ruby_client/spec/models/model_405_meta_spec.rb deleted file mode 100644 index 29d13ea..0000000 --- a/emass_client/ruby_client/spec/models/model_405_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model405Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model405Meta' do - before do - # run before each test - @instance = EmassClient::Model405Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model405Meta' do - it 'should create an instance of Model405Meta' do - expect(@instance).to be_instance_of(EmassClient::Model405Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_405_spec.rb b/emass_client/ruby_client/spec/models/model_405_spec.rb deleted file mode 100644 index a6e62c2..0000000 --- a/emass_client/ruby_client/spec/models/model_405_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model405 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model405' do - before do - # run before each test - @instance = EmassClient::Model405.new - end - - after do - # run after each test - end - - describe 'test an instance of Model405' do - it 'should create an instance of Model405' do - expect(@instance).to be_instance_of(EmassClient::Model405) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_411_meta_spec.rb b/emass_client/ruby_client/spec/models/model_411_meta_spec.rb deleted file mode 100644 index 9118d2c..0000000 --- a/emass_client/ruby_client/spec/models/model_411_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model411Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model411Meta' do - before do - # run before each test - @instance = EmassClient::Model411Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model411Meta' do - it 'should create an instance of Model411Meta' do - expect(@instance).to be_instance_of(EmassClient::Model411Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_411_spec.rb b/emass_client/ruby_client/spec/models/model_411_spec.rb deleted file mode 100644 index d5326ca..0000000 --- a/emass_client/ruby_client/spec/models/model_411_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model411 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model411' do - before do - # run before each test - @instance = EmassClient::Model411.new - end - - after do - # run after each test - end - - describe 'test an instance of Model411' do - it 'should create an instance of Model411' do - expect(@instance).to be_instance_of(EmassClient::Model411) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_490_meta_spec.rb b/emass_client/ruby_client/spec/models/model_490_meta_spec.rb deleted file mode 100644 index 0673cd6..0000000 --- a/emass_client/ruby_client/spec/models/model_490_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model490Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model490Meta' do - before do - # run before each test - @instance = EmassClient::Model490Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model490Meta' do - it 'should create an instance of Model490Meta' do - expect(@instance).to be_instance_of(EmassClient::Model490Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_490_spec.rb b/emass_client/ruby_client/spec/models/model_490_spec.rb deleted file mode 100644 index 7eb30b3..0000000 --- a/emass_client/ruby_client/spec/models/model_490_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model490 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model490' do - before do - # run before each test - @instance = EmassClient::Model490.new - end - - after do - # run after each test - end - - describe 'test an instance of Model490' do - it 'should create an instance of Model490' do - expect(@instance).to be_instance_of(EmassClient::Model490) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_500_meta_spec.rb b/emass_client/ruby_client/spec/models/model_500_meta_spec.rb deleted file mode 100644 index 76020aa..0000000 --- a/emass_client/ruby_client/spec/models/model_500_meta_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model500Meta -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model500Meta' do - before do - # run before each test - @instance = EmassClient::Model500Meta.new - end - - after do - # run after each test - end - - describe 'test an instance of Model500Meta' do - it 'should create an instance of Model500Meta' do - expect(@instance).to be_instance_of(EmassClient::Model500Meta) - end - end - describe 'test attribute "code"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "error_message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/model_500_spec.rb b/emass_client/ruby_client/spec/models/model_500_spec.rb deleted file mode 100644 index ef96b37..0000000 --- a/emass_client/ruby_client/spec/models/model_500_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Model500 -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Model500' do - before do - # run before each test - @instance = EmassClient::Model500.new - end - - after do - # run after each test - end - - describe 'test an instance of Model500' do - it 'should create an instance of Model500' do - expect(@instance).to be_instance_of(EmassClient::Model500) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/pac_get_spec.rb b/emass_client/ruby_client/spec/models/pac_get_spec.rb deleted file mode 100644 index ec99745..0000000 --- a/emass_client/ruby_client/spec/models/pac_get_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PacGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PacGet' do - before do - # run before each test - @instance = EmassClient::PacGet.new - end - - after do - # run after each test - end - - describe 'test an instance of PacGet' do - it 'should create an instance of PacGet' do - expect(@instance).to be_instance_of(EmassClient::PacGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "workflow"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval"]) - # validator.allowable_values.each do |value| - # expect { @instance.workflow = value }.not_to raise_error - # end - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "current_stage_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "current_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "total_stages"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "days_at_current_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/pac_post_spec.rb b/emass_client/ruby_client/spec/models/pac_post_spec.rb deleted file mode 100644 index 6053ab1..0000000 --- a/emass_client/ruby_client/spec/models/pac_post_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PacPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PacPost' do - before do - # run before each test - @instance = EmassClient::PacPost.new - end - - after do - # run after each test - end - - describe 'test an instance of PacPost' do - it 'should create an instance of PacPost' do - expect(@instance).to be_instance_of(EmassClient::PacPost) - end - end - describe 'test attribute "workflow"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval"]) - # validator.allowable_values.each do |value| - # expect { @instance.workflow = value }.not_to raise_error - # end - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/pac_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/pac_request_post_body_spec.rb deleted file mode 100644 index 4019765..0000000 --- a/emass_client/ruby_client/spec/models/pac_request_post_body_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PacRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PacRequestPostBody' do - before do - # run before each test - @instance = EmassClient::PacRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of PacRequestPostBody' do - it 'should create an instance of PacRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::PacRequestPostBody) - end - end - describe 'test attribute "workflow"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval"]) - # validator.allowable_values.each do |value| - # expect { @instance.workflow = value }.not_to raise_error - # end - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/pac_response_get_spec.rb b/emass_client/ruby_client/spec/models/pac_response_get_spec.rb deleted file mode 100644 index 5a0ce0f..0000000 --- a/emass_client/ruby_client/spec/models/pac_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PacResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PacResponseGet' do - before do - # run before each test - @instance = EmassClient::PacResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of PacResponseGet' do - it 'should create an instance of PacResponseGet' do - expect(@instance).to be_instance_of(EmassClient::PacResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/pac_response_post_spec.rb b/emass_client/ruby_client/spec/models/pac_response_post_spec.rb deleted file mode 100644 index c0d2947..0000000 --- a/emass_client/ruby_client/spec/models/pac_response_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PacResponsePost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PacResponsePost' do - before do - # run before each test - @instance = EmassClient::PacResponsePost.new - end - - after do - # run after each test - end - - describe 'test an instance of PacResponsePost' do - it 'should create an instance of PacResponsePost' do - expect(@instance).to be_instance_of(EmassClient::PacResponsePost) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_delete_spec.rb b/emass_client/ruby_client/spec/models/poam_delete_spec.rb deleted file mode 100644 index d958753..0000000 --- a/emass_client/ruby_client/spec/models/poam_delete_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamDelete -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamDelete' do - before do - # run before each test - @instance = EmassClient::PoamDelete.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamDelete' do - it 'should create an instance of PoamDelete' do - expect(@instance).to be_instance_of(EmassClient::PoamDelete) - end - end -end diff --git a/emass_client/ruby_client/spec/models/poam_get_spec.rb b/emass_client/ruby_client/spec/models/poam_get_spec.rb deleted file mode 100644 index a2e8ed9..0000000 --- a/emass_client/ruby_client/spec/models/poam_get_spec.rb +++ /dev/null @@ -1,264 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamGet' do - before do - # run before each test - @instance = EmassClient::PoamGet.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamGet' do - it 'should create an instance of PoamGet' do - expect(@instance).to be_instance_of(EmassClient::PoamGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "display_poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_inherited"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "external_uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control_acronyms"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cci"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Ongoing", "Risk Accepted", "Completed", "Not Applicable"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "review_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved"]) - # validator.allowable_values.each do |value| - # expect { @instance.review_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "vulnerability_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "source_ident_vuln"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "security_checks"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "milestones"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_organization"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "raw_severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["I", "II", "III"]) - # validator.allowable_values.each do |value| - # expect { @instance.raw_severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "relevance_of_threat"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.relevance_of_threat = value }.not_to raise_error - # end - end - end - - describe 'test attribute "likelihood"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.likelihood = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.impact = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "residual_risk_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.residual_risk_level = value }.not_to raise_error - # end - end - end - - describe 'test attribute "recommendations"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "resources"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "extension_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mitigation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_active"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_post_put_del_spec.rb b/emass_client/ruby_client/spec/models/poam_post_put_del_spec.rb deleted file mode 100644 index fdaf649..0000000 --- a/emass_client/ruby_client/spec/models/poam_post_put_del_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamPostPutDel -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamPostPutDel' do - before do - # run before each test - @instance = EmassClient::PoamPostPutDel.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamPostPutDel' do - it 'should create an instance of PoamPostPutDel' do - expect(@instance).to be_instance_of(EmassClient::PoamPostPutDel) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "external_uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_post_spec.rb b/emass_client/ruby_client/spec/models/poam_post_spec.rb deleted file mode 100644 index eba02b7..0000000 --- a/emass_client/ruby_client/spec/models/poam_post_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamPost' do - before do - # run before each test - @instance = EmassClient::PoamPost.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamPost' do - it 'should create an instance of PoamPost' do - expect(@instance).to be_instance_of(EmassClient::PoamPost) - end - end -end diff --git a/emass_client/ruby_client/spec/models/poam_put_spec.rb b/emass_client/ruby_client/spec/models/poam_put_spec.rb deleted file mode 100644 index 5e1a47b..0000000 --- a/emass_client/ruby_client/spec/models/poam_put_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamPut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamPut' do - before do - # run before each test - @instance = EmassClient::PoamPut.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamPut' do - it 'should create an instance of PoamPut' do - expect(@instance).to be_instance_of(EmassClient::PoamPut) - end - end -end diff --git a/emass_client/ruby_client/spec/models/poam_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/poam_request_post_body_spec.rb deleted file mode 100644 index 224d72a..0000000 --- a/emass_client/ruby_client/spec/models/poam_request_post_body_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamRequestPostBody' do - before do - # run before each test - @instance = EmassClient::PoamRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamRequestPostBody' do - it 'should create an instance of PoamRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::PoamRequestPostBody) - end - end -end diff --git a/emass_client/ruby_client/spec/models/poam_request_put_body_spec.rb b/emass_client/ruby_client/spec/models/poam_request_put_body_spec.rb deleted file mode 100644 index 6ec327f..0000000 --- a/emass_client/ruby_client/spec/models/poam_request_put_body_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamRequestPutBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamRequestPutBody' do - before do - # run before each test - @instance = EmassClient::PoamRequestPutBody.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamRequestPutBody' do - it 'should create an instance of PoamRequestPutBody' do - expect(@instance).to be_instance_of(EmassClient::PoamRequestPutBody) - end - end -end diff --git a/emass_client/ruby_client/spec/models/poam_required_post_spec.rb b/emass_client/ruby_client/spec/models/poam_required_post_spec.rb deleted file mode 100644 index 258ffc0..0000000 --- a/emass_client/ruby_client/spec/models/poam_required_post_spec.rb +++ /dev/null @@ -1,218 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamRequiredPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamRequiredPost' do - before do - # run before each test - @instance = EmassClient::PoamRequiredPost.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamRequiredPost' do - it 'should create an instance of PoamRequiredPost' do - expect(@instance).to be_instance_of(EmassClient::PoamRequiredPost) - end - end - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Ongoing", "Risk Accepted", "Completed", "Not Applicable"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "vulnerability_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "source_ident_vuln"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_organization"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "resources"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "external_uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control_acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cci"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "security_checks"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "raw_severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["I", "II", "III"]) - # validator.allowable_values.each do |value| - # expect { @instance.raw_severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "relevance_of_threat"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.relevance_of_threat = value }.not_to raise_error - # end - end - end - - describe 'test attribute "likelihood"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.likelihood = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.impact = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "residual_risk_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.residual_risk_level = value }.not_to raise_error - # end - end - end - - describe 'test attribute "recommendations"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mitigation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "milestones"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_required_put_spec.rb b/emass_client/ruby_client/spec/models/poam_required_put_spec.rb deleted file mode 100644 index c6222b8..0000000 --- a/emass_client/ruby_client/spec/models/poam_required_put_spec.rb +++ /dev/null @@ -1,236 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamRequiredPut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamRequiredPut' do - before do - # run before each test - @instance = EmassClient::PoamRequiredPut.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamRequiredPut' do - it 'should create an instance of PoamRequiredPut' do - expect(@instance).to be_instance_of(EmassClient::PoamRequiredPut) - end - end - describe 'test attribute "poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "display_poam_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Ongoing", "Risk Accepted", "Completed", "Not Applicable"]) - # validator.allowable_values.each do |value| - # expect { @instance.status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "vulnerability_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "source_ident_vuln"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_organization"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "resources"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "external_uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control_acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cci"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "security_checks"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "raw_severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["I", "II", "III"]) - # validator.allowable_values.each do |value| - # expect { @instance.raw_severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "relevance_of_threat"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.relevance_of_threat = value }.not_to raise_error - # end - end - end - - describe 'test attribute "likelihood"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.likelihood = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.impact = value }.not_to raise_error - # end - end - end - - describe 'test attribute "impact_description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "residual_risk_level"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.residual_risk_level = value }.not_to raise_error - # end - end - end - - describe 'test attribute "recommendations"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mitigation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "poc_phone_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High"]) - # validator.allowable_values.each do |value| - # expect { @instance.severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "comments"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_active"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "milestones"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_response_delete_spec.rb b/emass_client/ruby_client/spec/models/poam_response_delete_spec.rb deleted file mode 100644 index 47c85c4..0000000 --- a/emass_client/ruby_client/spec/models/poam_response_delete_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamResponseDelete -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamResponseDelete' do - before do - # run before each test - @instance = EmassClient::PoamResponseDelete.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamResponseDelete' do - it 'should create an instance of PoamResponseDelete' do - expect(@instance).to be_instance_of(EmassClient::PoamResponseDelete) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_response_get_spec.rb b/emass_client/ruby_client/spec/models/poam_response_get_spec.rb deleted file mode 100644 index 472d859..0000000 --- a/emass_client/ruby_client/spec/models/poam_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamResponseGet' do - before do - # run before each test - @instance = EmassClient::PoamResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamResponseGet' do - it 'should create an instance of PoamResponseGet' do - expect(@instance).to be_instance_of(EmassClient::PoamResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_response_post_spec.rb b/emass_client/ruby_client/spec/models/poam_response_post_spec.rb deleted file mode 100644 index dc9aafa..0000000 --- a/emass_client/ruby_client/spec/models/poam_response_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamResponsePost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamResponsePost' do - before do - # run before each test - @instance = EmassClient::PoamResponsePost.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamResponsePost' do - it 'should create an instance of PoamResponsePost' do - expect(@instance).to be_instance_of(EmassClient::PoamResponsePost) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/poam_response_put_spec.rb b/emass_client/ruby_client/spec/models/poam_response_put_spec.rb deleted file mode 100644 index 4dabb98..0000000 --- a/emass_client/ruby_client/spec/models/poam_response_put_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::PoamResponsePut -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'PoamResponsePut' do - before do - # run before each test - @instance = EmassClient::PoamResponsePut.new - end - - after do - # run after each test - end - - describe 'test an instance of PoamResponsePut' do - it 'should create an instance of PoamResponsePut' do - expect(@instance).to be_instance_of(EmassClient::PoamResponsePut) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/register_data_spec.rb b/emass_client/ruby_client/spec/models/register_data_spec.rb deleted file mode 100644 index a6e0034..0000000 --- a/emass_client/ruby_client/spec/models/register_data_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::RegisterData -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'RegisterData' do - before do - # run before each test - @instance = EmassClient::RegisterData.new - end - - after do - # run after each test - end - - describe 'test an instance of RegisterData' do - it 'should create an instance of RegisterData' do - expect(@instance).to be_instance_of(EmassClient::RegisterData) - end - end - describe 'test attribute "apikey"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/register_spec.rb b/emass_client/ruby_client/spec/models/register_spec.rb deleted file mode 100644 index 44b00d7..0000000 --- a/emass_client/ruby_client/spec/models/register_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Register -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Register' do - before do - # run before each test - @instance = EmassClient::Register.new - end - - after do - # run after each test - end - - describe 'test an instance of Register' do - it 'should create an instance of Register' do - expect(@instance).to be_instance_of(EmassClient::Register) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/register_user_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/register_user_request_post_body_spec.rb deleted file mode 100644 index 54c9fea..0000000 --- a/emass_client/ruby_client/spec/models/register_user_request_post_body_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::RegisterUserRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'RegisterUserRequestPostBody' do - before do - # run before each test - @instance = EmassClient::RegisterUserRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of RegisterUserRequestPostBody' do - it 'should create an instance of RegisterUserRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::RegisterUserRequestPostBody) - end - end - describe 'test attribute "user_uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/role_category_spec.rb b/emass_client/ruby_client/spec/models/role_category_spec.rb deleted file mode 100644 index bddad2f..0000000 --- a/emass_client/ruby_client/spec/models/role_category_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::RoleCategory -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'RoleCategory' do - before do - # run before each test - @instance = EmassClient::RoleCategory.new - end - - after do - # run after each test - end - - describe 'test an instance of RoleCategory' do - it 'should create an instance of RoleCategory' do - expect(@instance).to be_instance_of(EmassClient::RoleCategory) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Test system 1", "Test system 2", "Test system 3", "Test system 4"]) - # validator.allowable_values.each do |value| - # expect { @instance.system_name = value }.not_to raise_error - # end - end - end - - describe 'test attribute "system_acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "roles"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/roles_spec.rb b/emass_client/ruby_client/spec/models/roles_spec.rb deleted file mode 100644 index f60f8e2..0000000 --- a/emass_client/ruby_client/spec/models/roles_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Roles -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Roles' do - before do - # run before each test - @instance = EmassClient::Roles.new - end - - after do - # run after each test - end - - describe 'test an instance of Roles' do - it 'should create an instance of Roles' do - expect(@instance).to be_instance_of(EmassClient::Roles) - end - end - describe 'test attribute "role_category"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CAC", "PAC", "Other"]) - # validator.allowable_values.each do |value| - # expect { @instance.role_category = value }.not_to raise_error - # end - end - end - - describe 'test attribute "role"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PM/IAM", "SCA", "AO", "ISSO", "IAO", "Validator (IV&V)", "User Rep (View Only)", "Auditor", "Artifact Manager", "C&A Team"]) - # validator.allowable_values.each do |value| - # expect { @instance.role = value }.not_to raise_error - # end - end - end - - describe 'test attribute "users"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/ssps_spec.rb b/emass_client/ruby_client/spec/models/ssps_spec.rb deleted file mode 100644 index 6dd9f2e..0000000 --- a/emass_client/ruby_client/spec/models/ssps_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Ssps -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Ssps' do - before do - # run before each test - @instance = EmassClient::Ssps.new - end - - after do - # run after each test - end - - describe 'test an instance of Ssps' do - it 'should create an instance of Ssps' do - expect(@instance).to be_instance_of(EmassClient::Ssps) - end - end - describe 'test attribute "ssp_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ssp_version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ssp_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/stage_spec.rb b/emass_client/ruby_client/spec/models/stage_spec.rb deleted file mode 100644 index f132e55..0000000 --- a/emass_client/ruby_client/spec/models/stage_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Stage -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Stage' do - before do - # run before each test - @instance = EmassClient::Stage.new - end - - after do - # run after each test - end - - describe 'test an instance of Stage' do - it 'should create an instance of Stage' do - expect(@instance).to be_instance_of(EmassClient::Stage) - end - end - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Not Started", "Categorize System", "Submit Categorization", "Approval", "Complete"]) - # validator.allowable_values.each do |value| - # expect { @instance.name = value }.not_to raise_error - # end - end - end - - describe 'test attribute "transitions"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/static_code_application_spec.rb b/emass_client/ruby_client/spec/models/static_code_application_spec.rb deleted file mode 100644 index bf0a4f8..0000000 --- a/emass_client/ruby_client/spec/models/static_code_application_spec.rb +++ /dev/null @@ -1,78 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::StaticCodeApplication -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'StaticCodeApplication' do - before do - # run before each test - @instance = EmassClient::StaticCodeApplication.new - end - - after do - # run after each test - end - - describe 'test an instance of StaticCodeApplication' do - it 'should create an instance of StaticCodeApplication' do - expect(@instance).to be_instance_of(EmassClient::StaticCodeApplication) - end - end - describe 'test attribute "raw_severity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Low", "Medium", "Moderate", "High", "Critical"]) - # validator.allowable_values.each do |value| - # expect { @instance.raw_severity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "code_check_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Hidden Field", "Redundant Check", "Invalid Field", "Vulnerable Field"]) - # validator.allowable_values.each do |value| - # expect { @instance.code_check_name = value }.not_to raise_error - # end - end - end - - describe 'test attribute "count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "scan_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cwe_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "clear_findings"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/static_code_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/static_code_request_post_body_spec.rb deleted file mode 100644 index d40f990..0000000 --- a/emass_client/ruby_client/spec/models/static_code_request_post_body_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::StaticCodeRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'StaticCodeRequestPostBody' do - before do - # run before each test - @instance = EmassClient::StaticCodeRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of StaticCodeRequestPostBody' do - it 'should create an instance of StaticCodeRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::StaticCodeRequestPostBody) - end - end -end diff --git a/emass_client/ruby_client/spec/models/static_code_required_post_application_spec.rb b/emass_client/ruby_client/spec/models/static_code_required_post_application_spec.rb deleted file mode 100644 index 0562579..0000000 --- a/emass_client/ruby_client/spec/models/static_code_required_post_application_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::StaticCodeRequiredPostApplication -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'StaticCodeRequiredPostApplication' do - before do - # run before each test - @instance = EmassClient::StaticCodeRequiredPostApplication.new - end - - after do - # run after each test - end - - describe 'test an instance of StaticCodeRequiredPostApplication' do - it 'should create an instance of StaticCodeRequiredPostApplication' do - expect(@instance).to be_instance_of(EmassClient::StaticCodeRequiredPostApplication) - end - end - describe 'test attribute "application_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/static_code_required_post_spec.rb b/emass_client/ruby_client/spec/models/static_code_required_post_spec.rb deleted file mode 100644 index 02331f7..0000000 --- a/emass_client/ruby_client/spec/models/static_code_required_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::StaticCodeRequiredPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'StaticCodeRequiredPost' do - before do - # run before each test - @instance = EmassClient::StaticCodeRequiredPost.new - end - - after do - # run after each test - end - - describe 'test an instance of StaticCodeRequiredPost' do - it 'should create an instance of StaticCodeRequiredPost' do - expect(@instance).to be_instance_of(EmassClient::StaticCodeRequiredPost) - end - end - describe 'test attribute "application"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "application_findings"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/success200_response_spec.rb b/emass_client/ruby_client/spec/models/success200_response_spec.rb deleted file mode 100644 index c58fe5d..0000000 --- a/emass_client/ruby_client/spec/models/success200_response_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Success200Response -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Success200Response' do - before do - # run before each test - @instance = EmassClient::Success200Response.new - end - - after do - # run after each test - end - - describe 'test an instance of Success200Response' do - it 'should create an instance of Success200Response' do - expect(@instance).to be_instance_of(EmassClient::Success200Response) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/system_id_artifacts_body_spec.rb b/emass_client/ruby_client/spec/models/system_id_artifacts_body_spec.rb deleted file mode 100644 index 18b5ede..0000000 --- a/emass_client/ruby_client/spec/models/system_id_artifacts_body_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::SystemIdArtifactsBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemIdArtifactsBody' do - before do - # run before each test - @instance = EmassClient::SystemIdArtifactsBody.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemIdArtifactsBody' do - it 'should create an instance of SystemIdArtifactsBody' do - expect(@instance).to be_instance_of(EmassClient::SystemIdArtifactsBody) - end - end - describe 'test attribute "is_template"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Procedure", "Diagram", "Policy", "Labor", "Document", "Image", "Other", "Scan Result", "Auditor Report"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "category"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Implementation Guidance", "Evidence"]) - # validator.allowable_values.each do |value| - # expect { @instance.category = value }.not_to raise_error - # end - end - end - - describe 'test attribute "zipper"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/system_response_spec.rb b/emass_client/ruby_client/spec/models/system_response_spec.rb deleted file mode 100644 index 41277e0..0000000 --- a/emass_client/ruby_client/spec/models/system_response_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::SystemResponse -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemResponse' do - before do - # run before each test - @instance = EmassClient::SystemResponse.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemResponse' do - it 'should create an instance of SystemResponse' do - expect(@instance).to be_instance_of(EmassClient::SystemResponse) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/system_roles_category_response_spec.rb b/emass_client/ruby_client/spec/models/system_roles_category_response_spec.rb deleted file mode 100644 index 5c1ba68..0000000 --- a/emass_client/ruby_client/spec/models/system_roles_category_response_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::SystemRolesCategoryResponse -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemRolesCategoryResponse' do - before do - # run before each test - @instance = EmassClient::SystemRolesCategoryResponse.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemRolesCategoryResponse' do - it 'should create an instance of SystemRolesCategoryResponse' do - expect(@instance).to be_instance_of(EmassClient::SystemRolesCategoryResponse) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/system_roles_response_data_spec.rb b/emass_client/ruby_client/spec/models/system_roles_response_data_spec.rb deleted file mode 100644 index 0bd21e0..0000000 --- a/emass_client/ruby_client/spec/models/system_roles_response_data_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::SystemRolesResponseData -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemRolesResponseData' do - before do - # run before each test - @instance = EmassClient::SystemRolesResponseData.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemRolesResponseData' do - it 'should create an instance of SystemRolesResponseData' do - expect(@instance).to be_instance_of(EmassClient::SystemRolesResponseData) - end - end - describe 'test attribute "role_category"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "role"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/system_roles_response_spec.rb b/emass_client/ruby_client/spec/models/system_roles_response_spec.rb deleted file mode 100644 index 67891d3..0000000 --- a/emass_client/ruby_client/spec/models/system_roles_response_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::SystemRolesResponse -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'SystemRolesResponse' do - before do - # run before each test - @instance = EmassClient::SystemRolesResponse.new - end - - after do - # run after each test - end - - describe 'test an instance of SystemRolesResponse' do - it 'should create an instance of SystemRolesResponse' do - expect(@instance).to be_instance_of(EmassClient::SystemRolesResponse) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/systems_spec.rb b/emass_client/ruby_client/spec/models/systems_spec.rb deleted file mode 100644 index 67516c4..0000000 --- a/emass_client/ruby_client/spec/models/systems_spec.rb +++ /dev/null @@ -1,510 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Systems -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Systems' do - before do - # run before each test - @instance = EmassClient::Systems.new - end - - after do - # run after each test - end - - describe 'test an instance of Systems' do - it 'should create an instance of Systems' do - expect(@instance).to be_instance_of(EmassClient::Systems) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "policy"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["RMF", "DIACAP"]) - # validator.allowable_values.each do |value| - # expect { @instance.policy = value }.not_to raise_error - # end - end - end - - describe 'test attribute "registration_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Guest", "Regular", "Functional", "Cloud Service Provider", "Common Control Provider"]) - # validator.allowable_values.each do |value| - # expect { @instance.registration_type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "acronym"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_owner"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "organization_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Army", "Navy", "Air Force", "Marines", "DoD", "Defense Information Systems Agency"]) - # validator.allowable_values.each do |value| - # expect { @instance.organization_name = value }.not_to raise_error - # end - end - end - - describe 'test attribute "secondary_organization"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "version_release_no"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["IS Major Application", "IS Enclave", "Platform IT", "Platform IT System", "Platform IT Interconnection", "AIS Application", "Outsourced IT-Based Process (DoD-controlled)", "Enclave", "Outsourced IT-Based Process (service provider shared)"]) - # validator.allowable_values.each do |value| - # expect { @instance.system_type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "is_nss"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_public_facing"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "coams_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_type_authorization"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ditpr_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorization_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Authority to Operate (ATO)", "Authority to Operate with Conditions (ATO) w/Conditions)", "Interim Authority to Test (IATT)", "Interim Authority to Operate (IATO)", "Denied Authority to Operate (DATO)", "Not Yet Authorized", "Unaccredited", "Decommissioned"]) - # validator.allowable_values.each do |value| - # expect { @instance.authorization_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "authorization_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorization_termination_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "authorization_length"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "terms_for_auth"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "security_plan_approval_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Approved", "Not Yet Approved", "Denied"]) - # validator.allowable_values.each do |value| - # expect { @instance.security_plan_approval_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "security_plan_approval_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mission_criticality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Mission Critical (MC)", "Mission Essential (ME)", "Mission Support (MS)"]) - # validator.allowable_values.each do |value| - # expect { @instance.mission_criticality = value }.not_to raise_error - # end - end - end - - describe 'test attribute "geographical_association"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["VA Operated IS", "non-VA Operated IS"]) - # validator.allowable_values.each do |value| - # expect { @instance.geographical_association = value }.not_to raise_error - # end - end - end - - describe 'test attribute "system_ownership"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Region 1", "Region 2", "Region 3", "Region 4"]) - # validator.allowable_values.each do |value| - # expect { @instance.system_ownership = value }.not_to raise_error - # end - end - end - - describe 'test attribute "governing_mission_area"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Business MA (BMA)", "DoD portion of the Intelligence MA (DIMA)", "Enterprise Information Environment MA (EIEMA)", "Warfighting MA (WMA)"]) - # validator.allowable_values.each do |value| - # expect { @instance.governing_mission_area = value }.not_to raise_error - # end - end - end - - describe 'test attribute "primary_functional_area"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Allies", "CBRNE", "Civilian Personnel & Readiness", "Command and Control", "Communications", "Communications Security (COMSEC)", "Economic", "Environmental Security", "Facilities", "Finance", "Health/Medical", "Human Resources", "Information Management", "Inspector General", "Intelligence", "Logistics", "Military Personnel and Readiness", "Nuclear", "Nuclear, Chemical, and Biological", "Operations", "Personnel and Readiness", "Procurement/Acquisition", "Reserve Components", "Scientific and Engineering", "Space and Weather", "Test and Evaluation", "Trainers", "Weapons", "Legal", "Transportation", "Not Applicable (N/A)", "Integration and Testing"]) - # validator.allowable_values.each do |value| - # expect { @instance.primary_functional_area = value }.not_to raise_error - # end - end - end - - describe 'test attribute "secondary_functional_area"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Allies", "CBRNE", "Civilian Personnel & Readiness", "Command and Control", "Communications", "Communications Security (COMSEC)", "Economic", "Environmental Security", "Facilities", "Finance", "Health/Medical", "Human Resources", "Information Management", "Inspector General", "Intelligence", "Logistics", "Military Personnel and Readiness", "Nuclear", "Nuclear, Chemical, and Biological", "Operations", "Personnel and Readiness", "Procurement/Acquisition", "Reserve Components", "Scientific and Engineering", "Space and Weather", "Test and Evaluation", "Trainers", "Weapons", "Legal", "Transportation", "Not Applicable (N/A)", "Integration and Testing"]) - # validator.allowable_values.each do |value| - # expect { @instance.secondary_functional_area = value }.not_to raise_error - # end - end - end - - describe 'test attribute "primary_control_set"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["NIST SP 800-53 Revision 4", "DoDI 8500.2"]) - # validator.allowable_values.each do |value| - # expect { @instance.primary_control_set = value }.not_to raise_error - # end - end - end - - describe 'test attribute "confidentiality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["High", "Moderate", "Low"]) - # validator.allowable_values.each do |value| - # expect { @instance.confidentiality = value }.not_to raise_error - # end - end - end - - describe 'test attribute "integrity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["High", "Moderate", "Low"]) - # validator.allowable_values.each do |value| - # expect { @instance.integrity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "availability"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["High", "Moderate", "Low"]) - # validator.allowable_values.each do |value| - # expect { @instance.availability = value }.not_to raise_error - # end - end - end - - describe 'test attribute "applied_overlays"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Classified Information", "Privacy", "Cross Domain Solution (CDS)", "Financial Management", "Intelligence", "Nuclear Command, Communication, Control Systems (NC3)", "Cloud Service Provider (CSP)"]) - # validator.allowable_values.each do |value| - # expect { @instance.applied_overlays = value }.not_to raise_error - # end - end - end - - describe 'test attribute "rmf_activity"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Initiate and plan C&A", "Initiate and plan cybersecurity Assessment Authorization", "Implement and validate assigned security controls", "Make assessment determination and authorization decision", "Maintain ATO and conduct reviews", "Decommission"]) - # validator.allowable_values.each do |value| - # expect { @instance.rmf_activity = value }.not_to raise_error - # end - end - end - - describe 'test attribute "cross_domain_ticket"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ditpr_don_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mac"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["I", "II", "III"]) - # validator.allowable_values.each do |value| - # expect { @instance.mac = value }.not_to raise_error - # end - end - end - - describe 'test attribute "dod_confidentiality"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Public", "Sensitive", "Classified"]) - # validator.allowable_values.each do |value| - # expect { @instance.dod_confidentiality = value }.not_to raise_error - # end - end - end - - describe 'test attribute "contingency_plan_tested"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "contingency_plan_test_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "security_review_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_open_poam_item"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_open_poam_item90to120_past_scheduled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_open_poam_item120_plus_past_scheudled_completion_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "impact"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["low", "Moderate", "High"]) - # validator.allowable_values.each do |value| - # expect { @instance.impact = value }.not_to raise_error - # end - end - end - - describe 'test attribute "has_cui"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_pii"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_phi"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ppsm_registry_number"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "interconnected_information_system_and_identifiers"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_pia_required"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "pia_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Not Started", "In Progress", "Completed"]) - # validator.allowable_values.each do |value| - # expect { @instance.pia_status = value }.not_to raise_error - # end - end - end - - describe 'test attribute "pia_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "user_defined_field1"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "user_defined_field2"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "user_defined_field3"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "user_defined_field4"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "user_defined_field5"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "current_rmf_lifecycle_step"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["1 – Categorize", "2 – Select", "3 – Implement", "4 – Assess", "5 – Authorize", "6 – Monitor"]) - # validator.allowable_values.each do |value| - # expect { @instance.current_rmf_lifecycle_step = value }.not_to raise_error - # end - end - end - - describe 'test attribute "other_information"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "reports_for_scorecard"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "package"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "connectivity_ccsd"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_data_spec.rb b/emass_client/ruby_client/spec/models/test_data_spec.rb deleted file mode 100644 index 5fbcf81..0000000 --- a/emass_client/ruby_client/spec/models/test_data_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::TestData -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestData' do - before do - # run before each test - @instance = EmassClient::TestData.new - end - - after do - # run after each test - end - - describe 'test an instance of TestData' do - it 'should create an instance of TestData' do - expect(@instance).to be_instance_of(EmassClient::TestData) - end - end - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_results_get_spec.rb b/emass_client/ruby_client/spec/models/test_results_get_spec.rb deleted file mode 100644 index 86c7d07..0000000 --- a/emass_client/ruby_client/spec/models/test_results_get_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::TestResultsGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestResultsGet' do - before do - # run before each test - @instance = EmassClient::TestResultsGet.new - end - - after do - # run after each test - end - - describe 'test an instance of TestResultsGet' do - it 'should create an instance of TestResultsGet' do - expect(@instance).to be_instance_of(EmassClient::TestResultsGet) - end - end - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "control"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "cci"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_inherited"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tested_by"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "test_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Self-Assessment", "Schedule-Assessment", "Deep Evaluation"]) - # validator.allowable_values.each do |value| - # expect { @instance.type = value }.not_to raise_error - # end - end - end - - describe 'test attribute "compliance_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Compliant", "Non-Compliant", "Not Applicable"]) - # validator.allowable_values.each do |value| - # expect { @instance.compliance_status = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_results_post_spec.rb b/emass_client/ruby_client/spec/models/test_results_post_spec.rb deleted file mode 100644 index 1babb79..0000000 --- a/emass_client/ruby_client/spec/models/test_results_post_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::TestResultsPost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestResultsPost' do - before do - # run before each test - @instance = EmassClient::TestResultsPost.new - end - - after do - # run after each test - end - - describe 'test an instance of TestResultsPost' do - it 'should create an instance of TestResultsPost' do - expect(@instance).to be_instance_of(EmassClient::TestResultsPost) - end - end - describe 'test attribute "cci"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "success"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "system_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_results_request_post_body_spec.rb b/emass_client/ruby_client/spec/models/test_results_request_post_body_spec.rb deleted file mode 100644 index 3983871..0000000 --- a/emass_client/ruby_client/spec/models/test_results_request_post_body_spec.rb +++ /dev/null @@ -1,68 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::TestResultsRequestPostBody -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestResultsRequestPostBody' do - before do - # run before each test - @instance = EmassClient::TestResultsRequestPostBody.new - end - - after do - # run after each test - end - - describe 'test an instance of TestResultsRequestPostBody' do - it 'should create an instance of TestResultsRequestPostBody' do - expect(@instance).to be_instance_of(EmassClient::TestResultsRequestPostBody) - end - end - describe 'test attribute "cci"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tested_by"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "test_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "compliance_status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Compliant", "Non-Compliant", "Not Applicable"]) - # validator.allowable_values.each do |value| - # expect { @instance.compliance_status = value }.not_to raise_error - # end - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_results_response_get_spec.rb b/emass_client/ruby_client/spec/models/test_results_response_get_spec.rb deleted file mode 100644 index 422377a..0000000 --- a/emass_client/ruby_client/spec/models/test_results_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::TestResultsResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestResultsResponseGet' do - before do - # run before each test - @instance = EmassClient::TestResultsResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of TestResultsResponseGet' do - it 'should create an instance of TestResultsResponseGet' do - expect(@instance).to be_instance_of(EmassClient::TestResultsResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_results_response_post_spec.rb b/emass_client/ruby_client/spec/models/test_results_response_post_spec.rb deleted file mode 100644 index 6539323..0000000 --- a/emass_client/ruby_client/spec/models/test_results_response_post_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::TestResultsResponsePost -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'TestResultsResponsePost' do - before do - # run before each test - @instance = EmassClient::TestResultsResponsePost.new - end - - after do - # run after each test - end - - describe 'test an instance of TestResultsResponsePost' do - it 'should create an instance of TestResultsResponsePost' do - expect(@instance).to be_instance_of(EmassClient::TestResultsResponsePost) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/test_spec.rb b/emass_client/ruby_client/spec/models/test_spec.rb deleted file mode 100644 index ad6701a..0000000 --- a/emass_client/ruby_client/spec/models/test_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Test -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Test' do - before do - # run before each test - @instance = EmassClient::Test.new - end - - after do - # run after each test - end - - describe 'test an instance of Test' do - it 'should create an instance of Test' do - expect(@instance).to be_instance_of(EmassClient::Test) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/users_spec.rb b/emass_client/ruby_client/spec/models/users_spec.rb deleted file mode 100644 index 7c5ea34..0000000 --- a/emass_client/ruby_client/spec/models/users_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::Users -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'Users' do - before do - # run before each test - @instance = EmassClient::Users.new - end - - after do - # run after each test - end - - describe 'test an instance of Users' do - it 'should create an instance of Users' do - expect(@instance).to be_instance_of(EmassClient::Users) - end - end - describe 'test attribute "first_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "email"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/workflow_definition_get_spec.rb b/emass_client/ruby_client/spec/models/workflow_definition_get_spec.rb deleted file mode 100644 index c8c2134..0000000 --- a/emass_client/ruby_client/spec/models/workflow_definition_get_spec.rb +++ /dev/null @@ -1,68 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::WorkflowDefinitionGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'WorkflowDefinitionGet' do - before do - # run before each test - @instance = EmassClient::WorkflowDefinitionGet.new - end - - after do - # run after each test - end - - describe 'test an instance of WorkflowDefinitionGet' do - it 'should create an instance of WorkflowDefinitionGet' do - expect(@instance).to be_instance_of(EmassClient::WorkflowDefinitionGet) - end - end - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_active"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "workflow"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["RMF Step 1: Security Category", "RMF Step 2: Security Category", "RMF Step 3: Security Category"]) - # validator.allowable_values.each do |value| - # expect { @instance.workflow = value }.not_to raise_error - # end - end - end - - describe 'test attribute "stages"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/workflow_definition_response_get_spec.rb b/emass_client/ruby_client/spec/models/workflow_definition_response_get_spec.rb deleted file mode 100644 index e6ba41c..0000000 --- a/emass_client/ruby_client/spec/models/workflow_definition_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::WorkflowDefinitionResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'WorkflowDefinitionResponseGet' do - before do - # run before each test - @instance = EmassClient::WorkflowDefinitionResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of WorkflowDefinitionResponseGet' do - it 'should create an instance of WorkflowDefinitionResponseGet' do - expect(@instance).to be_instance_of(EmassClient::WorkflowDefinitionResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/workflow_instances_get_spec.rb b/emass_client/ruby_client/spec/models/workflow_instances_get_spec.rb deleted file mode 100644 index b174142..0000000 --- a/emass_client/ruby_client/spec/models/workflow_instances_get_spec.rb +++ /dev/null @@ -1,110 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::WorkflowInstancesGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'WorkflowInstancesGet' do - before do - # run before each test - @instance = EmassClient::WorkflowInstancesGet.new - end - - after do - # run after each test - end - - describe 'test an instance of WorkflowInstancesGet' do - it 'should create an instance of WorkflowInstancesGet' do - expect(@instance).to be_instance_of(EmassClient::WorkflowInstancesGet) - end - end - describe 'test attribute "created_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "current_stage"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Echelon I", "Echelon II", "Echelon III", "Categorize System", "Submit Categorization", "Approval", "Cancel", "Complete"]) - # validator.allowable_values.each do |value| - # expect { @instance.current_stage = value }.not_to raise_error - # end - end - end - - describe 'test attribute "last_edited_by"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "last_edited_date"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "package_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Test POA&M Approval", "Test RMF Step 1 package", "Test RMF Step 2 package", "Test RMF Step 3 package"]) - # validator.allowable_values.each do |value| - # expect { @instance.package_name = value }.not_to raise_error - # end - end - end - - describe 'test attribute "system_name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["Test system 1", "Test system 2", "Test system 3", "Test system 4"]) - # validator.allowable_values.each do |value| - # expect { @instance.system_name = value }.not_to raise_error - # end - end - end - - describe 'test attribute "version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "workflow"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["POA&M Approval", "RMF Step 1: Security Category", "RMF Step 2: Security Category", "RMF Step 3: Security Category"]) - # validator.allowable_values.each do |value| - # expect { @instance.workflow = value }.not_to raise_error - # end - end - end - - describe 'test attribute "workflow_instance_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "transitions"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/models/workflow_instances_response_get_spec.rb b/emass_client/ruby_client/spec/models/workflow_instances_response_get_spec.rb deleted file mode 100644 index 095961b..0000000 --- a/emass_client/ruby_client/spec/models/workflow_instances_response_get_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for EmassClient::WorkflowInstancesResponseGet -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'WorkflowInstancesResponseGet' do - before do - # run before each test - @instance = EmassClient::WorkflowInstancesResponseGet.new - end - - after do - # run after each test - end - - describe 'test an instance of WorkflowInstancesResponseGet' do - it 'should create an instance of WorkflowInstancesResponseGet' do - expect(@instance).to be_instance_of(EmassClient::WorkflowInstancesResponseGet) - end - end - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/emass_client/ruby_client/spec/spec_helper.rb b/emass_client/ruby_client/spec/spec_helper.rb deleted file mode 100644 index 4ed90e9..0000000 --- a/emass_client/ruby_client/spec/spec_helper.rb +++ /dev/null @@ -1,110 +0,0 @@ -=begin -#Enterprise Mission Assurance Support Service (eMASS) - -#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.

Register CLI
New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.

Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.

Available Request Headers:
key Example Value Description
`api-key` api-key-provided-by-emass This API key must be provided in the request header for all endpoint calls
`user-uid` USER.UID.KEY This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls
Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC

Approve API Client for Actionable Requests
Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: - -OpenAPI spec version: v3.2 -Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 3.0.26 -=end - -# load the gem -require 'emass_client' - -# The following was generated by the `rspec --init` command. Conventionally, all -# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. -# The generated `.rspec` file contains `--require spec_helper` which will cause -# this file to always be loaded, without a need to explicitly require it in any -# files. -# -# Given that it is always loaded, you are encouraged to keep this file as -# light-weight as possible. Requiring heavyweight dependencies from this file -# will add to the boot time of your test suite on EVERY test run, even for an -# individual file that may not need all of that loaded. Instead, consider making -# a separate helper file that requires the additional dependencies and performs -# the additional setup, and require it from the spec files that actually need -# it. -# -# The `.rspec` file also contains a few flags that are not defaults but that -# users commonly want. -# -# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration -RSpec.configure do |config| - # rspec-expectations config goes here. You can use an alternate - # assertion/expectation library such as wrong or the stdlib/minitest - # assertions if you prefer. - config.expect_with :rspec do |expectations| - # This option will default to `true` in RSpec 4. It makes the `description` - # and `failure_message` of custom matchers include text for helper methods - # defined using `chain`, e.g.: - # be_bigger_than(2).and_smaller_than(4).description - # # => "be bigger than 2 and smaller than 4" - # ...rather than: - # # => "be bigger than 2" - expectations.include_chain_clauses_in_custom_matcher_descriptions = true - end - - # rspec-mocks config goes here. You can use an alternate test double - # library (such as bogus or mocha) by changing the `mock_with` option here. - config.mock_with :rspec do |mocks| - # Prevents you from mocking or stubbing a method that does not exist on - # a real object. This is generally recommended, and will default to - # `true` in RSpec 4. - mocks.verify_partial_doubles = true - end - -# The settings below are suggested to provide a good initial experience -# with RSpec, but feel free to customize to your heart's content. -=begin - # These two settings work together to allow you to limit a spec run - # to individual examples or groups you care about by tagging them with - # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # get run. - config.filter_run :focus - config.run_all_when_everything_filtered = true - - # Allows RSpec to persist some state between runs in order to support - # the `--only-failures` and `--next-failure` CLI options. We recommend - # you configure your source control system to ignore this file. - config.example_status_persistence_file_path = "spec/examples.txt" - - # Limits the available syntax to the non-monkey patched syntax that is - # recommended. For more details, see: - # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ - # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode - config.disable_monkey_patching! - - # This setting enables warnings. It's recommended, but in some cases may - # be too noisy due to issues in dependencies. - config.warnings = true - - # Many RSpec users commonly either run the entire suite or an individual - # file, and it's useful to allow more verbose output when running an - # individual spec file. - if config.files_to_run.one? - # Use the documentation formatter for detailed output, - # unless a formatter has already been configured - # (e.g. via a command-line flag). - config.default_formatter = 'doc' - end - - # Print the 10 slowest examples and example groups at the - # end of the spec run, to help surface which specs are running - # particularly slow. - config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random - - # Seed global randomization in this process using the `--seed` CLI option. - # Setting this allows you to use `--seed` to deterministically reproduce - # test failures related to randomization by passing the same `--seed` value - # as the one that triggered the failure. - Kernel.srand config.seed -=end -end diff --git a/emass_client/swagger-codegen/config.json b/emass_client/swagger-codegen/config.json deleted file mode 100644 index e7118b3..0000000 --- a/emass_client/swagger-codegen/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "gemName": "emass_client", - "gemVersion": "1.0.1", - "gemLicense": "Apache-2.0" -} diff --git a/emass_client/swagger-codegen/ruby_template/api_client.mustache b/emass_client/swagger-codegen/ruby_template/api_client.mustache deleted file mode 100644 index 7c495bc..0000000 --- a/emass_client/swagger-codegen/ruby_template/api_client.mustache +++ /dev/null @@ -1,384 +0,0 @@ -=begin -{{> api_info}} -=end - -require 'date' -require 'json' -require 'logger' -require 'tempfile' -require 'typhoeus' -require 'uri' - -module {{moduleName}} - class ApiClient - # The Configuration object holding settings to be used in the API client. - attr_accessor :config - - # Defines the headers to be used in HTTP requests of all API calls by default. - # - # @return [Hash] - attr_accessor :default_headers - - # Initializes the ApiClient - # @option config [Configuration] Configuration for initializing the object, default to Configuration.default - def initialize(config = Configuration.default) - @config = config - @user_agent = "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/#{VERSION}/ruby{{/httpUserAgent}}" - @default_headers = { - 'Content-Type' => 'application/json', - 'User-Agent' => @user_agent - } - end - - def self.default - @@default ||= ApiClient.new - end - - # Call an API with given options. - # - # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. - def call_api(http_method, path, opts = {}) - request = build_request(http_method, path, opts) - response = request.run - - if @config.debugging - @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n" - end - - unless response.success? - if response.timed_out? - fail ApiError.new('Connection timed out') - elsif response.code == 0 - # Errors from libcurl will be made visible here - fail ApiError.new(:code => 0, - :message => response.return_message) - else - fail ApiError.new(:code => response.code, - :response_headers => response.headers, - :response_body => response.body), - response.status_message - end - end - - if opts[:return_type] - data = deserialize(response, opts[:return_type]) - else - data = nil - end - return data, response.code, response.headers - end - - # Builds the HTTP request - # - # @param [String] http_method HTTP method/verb (e.g. POST) - # @param [String] path URL path (e.g. /account/new) - # @option opts [Hash] :header_params Header parameters - # @option opts [Hash] :query_params Query parameters - # @option opts [Hash] :form_params Query parameters - # @option opts [Object] :body HTTP body (JSON/XML) - # @return [Typhoeus::Request] A Typhoeus Request - def build_request(http_method, path, opts = {}) - url = build_request_url(path) - http_method = http_method.to_sym.downcase - - header_params = @default_headers.merge(opts[:header_params] || {}) - query_params = opts[:query_params] || {} - form_params = opts[:form_params] || {} - - {{#hasAuthMethods}} - update_params_for_auth! header_params, query_params, opts[:auth_names] - {{/hasAuthMethods}} - - # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false) - _verify_ssl_host = @config.verify_ssl_host ? 2 : 0 - - req_opts = { - :method => http_method, - :headers => header_params, - :params => query_params, - :params_encoding => @config.params_encoding, - :timeout => @config.timeout, - :ssl_verifypeer => @config.verify_ssl, - :ssl_verifyhost => _verify_ssl_host, - :sslcert => @config.cert_file, - :sslkey => @config.key_file, - :verbose => @config.debugging, - :keypasswd => @config.key_password - } - - # set custom cert, if provided - req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert - - if [:post, :patch, :put, :delete].include?(http_method) - req_body = build_request_body(header_params, form_params, opts[:body]) - req_opts.update :body => req_body - if @config.debugging - @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n" - end - end - - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request - end - - # Builds the HTTP request body - # - # @param [Hash] header_params Header parameters - # @param [Hash] form_params Query parameters - # @param [Object] body HTTP body (JSON/XML) - # @return [String] HTTP body data in the form of string - def build_request_body(header_params, form_params, body) - # http form - if header_params['Content-Type'] == 'application/x-www-form-urlencoded' || - header_params['Content-Type'] == 'multipart/form-data' - data = {} - form_params.each do |key, value| - case value - when ::File, ::Array, nil - # let typhoeus handle File, Array and nil parameters - data[key] = value - else - data[key] = value.to_s - end - end - elsif body - data = body.is_a?(String) ? body : body.to_json - else - data = nil - end - data - end - - # Check if the given MIME is a JSON MIME. - # JSON MIME examples: - # application/json - # application/json; charset=UTF8 - # APPLICATION/JSON - # */* - # @param [String] mime MIME - # @return [Boolean] True if the MIME is application/json - def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? - end - - # Deserialize the response to the given return type. - # - # @param [Response] response HTTP response - # @param [String] return_type some examples: "User", "Array", "Hash" - def deserialize(response, return_type) - body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' - - return nil if body.nil? || body.empty? - - # return response body directly for String return type - return body if return_type == 'String' - - # ensuring a default content type - content_type = response.headers['Content-Type'] || 'application/json' - - fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type) - - begin - data = JSON.parse("[#{body}]", :symbolize_names => true)[0] - rescue JSON::ParserError => e - if %w(String Date DateTime).include?(return_type) - data = body - else - raise e - end - end - - convert_to_type data, return_type - end - - # Convert data to the given return type. - # @param [Object] data Data to be converted - # @param [String] return_type Return type - # @return [Mixed] Data in a particular type - def convert_to_type(data, return_type) - return nil if data.nil? - case return_type - when 'String' - data.to_s - when 'Integer' - data.to_i - when 'Float' - data.to_f - when 'Boolean' - data == true - when 'DateTime' - # parse date time (expecting ISO 8601 format) - DateTime.parse data - when 'Date' - # parse date time (expecting ISO 8601 format) - Date.parse data - when 'Object' - # generic object (usually a Hash), return directly - data - when /\AArray<(.+)>\z/ - # e.g. Array - sub_type = $1 - data.map { |item| convert_to_type(item, sub_type) } - when /\AHash\\z/ - # e.g. Hash - sub_type = $1 - {}.tap do |hash| - data.each { |k, v| hash[k] = convert_to_type(v, sub_type) } - end - else - # models, e.g. Pet - {{moduleName}}.const_get(return_type).build_from_hash(data) - end - end - - # Save response body into a file in (the defined) temporary folder, using the filename - # from the "Content-Disposition" header if provided, otherwise a random filename. - # The response body is written to the file in chunks in order to handle files which - # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby - # process can use. - # - # @see Configuration#temp_folder_path - def download_file(request) - tempfile = nil - encoding = nil - request.on_headers do |response| - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) - else - prefix = 'download-' - end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = response.body.encoding - tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile - end - request.on_body do |chunk| - chunk.force_encoding(encoding) - tempfile.write(chunk) - end - request.on_complete do |response| - if tempfile - tempfile.close - @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - end - end - end - - # Sanitize filename by removing path. - # e.g. ../../sun.gif becomes sun.gif - # - # @param [String] filename the filename to be sanitized - # @return [String] the sanitized filename - def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') - end - - def build_request_url(path) - # Add leading and trailing slashes to path - path = "/#{path}".gsub(/\/+/, '/') - @config.base_url + path - end - - # Update hearder and query params based on authentication settings. - # - # @param [Hash] header_params Header parameters - # @param [Hash] query_params Query parameters - # @param [String] auth_names Authentication scheme name - def update_params_for_auth!(header_params, query_params, auth_names) - Array(auth_names).each do |auth_name| - auth_setting = @config.auth_settings[auth_name] - next unless auth_setting - case auth_setting[:in] - when 'header' then header_params[auth_setting[:key]] = auth_setting[:value] - when 'query' then query_params[auth_setting[:key]] = auth_setting[:value] - else fail ArgumentError, 'Authentication token must be in `query` of `header`' - end - end - end - - # Sets user agent in HTTP header - # - # @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0) - def user_agent=(user_agent) - @user_agent = user_agent - @default_headers['User-Agent'] = @user_agent - end - - # Return Accept header based on an array of accepts provided. - # @param [Array] accepts array for Accept - # @return [String] the Accept header (e.g. application/json) - def select_header_accept(accepts) - return nil if accepts.nil? || accepts.empty? - # use JSON when present, otherwise use all of the provided - json_accept = accepts.find { |s| json_mime?(s) } - json_accept || accepts.join(',') - end - - # Return Content-Type header based on an array of content types provided. - # @param [Array] content_types array for Content-Type - # @return [String] the Content-Type header (e.g. application/json) - def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? - # use JSON when present, otherwise use the first one - json_content_type = content_types.find { |s| json_mime?(s) } - json_content_type || content_types.first - end - - # Convert object (array, hash, object, etc) to JSON string. - # @param [Object] model object to be converted into JSON string - # @return [String] JSON string representation of the object - def object_to_http_body(model) - return model if model.nil? || model.is_a?(String) - local_body = nil - if model.is_a?(Array) - local_body = model.map { |m| object_to_hash(m) } - else - local_body = object_to_hash(model) - end - local_body.to_json - end - - # Convert object(non-array) to hash. - # @param [Object] obj object to be converted into JSON string - # @return [String] JSON string representation of the object - def object_to_hash(obj) - if obj.respond_to?(:to_hash) - obj.to_hash - else - obj - end - end - - # Build parameter value according to the given collection format. - # @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi - def build_collection_param(param, collection_format) - case collection_format - when :csv - param.join(',') - when :ssv - param.join(' ') - when :tsv - param.join("\t") - when :pipes - param.join('|') - when :multi - # return the array directly as typhoeus will handle it as expected - param - else - fail "unknown collection format: #{collection_format.inspect}" - end - end - end -end diff --git a/emass_client/swagger-codegen/ruby_template/api_info.mustache b/emass_client/swagger-codegen/ruby_template/api_info.mustache deleted file mode 100644 index d308d75..0000000 --- a/emass_client/swagger-codegen/ruby_template/api_info.mustache +++ /dev/null @@ -1,12 +0,0 @@ -{{#appName}} -#{{{appName}}} - -{{/appName}} -{{#appDescription}} -#{{{appDescription}}} - -{{/appDescription}} -{{#version}}OpenAPI spec version: {{version}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: {{{generatorVersion}}} diff --git a/emass_client/swagger-codegen/ruby_template/configuration.mustache b/emass_client/swagger-codegen/ruby_template/configuration.mustache deleted file mode 100644 index 97af817..0000000 --- a/emass_client/swagger-codegen/ruby_template/configuration.mustache +++ /dev/null @@ -1,234 +0,0 @@ -=begin -{{> api_info}} -=end - -module {{moduleName}} - class Configuration - # Defines url scheme - attr_accessor :scheme - - # Defines url host - attr_accessor :host - - # Defines url base path - attr_accessor :base_path - - # Defines API keys used with API Key authentications. - # - # @return [Hash] key: parameter name, value: parameter value (API key) - # - # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string) - # config.api_key['api_key'] = 'xxx' - attr_accessor :api_key - - # Defines API key prefixes used with API Key authentications. - # - # @return [Hash] key: parameter name, value: API key prefix - # - # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers) - # config.api_key_prefix['api_key'] = 'Token' - attr_accessor :api_key_prefix - - # Defines the username used with HTTP basic authentication. - # - # @return [String] - attr_accessor :username - - # Defines the password used with HTTP basic authentication. - # - # @return [String] - attr_accessor :password - - # Defines the access token (Bearer) used with OAuth2. - attr_accessor :access_token - - # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response - # details will be logged with `logger.debug` (see the `logger` attribute). - # Default to false. - # - # @return [true, false] - attr_accessor :debugging - - # Defines the logger used for debugging. - # Default to `Rails.logger` (when in Rails) or logging to STDOUT. - # - # @return [#debug] - attr_accessor :logger - - # Defines the temporary folder to store downloaded files - # (for API endpoints that have file response). - # Default to use `Tempfile`. - # - # @return [String] - attr_accessor :temp_folder_path - - # The time limit for HTTP request in seconds. - # Default to 0 (never times out). - attr_accessor :timeout - - # Set this to false to skip client side validation in the operation. - # Default to true. - # @return [true, false] - attr_accessor :client_side_validation - - ### TLS/SSL setting - # Set this to false to skip verifying SSL certificate when calling API from https server. - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :verify_ssl - - ### TLS/SSL setting - # Set this to false to skip verifying SSL host name - # Default to true. - # - # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks. - # - # @return [true, false] - attr_accessor :verify_ssl_host - - ### TLS/SSL setting - # Set this to customize the certificate file to verify the peer. - # - # @return [String] the path to the certificate file - # - # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code: - # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145 - attr_accessor :ssl_ca_cert - - ### TLS/SSL setting - # Client certificate file (for client certificate) - attr_accessor :cert_file - - ### TLS/SSL setting - # Client private key file (for client certificate) - attr_accessor :key_file - - ### TLS/SSL setting - # Client private key passphrase (for client certificate) - attr_accessor :key_password - - # Set this to customize parameters encoding of array parameter with multi collectionFormat. - # Default to nil. - # - # @see The params_encoding option of Ethon. Related source code: - # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 - attr_accessor :params_encoding - - attr_accessor :inject_format - - attr_accessor :force_ending_format - - def initialize - @scheme = '{{scheme}}' - @host = '{{host}}' - @base_path = '{{basePath}}' - @api_key = {} - @api_key_prefix = {} - @timeout = 0 - @client_side_validation = true - @verify_ssl = true - @verify_ssl_host = true - @params_encoding = nil - @cert_file = nil - @key_file = nil - @key_password = nil - @debugging = false - @inject_format = false - @force_ending_format = false - @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) - - yield(self) if block_given? - end - - # The default Configuration object. - def self.default - @@default ||= Configuration.new - end - - def configure - yield(self) if block_given? - end - - def scheme=(scheme) - # remove :// from scheme - @scheme = scheme.sub(/:\/\//, '') - end - - def host=(host) - # remove http(s):// and anything after a slash - @host = host.sub(/https?:\/\//, '').split('/').first - end - - def base_path=(base_path) - # Add leading and trailing slashes to base_path - @base_path = "/#{base_path}".gsub(/\/+/, '/') - @base_path = '' if @base_path == '/' - end - - def base_url - "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') - end - - # Gets API key (with prefix if set). - # @param [String] param_name the parameter name of API key auth - def api_key_with_prefix(param_name) - if @api_key_prefix[param_name] - "#{@api_key_prefix[param_name]} #{@api_key[param_name]}" - else - @api_key[param_name] - end - end - - # Gets Basic Auth token string - def basic_auth_token - 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n") - end - - # Returns Auth Settings hash for api client. - def auth_settings - { -{{#authMethods}} -{{#isApiKey}} - '{{name}}' => - { - type: 'api_key', - in: {{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{#isKeyInQuery}}'query'{{/isKeyInQuery}}, - key: '{{keyParamName}}', - value: api_key_with_prefix('{{keyParamName}}') - }, -{{/isApiKey}} -{{#isBasic}} - '{{name}}' => - { - type: 'basic', - in: 'header', - key: 'Authorization', - value: basic_auth_token - }, -{{/isBasic}} -{{#isBearer}} - '{{name}}' => - { - type: 'bearer', - in: 'header', - key: 'Authorization', - value: "Bearer #{access_token}" - }, -{{/isBearer}} -{{#isOAuth}} - '{{name}}' => - { - type: 'oauth2', - in: 'header', - key: 'Authorization', - value: "Bearer #{access_token}" - }, -{{/isOAuth}} -{{/authMethods}} - } - end - end -end diff --git a/emass_client/swagger-codegen/ruby_template/gemspec.mustache b/emass_client/swagger-codegen/ruby_template/gemspec.mustache deleted file mode 100644 index 1ceedb0..0000000 --- a/emass_client/swagger-codegen/ruby_template/gemspec.mustache +++ /dev/null @@ -1,38 +0,0 @@ -# -*- encoding: utf-8 -*- - -=begin -{{> api_info}} -=end - -$:.push File.expand_path("../lib", __FILE__) -require "{{gemName}}/version" - -Gem::Specification.new do |s| - s.name = "{{gemName}}{{^gemName}}{{{appName}}}{{/gemName}}" - s.version = {{moduleName}}::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ["{{gemAuthor}}{{^gemAuthor}}Swagger-Codegen{{/gemAuthor}}"] - s.email = ["{{gemAuthorEmail}}{{^gemAuthorEmail}}{{infoEmail}}{{/gemAuthorEmail}}"] - s.homepage = "{{gemHomepage}}{{^gemHomepage}}https://github.com/swagger-api/swagger-codegen{{/gemHomepage}}" - s.summary = "{{gemSummary}}{{^gemSummary}}{{{appName}}} Ruby Gem{{/gemSummary}}" - s.description = "{{gemDescription}}{{^gemDescription}}{{{appDescription}}}{{^appDescription}}{{{appName}}} Ruby Gem{{/appDescription}}{{/gemDescription}}" - {{#gemLicense}} - s.license = '{{{gemLicense}}}' - {{/gemLicense}} - {{^gemLicense}} - s.license = "Unlicense" - {{/gemLicense}} - s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 1.9{{/gemRequiredRubyVersion}}" - - # Required for github to display multiple packages (emasser and emass_client) - s.metadata = { "github_repo" => "ssh://github.com/mitre/emasser" } - - s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' - - s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' - - s.files = Dir.glob('lib/**/*') + %w{Rakefile README.md} - s.executables = [] - s.require_paths = ["lib"] -end diff --git a/emasser.gemspec b/emasser.gemspec index 2efb194..87d1dd0 100644 --- a/emasser.gemspec +++ b/emasser.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'dotenv', '~> 2.7.6' spec.add_runtime_dependency 'rubyzip', '~> 2.3.2' spec.add_runtime_dependency 'thor', '~> 1.1.0' - spec.add_runtime_dependency 'emass_client', '~> 1.0' + spec.add_runtime_dependency 'emass_client', '~> 1.0', '!= 1.0.3' spec.add_development_dependency 'bundler', '~> 2.3' spec.add_development_dependency 'bundler-audit', '~> 0.7' diff --git a/images/emasser_architecture.jpg b/images/emasser_architecture.jpg new file mode 100644 index 0000000..d39ae6a Binary files /dev/null and b/images/emasser_architecture.jpg differ diff --git a/images/emasser_diagram-Page-3.jpg b/images/emasser_diagram-Page-3.jpg new file mode 100644 index 0000000..0d02bc5 Binary files /dev/null and b/images/emasser_diagram-Page-3.jpg differ diff --git a/lib/emasser/cli.rb b/lib/emasser/cli.rb index f015473..5f62f95 100644 --- a/lib/emasser/cli.rb +++ b/lib/emasser/cli.rb @@ -20,8 +20,8 @@ class CLI < Thor puts "emasser version: #{Emasser::VERSION}".green exit elsif ARGV[0].to_s.include? 'hello' - user_name = ENV['USERNAME'] || 'rookie' - puts "Hello #{user_name} - enjoy using emasser!".cyan + user_name = ENV.fetch('USERNAME', 'rookie') + puts "Hello #{user_name} - enjoy using emasser version #{Emasser::VERSION}!".cyan exit end diff --git a/lib/emasser/configuration.rb b/lib/emasser/configuration.rb index df0c237..511d63d 100644 --- a/lib/emasser/configuration.rb +++ b/lib/emasser/configuration.rb @@ -33,6 +33,7 @@ def self.raise_unless_present(env) config.api_key['user-uid'] = raise_unless_present('EMASSER_API_KEY_USER_UID') config.scheme = 'https' config.base_path = '/' + config.server_index = nil config.host = raise_unless_present('EMASSER_HOST') config.key_file = raise_unless_present('EMASSER_KEY_FILE_PATH') config.cert_file = raise_unless_present('EMASSER_CERT_FILE_PATH') diff --git a/lib/emasser/constants.rb b/lib/emasser/constants.rb index c4f9dbf..736d139 100644 --- a/lib/emasser/constants.rb +++ b/lib/emasser/constants.rb @@ -5,14 +5,22 @@ module Emasser include_package: false, include_ditpr_metrics: false, include_decommissioned: false, - return_type: 'SystemResponse' # This is used by swagger client only to format output + debug_return_type: 'SystemResponse' # This is used by swagger client only to format output }.freeze GET_SYSTEM_RETURN_TYPE = { - return_type: 'SystemResponse' + debug_return_type: 'SystemResponse' }.freeze GET_ARTIFACTS_RETURN_TYPE = { - return_type: 'String' + debug_return_type: 'String' + }.freeze + + GET_WORKFLOWINSTANCES_RETURN_TYPE = { + debug_return_type: 'Object' + }.freeze + + DEL_MILESTONES_RETURN_TYPE = { + debug_return_type: 'Object' }.freeze end diff --git a/lib/emasser/delete.rb b/lib/emasser/delete.rb index 809a78d..b93160d 100644 --- a/lib/emasser/delete.rb +++ b/lib/emasser/delete.rb @@ -55,11 +55,11 @@ def self.exit_on_failure? option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification' def remove - body = EmassClient::DeletePoam.new + body = EmassClient::PoamGet.new body.poam_id = options[:poamId] body_array = Array.new(1, body) - result = EmassClient::POAMApi.new.delete_poam(body_array, options[:systemId]) + result = EmassClient::POAMApi.new.delete_poam(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling POAMApi->delete_poam'.red @@ -88,16 +88,18 @@ def self.exit_on_failure? desc: 'A numeric value representing the milestone identification' def remove - body = EmassClient::DeleteMilestone.new + body = EmassClient::MilestonesGet.new body.milestone_id = options[:milestoneId] body_array = Array.new(1, body) - result = EmassClient::MilestonesApi.new.delete_milestone(body_array, options[:systemId], options[:poamId]) - # The server returns an empty object upon successfully deleting a milestone. + # Getting an empty return when utilizing the default return type - using 'Object' as return type + opts = Emasser::DEL_MILESTONES_RETURN_TYPE + + result = EmassClient::MilestonesApi.new.delete_milestone(options[:systemId], options[:poamId], body_array, opts) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling MilestonesApi->delete_milestone'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -125,7 +127,7 @@ def remove body_array << obj end - result = EmassClient::ArtifactsApi.new.delete_artifact(body_array, options[:systemId]) + result = EmassClient::ArtifactsApi.new.delete_artifact(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ArtifactsApi->delete_artifact'.red diff --git a/lib/emasser/get.rb b/lib/emasser/get.rb index 8c95f3e..33735de 100644 --- a/lib/emasser/get.rb +++ b/lib/emasser/get.rb @@ -58,9 +58,8 @@ def self.exit_on_failure? true end - desc 'id [--system-name [SYSTEM_NAME]] [--system-owner [SYSTEM_OWNER]]', + desc 'id [--system_name [SYSTEM_NAME]] [--system_owner [SYSTEM_OWNER]]', 'Attempts to provide system ID of a system with name [NAME] and owner [SYSTEM_OWNER]' - # desc 'id', 'Get a system ID given "name" or "owner"' # Required parameters/fields option :system_name @@ -73,26 +72,29 @@ def id end begin - results = EmassClient::SystemsApi.new.get_systems.data + results = EmassClient::SystemsApi.new.get_systems results = filter_systems(results, options[:system_name], options[:system_owner]) results.each { |result| puts "#{result[:systemId]} - #{result[:systemOwner]} - #{result[:name]}" } rescue EmassClient::ApiError => e puts 'Exception when calling SystemsApi->get_systems' - puts to_output_hash(e) + puts to_output_hash(e).yellow end end + # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity no_commands do def filter_systems(results, system_name = nil, system_owner = nil) + results = results.to_body if results.respond_to?(:to_body) if system_owner.nil? - results.filter { |result| result[:name].eql?(system_name) } + results[:data].filter { |result| result[:name].eql?(system_name) } elsif system_name.nil? - results.filter { |result| result[:systemOwner].eql?(system_owner) } + results[:data].filter { |result| result[:systemOwner].eql?(system_owner) } else - results.filter { |result| result[:name].eql?(system_name) && result[:systemOwner].eql?(system_owner) } + results[:data].filter { |result| result[:name].eql?(system_name) && result[:systemOwner].eql?(system_owner) } end end end + # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity desc "byId \[options\]", 'Retrieve a system - filtered by [options] params' option :systemId, type: :numeric, required: true, @@ -110,8 +112,8 @@ def byId result = EmassClient::SystemsApi.new.get_system(options[:systemId], optional_options) puts to_output_hash(result).green rescue EmassClient::ApiError => e - puts 'Exception when calling SystemsApi->get_systems'.red - puts to_output_hash(e) + puts 'Exception when calling SystemsApi->get_system'.red + puts to_output_hash(e).yellow end end end @@ -148,7 +150,7 @@ def all puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling SystemsApi->get_systems'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end end @@ -174,7 +176,7 @@ def all puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling SystemRolesApi->get_system_roles'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end desc "byCategory \[options\]", 'Retrieves role(s) - filtered by [options] params' @@ -184,7 +186,7 @@ def all enum: ['AO', 'Auditor', 'Artifact Manager', 'C&A Team', 'IAO', 'ISSO', 'PM/IAM', 'SCA', 'User Rep', 'Validator'] # Optional parameters/fields - option :policy, type: :string, required: false, enum: %w[diacap rmf reporting] + option :policy, type: :string, required: false, default: 'rmf', enum: %w[diacap rmf reporting] option :includeDecommissioned, type: :boolean, required: false, desc: 'BOOLEAN - true or false.' def byCategory @@ -197,7 +199,7 @@ def byCategory puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling SystemRolesApi->get_system_by_role_category_id'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end end @@ -230,7 +232,7 @@ def forSystem puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ControlsApi->get_system_controls'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end end @@ -263,7 +265,7 @@ def forSystem puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling TestResultsApi->get_system_test_results'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end end @@ -289,8 +291,8 @@ def self.exit_on_failure? desc: 'The schedule completion start date - Unix time format.' option :scheduledCompletionDateEnd, type: :numeric, required: false, desc: 'The scheduled completion end date - Unix time format.' - option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1, AC-2"' - option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value' + option :controlAcronyms, type: :string, required: false, desc: 'The system acronym(s) e.g "AC-1" or "AC-1, AC-2"' + option :ccis, type: :string, required: false, desc: 'The system CCIS string numerical value e.g "000123" or "000123,000069"' option :systemOnly, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.' def forSystem @@ -302,7 +304,7 @@ def forSystem puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling POAMApi->get_system_poams'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -319,7 +321,7 @@ def byPoamId puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling POAMApi->get_system_poams_by_poam_id'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -356,7 +358,7 @@ def byPoamId puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -377,7 +379,7 @@ def byMilestoneId puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling MilestonesApi->get_system_milestones_by_poam_id_and_milestone_id'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -393,7 +395,7 @@ def self.exit_on_failure? true end - desc 'system', 'Get all system artifacts for a system Id' + desc 'forSystem', 'Get all system artifacts for a system Id' # Required parameters/fields option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification' @@ -414,7 +416,7 @@ def forSystem puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ArtifactsApi->get_system_artifacts'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -437,7 +439,7 @@ def export options[:systemId], options[:filename], optional_options ) if options[:compress] - p result.green + pp result else begin puts JSON.pretty_generate(JSON.parse(result)).green @@ -447,7 +449,7 @@ def export end rescue EmassClient::ApiError => e puts 'Exception when calling ArtifactsApi->get_system_artifacts_export'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -483,7 +485,7 @@ def controls puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_system_cac'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end end @@ -514,7 +516,7 @@ def package puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_system_'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -539,7 +541,7 @@ def assessments puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_cmmc_assessments'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -569,7 +571,7 @@ def forSite puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_workflow_definitions'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end @@ -577,17 +579,14 @@ def forSite # active and historical workflows for a system. # # Endpoints: - # /api/systems/{systemId}/workflow-instances - Get workflow instances in a system - # /api/systems/{systemId}/workflow-instances/{workflowInstanceId} - Get workflow instance by ID in a system + # /api/workflows/instances - Get workflow instances in a site + # /api/workflows/instances/{workflowInstanceId} - Get workflow instance by ID class WorkflowInstances < SubCommandBase def self.exit_on_failure? true end - desc 'forSystem', 'Get workflow instances in a system' - # Required parameters/fields - option :systemId, type: :numeric, required: true, - desc: 'A numeric value representing the system identification' + desc 'all', 'Get workflow instances in a site' # Optional parameters/fields option :includeComments, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.' @@ -595,36 +594,32 @@ def self.exit_on_failure? option :sinceDate, type: :string, required: false, desc: 'The workflow instance date. Unix date format' option :status, type: :string, required: false, enum: %w[active inactive all] - def forSystem + def all optional_options_keys = optional_options(@_initializer).keys optional_options = to_input_hash(optional_options_keys, options) - result = EmassClient::WorkflowInstancesApi.new.get_system_workflow_instances( - options[:systemId], optional_options - ) + result = EmassClient::WorkflowInstancesApi.new.get_system_workflow_instances(optional_options) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end # Workflow by workflowInstanceId --------------------------------------------------------- - desc 'byWorkflowInstanceId', 'Get workflow instance by ID in a system' + desc 'byInstanceId', 'Get workflow instance by ID' # Required parameters/fields - option :systemId, type: :numeric, required: true, - desc: 'A numeric value representing the system identification' option :workflowInstanceId, type: :numeric, required: true, desc: 'A numeric value representing the workflowInstance identification' - def byWorkflowInstanceId - result = EmassClient::WorkflowInstancesApi.new.get_system_workflow_instances_by_workflow_instance_id( - options[:systemId], options[:workflowInstanceId] - ) + def byInstanceId + opts = Emasser::GET_WORKFLOWINSTANCES_RETURN_TYPE + result = EmassClient::WorkflowInstancesApi.new + .get_system_workflow_instances_by_workflow_instance_id(options[:workflowInstanceId], opts) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances_by_workflow_instance_id'.red - puts to_output_hash(e) + puts to_output_hash(e).yellow end end diff --git a/lib/emasser/help/cloudresource_post_mapper.md b/lib/emasser/help/cloudresource_post_mapper.md new file mode 100644 index 0000000..346eee3 --- /dev/null +++ b/lib/emasser/help/cloudresource_post_mapper.md @@ -0,0 +1,62 @@ +Add cloud resource and scan results in the assets module for a system + +Endpoint request parameters/fields + +Field Data Type Details +------------------------------------------------------------------------------------------------- +systemId Integer [Required] Unique eMASS identifier. Will need to provide correct number. +provider String [Required] Cloud service provider name. +resourceId String [Required] Unique identifier/resource namespace for policy compliance result. +resourceName String [Required] Friendly name of Cloud resource. +resourceType String [Required] Type of Cloud resource. + +initiatedBy String [Optional] Email of POC. +cspAccountId String [Optional] System/owner's CSP account ID/number. +cspRegion String [Optional] CSP region of system. +isBaseline Boolean [Optional] True/false flag for providing results as baseline. + If true, all existing compliance results for the resourceId will be replaced by results in the current call. + +tags Object [Optional] Informational tags associated to results for other metadata + text String [Optional] Tag metadata information + +complianceResults Object [Required] Compliance result information + cspPolicyDefinitionId String [Required] Unique identifier/compliance namespace for CSP/Resource’s + policy definition/compliance check. + policyDefinitionTitle String [Required] Friendly policy/compliance check title. Recommend short title + isCompliant Boolean [Required] Compliance status of the policy for the identified cloud resource. + + complianceCheckTimestamp Date [Optional] Unix date format + control String [Optional] Comma separated correlation to Security Control + (e.g. exact NIST Control acronym). + assessmentProcedure String [Optional] Comma separated correlation to Assessment Procedure + (i.e. CCI number for DoD Control Set). + complianceReason String [Optional] Reason/comments for compliance result + policyDeploymentName String [Optional] Name of policy deployment + policyDeploymentVersion String [Optional] Version of policy deployment. + severity String [Optional] Values include the following: (Low, Medium, High, Critical) + + + The following Cloud Resource parameters/fields have the following character limitations: +- Fields that can not exceed 50 characters: + - Policy Deployment Version (`policyDeploymentVersion`) +- Fields that can not exceed 100 characters: + - Assessment Procedure (`assessmentProcedure`) + - Security Control Acronym (`control`) + - CSP Account ID (`cspAccountId`) + - CSP Region (`cspRegion`) + - Email of POC (`initiatedBy`) + - Cloud Service Provider (`provider`) + - Type of Cloud resource (`resourceType`) +- Fields that can not exceed 500 characters: + - CSP/Resource’s Policy ID (`cspPolicyDefinitionId`) + - Policy Deployment Name (`policyDeploymentName`) + - Policy Compliance ID (`resourceId`) + - Cloud Resource Name (`resourceName`) +- Fields that can not exceed 1000 characters: + - Reason for Compliance (`complianceReason`) +- Fields that can not exceed 2000 characters: + - Policy Short Title (`policyDefinitionTitle`) + +Example: + +bundle exec exe/emasser post cloud_resource add --systemId [value] --provider [value] --resourceId [value] --resourceName [value] --resourceType [value] --cspPolicyDefinitionId [value] --isCompliant or --is-not-Compliant --policyDefinitionTitle [value] --test [value] diff --git a/lib/emasser/help/container_post_mapper.md b/lib/emasser/help/container_post_mapper.md new file mode 100644 index 0000000..90a04d5 --- /dev/null +++ b/lib/emasser/help/container_post_mapper.md @@ -0,0 +1,44 @@ +Add cloud resource and scan results in the assets module for a system + +Endpoint request parameters/fields + +Field Data Type Details +------------------------------------------------------------------------------------------------- +systemId Integer [Required] Unique eMASS identifier. Will need to provide correct number. +containerId String [Required] Unique identifier of the container. +containerName String [Required] Friendly name of the container. +time Date [Required] Datetime of scan/result. Unix date format. + +podName String [Optional] Name of pod (e.g. Kubernetes pod). +podIp String [Optional] IP address of pod. +namespace String [Optional] Namespace of container in container orchestration (e.g. Kubernetes namespace). + +tags Object [Optional] Informational tags associated to results for other metadata. + text String [Optional] Tag metadata information. + +benchmarks Object + benchmark String [Required] Identifier of the benchmark/grouping of compliance results. + (e.g. for STIG results, provide the benchmark id for the STIG technology). + isBaseline Boolean [Optional] True/false flag for providing results as baseline. If true, all existing + compliance results for the provided benchmark within the container will be replaced + by results in the current call. + results Object + ruleId String [Required] Identifier for the compliance result, vulnerability, etc. + status String [Required] Benchmark result status + lastSeen Date [Required] Date last seen, Unix date format + message String [Optional] Comments for the result + +The following Container parameters/fields have the following character limitations: +- Fields that can not exceed 100 characters: + - STIG Benchmark ID (`benchmark`) + - Container Namespace (`namespace`) + - Kubernetes assigned IP (`podIp`) + - Kubernetes Pod Name) (`podName`) +- Fields that can not exceed 500 characters: + - Container ID (`containerId`) + - Friendly Container Name (`containerName`) +- Fields that can not exceed 1000 characters: + - Result Comments (`message`) + +Example: +bundle exec ruby exe/emasser post container add --systemId [value] --containerId [value] --containerName [value] --time [value] --benchmark [value] --lastSeen [value] --ruleId [value] --status [value] diff --git a/lib/emasser/output_converters.rb b/lib/emasser/output_converters.rb index a8e7e07..a3b19a9 100644 --- a/lib/emasser/output_converters.rb +++ b/lib/emasser/output_converters.rb @@ -1,14 +1,111 @@ # frozen_string_literal: true module OutputConverters + # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Style/TernaryParentheses + # rubocop:disable Style/IfWithBooleanLiteralBranches, Style/RescueStandardError, Metrics/BlockNesting def to_output_hash(obj) + diplay_nulls = (ENV.fetch('EMASSER_CLI_DISPLAY_NULL', 'true').eql? 'true') ? true : false + diplay_datetime = (ENV.fetch('EMASSER_EPOCH_TO_DATETIME', 'false').eql? 'true') ? true : false + if obj.to_s.include? 'Error message' - obj + begin + index = obj.to_s.index('Response body')+14 + arr_obj = obj.to_s[index, obj.to_s.size - index] + JSON.pretty_generate(JSON.parse(arr_obj)) + rescue + obj + end else - hash = obj.instance_variables.each_with_object({}) do |var, h| - h[var.to_s.delete('@')] = obj.instance_variable_get(var) + obj = obj.to_body if obj.respond_to?(:to_body) + if !diplay_nulls + clean_obj = {} + data_obj = {} + obj.each do |key, value| + if key.to_s.include?('meta') + obj_entry = {} + obj_entry[:meta] = value + clean_obj.merge!(obj_entry) + elsif key.to_s.include?('data') + if value.is_a?(Array) + hash_array = [] + value.each do |elements| + hash_array << elements.compact + end + data_obj['data'] = hash_array + else + data_obj['data'] = value.nil? ? value : value.compact + end + elsif key.to_s.include?('pagination') + pg_obj = {} + pg_obj[:pagination] = value + data_obj.merge!(pg_obj) + end + clean_obj.merge!(data_obj) + end + obj = clean_obj + end + + if diplay_datetime + clean_obj = {} + data_obj = {} + obj.each do |key, value| + if key.to_s.include?('meta') + obj_entry = {} + obj_entry[:meta] = value + clean_obj.merge!(obj_entry) + elsif key.to_s.include?('data') + if value.is_a?(Array) + hash_array = [] + value.each do |element| + datetime_obj = change_to_datetime(element) + hash_array << datetime_obj + end + data_obj['data'] = hash_array + else + data_obj['data'] = change_to_datetime(value) + end + elsif key.to_s.include?('pagination') + pg_obj = {} + pg_obj[:pagination] = value + data_obj.merge!(pg_obj) + end + clean_obj.merge!(data_obj) + end + obj = clean_obj + end + JSON.pretty_generate(obj) + end + end + # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Style/TernaryParentheses + # rubocop:enable Style/IfWithBooleanLiteralBranches, Style/RescueStandardError, Metrics/BlockNesting + + # rubocop:disable Style/IdenticalConditionalBranches, Performance/RedundantMatch, Performance/RegexpMatch + def change_to_datetime(obj) + if obj.nil? + return obj + end + + data_obj = {} + obj.each do |key, value| + obj_entry = {} + if value.is_a?(Array) + hash_array = [] + value.each do |element| + hash_array << change_to_datetime(element) + end + obj_entry[key] = hash_array + data_obj.merge!(obj_entry) + else + if /\w(date|Date)/.match(key.to_s) + value = value.nil? ? value : Time.at(value) + end + obj_entry[key] = value + data_obj.merge!(obj_entry) end - JSON.pretty_generate(hash) end + # rubocop:disable Style/RedundantReturn + return data_obj + # rubocop:enable Style/RedundantReturn end + # rubocop:enable Style/IdenticalConditionalBranches, Performance/RedundantMatch, Performance/RegexpMatch end diff --git a/lib/emasser/post.rb b/lib/emasser/post.rb index 1debadc..93f8930 100644 --- a/lib/emasser/post.rb +++ b/lib/emasser/post.rb @@ -37,7 +37,8 @@ def print_wrapped(message, _options = {}) end module Emasser - POAMS_POST_HELP_MESSAGE = "\nInvoke \"bundle exec exe/emasser post poams help add\" for additional help" + POAMS_POST_HELP_MESSAGE = "\nInvoke \"emasser post poams help add\" for additional help" + SCAN_POST_HELP_MESSAGE = "\nInvoke \"emasser post scan_findings help clear\" for additional help" # The Test Results endpoints provide the ability to add test results for a # system's Assessment Procedures (CCIs) which determine Security Control compliance. # @@ -61,7 +62,7 @@ def self.exit_on_failure? option :complianceStatus, type: :string, required: true, enum: ['Compliant', 'Non-Compliant', 'Not Applicable'] def add - body = EmassClient::TestResultsRequestPostBody.new + body = EmassClient::TestResultsGet.new body.cci = options[:cci] body.tested_by = options[:testedBy] body.test_date = options[:testDate] @@ -72,7 +73,7 @@ def add begin result = EmassClient::TestResultsApi - .new.add_test_results_by_system_id(body_array, options[:systemId]) + .new.add_test_results_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling TestResultsApi->add_test_results_by_system_id'.red @@ -153,7 +154,7 @@ def self.exit_on_failure? # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity def add # Required fields - body = EmassClient::PoamRequiredPost.new + body = EmassClient::PoamGet.new body.status = options[:status] body.vulnerability_description = options[:vulnerabilityDescription] body.source_ident_vuln = options[:sourceIdentVuln] @@ -186,7 +187,7 @@ def add body_array = Array.new(1, body) begin - result = EmassClient::POAMApi.new.add_poam_by_system_id(body_array, options[:systemId]) + result = EmassClient::POAMApi.new.add_poam_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling POAMApi->add_poam_by_system_id'.red @@ -195,7 +196,7 @@ def add end # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity - # rubocop:disable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + # rubocop:disable Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity no_commands do def process_business_logic(body) #----------------------------------------------------------------------------- @@ -213,13 +214,18 @@ def process_business_logic(body) puts ' comments'.red puts POAMS_POST_HELP_MESSAGE.yellow exit + elsif !(options[:scheduledCompletionDate].nil? && options[:milestone].nil?) + puts 'When status = "Risk Accepted" POA&M Item CAN NOT be saved with the following parameters/fields:'.red + puts ' scheduledCompletionDate, or milestone'.red + puts POAMS_PUT_HELP_MESSAGE.yellow + exit else body.comments = options[:comments] end elsif options[:status] == "Ongoing" if options[:scheduledCompletionDate].nil? || options[:milestone].nil? puts 'When status = "Ongoing" the following parameters/fields are required:'.red - puts ' scheduledCompletionDate, or milestone'.red + puts ' scheduledCompletionDate, milestone'.red print_milestone_help puts POAMS_POST_HELP_MESSAGE.yellow exit @@ -295,7 +301,7 @@ def print_milestone_help puts ' --milestone description:"[value]" scheduledCompletionDate:"[value]"'.yellow end end - # rubocop:enable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + # rubocop:enable Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity end # The Milestones endpoints provide the ability add milestones that are associated with @@ -316,18 +322,17 @@ def self.exit_on_failure? option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification' option :description, type: :string, required: true, desc: 'The milestone description' option :scheduledCompletionDate, - type: :numeric, required: false, desc: 'The scheduled completion date - Unix time format' + type: :numeric, required: true, desc: 'The scheduled completion date - Unix time format' def add - body = EmassClient::MilestonesRequestPostBody.new - body.poam_id = options[:poamId] + body = EmassClient::MilestonesGet.new body.description = options[:description] body.scheduled_completion_date = options[:scheduledCompletionDate] body_array = Array.new(1, body) begin result = EmassClient::MilestonesApi - .new.add_milestone_by_system_id_and_poam_id(body_array, options[:systemId], options[:poamId]) + .new.add_milestone_by_system_id_and_poam_id(options[:systemId], options[:poamId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling MilestonesApi->add_milestone_by_system_id_and_poam_id'.red @@ -357,8 +362,6 @@ def self.exit_on_failure? 'Image', 'Other', 'Scan Result', 'Auditor Report'] option :category, type: :string, required: true, enum: ['Implementation Guidance', 'Evidence'] option :isTemplate, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false.' - # NOTE: compress is a required parameter, however Thor does not allow a boolean type to be required because it - # automatically creates a --no-isTemplate option for isTemplate=false # Optional parameters/fields option :description, type: :string, required: false, desc: 'Artifact description' @@ -379,6 +382,9 @@ def upload optional_options.delete(:is_template) opts = {} + opts[:type] = options[:type] + opts[:category] = options[:category] + opts[:is_template] = options[:is_template] opts[:form_params] = optional_options tempfile = Tempfile.create(['artifacts', '.zip']) @@ -395,8 +401,7 @@ def upload begin result = EmassClient::ArtifactsApi .new - .add_artifacts_by_system_id(options[:isTemplate], options[:type], - options[:category], tempfile, options[:systemId], opts) + .add_artifacts_by_system_id(options[:systemId], tempfile, opts) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ArtifactsApi->add_artifacts_by_system_id'.red @@ -431,7 +436,7 @@ def self.exit_on_failure? option :comments, type: :string, required: false, desc: 'The control approval chain comments' def add - body = EmassClient::CacRequestPostBody.new + body = EmassClient::CacGet.new body.control_acronym = options[:controlAcronym] body.comments = options[:comments] @@ -439,10 +444,10 @@ def add begin # Get location of one or many controls in CAC - result = EmassClient::CacApi.new.add_s_ystem_c_ac(body_array, options[:systemId]) + result = EmassClient::CACApi.new.add_system_cac(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e - puts 'Exception when calling ApprovalChainApi->add_s_ystem_c_ac'.red + puts 'Exception when calling ApprovalChainApi->add_system_cac'.red puts to_output_hash(e) end end @@ -470,22 +475,22 @@ def self.exit_on_failure? desc: 'Comments submitted upon initiation of the indicated workflow' def add - body = EmassClient::PacRequestBodyPost.new + body = EmassClient::PacGet.new body.name = options[:name] - body.type = options[:type] + body.workflow = options[:workflow] body.comments = options[:comments] body_array = Array.new(1, body) - result = EmassClient::PacApi.new.add_s_ystem_p_ac(body_array, options[:systemId]) + result = EmassClient::PACApi.new.add_system_pac(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e - puts 'Exception when calling ApprovalChainApi->add_s_ystem_c_ac'.red + puts 'Exception when calling ApprovalChainApi->add_system_pac'.red puts to_output_hash(e) end end - # TThe Static Code Scans endpoint provides the ability to upload application + # The Static Code Scans endpoint provides the ability to upload application # scan findings into a system's assets module. # # Application findings can also be cleared from the system. @@ -505,15 +510,14 @@ def self.exit_on_failure? option :applicationName, type: :string, required: true, desc: 'Name of the software application that was assessed' option :version, type: :string, required: true, desc: 'The version of the application' option :codeCheckName, type: :string, required: true, desc: 'Name of the software vulnerability or weakness' - option :scanDate, type: :numeric, required: false, desc: 'The findings scan date - Unix time format' + option :scanDate, type: :numeric, required: true, desc: 'The findings scan date - Unix time format' option :cweId, type: :string, required: true, desc: 'The Common Weakness Enumerator (CWE) identifier' - + option :count, type: :numeric, required: true, desc: 'Number of instances observed for a specified finding' # Optional parameter/fields option :rawSeverity, type: :string, required: false, enum: %w[Low Medium Moderate High Critical] - option :count, type: :numeric, required: false, desc: 'Number of instances observed for a specified finding' def add - application = EmassClient::StaticCodeRequiredPostApplication.new + application = EmassClient::StaticCodeRequestPostBodyApplication.new application.application_name = options[:applicationName] application.version = options[:version] @@ -521,19 +525,20 @@ def add application_findings.code_check_name = options[:codeCheckName] application_findings.scan_date = options[:scanDate] application_findings.cwe_id = options[:cweId] - + application_findings.count = options[:count] application_findings.raw_severity = options[:rawSeverity] if options[:rawSeverity] - application_findings.count = options[:count] if options[:count] - body = EmassClient::StaticCodeRequiredPost.new + app_findings_array = Array.new(1, application_findings) + + body = EmassClient::StaticCodeRequestPostBody.new body.application = application - body.application_findings = application_findings + body.application_findings = app_findings_array body_array = Array.new(1, body) begin result = EmassClient::StaticCodeScansApi - .new.add_static_code_scans_by_system_id(body_array, options[:systemId]) + .new.add_static_code_scans_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling StaticCodeScansApi->add_static_code_scans_by_system_id'.red @@ -556,26 +561,28 @@ def add def clear unless options[:clearFindings] puts 'To clear an application findings, the field clearFindings (--clearFindings) is required'.red - puts NEW_LINE + 'Invoke "bundle exec exe/emasser post scan_findings help clear" for additional help'.yellow + puts SCAN_POST_HELP_MESSAGE.yellow exit end - application = EmassClient::StaticCodeRequiredPostApplication.new + application = EmassClient::StaticCodeRequestPostBodyApplication.new application.application_name = options[:applicationName] application.version = options[:version] application_findings = EmassClient::StaticCodeApplication.new application_findings.clear_findings = options[:clearFindings] - body = EmassClient::StaticCodeRequiredPost.new + app_findings_array = Array.new(1, application_findings) + + body = EmassClient::StaticCodeRequestPostBody.new body.application = application - body.application_findings = application_findings + body.application_findings = app_findings_array body_array = Array.new(1, body) begin result = EmassClient::StaticCodeScansApi - .new.add_static_code_scans_by_system_id(body_array, options[:systemId]) + .new.add_static_code_scans_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling StaticCodeScansApi->add_static_code_scans_by_system_id'.red @@ -584,6 +591,186 @@ def clear end end + # The Cloud Resources endpoint provides the ability to upload (add) + # cloud resources and their scan results in the assets module for a system. + # + # + # Endpoint: + # /api/systems/{systemId}/cloud-resources-results - Upload cloud resources and their scan results + class CloudResource < SubCommandBase + def self.exit_on_failure? + true + end + + desc 'add', 'Upload cloud resources and their scan results' + long_desc Help.text(:cloudresource_post_mapper) + + # Required parameters/fields + option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification' + option :provider, type: :string, required: true, desc: 'Cloud service provider name' + option :resourceId, type: :string, required: true, desc: 'Unique identifier/resource namespace for policy compliance result' + option :resourceName, type: :string, required: true, desc: 'Friendly name of Cloud resource' + option :resourceType, type: :string, required: true, desc: 'Type of Cloud resource' + # ComplianceResults Array Objects + option :cspPolicyDefinitionId, type: :string, required: true, desc: 'Unique identifier/compliance namespace for CSP/Resource\'s policy definition/compliance check' + option :isCompliant, type: :boolean, required: false, default: false, desc: 'BOOLEAN - true or false' + option :policyDefinitionTitle, type: :string, required: true, desc: 'Friendly policy/compliance check title. Recommend short title' + + # Optional parameter/fields + option :initiatedBy, type: :string, required: false, desc: 'Email of POC' + option :cspAccountId, type: :string, required: false, desc: 'System/owner\'s CSP account ID/number' + option :cspRegion, type: :string, required: false, desc: 'CSP region of system' + option :isBaseline, type: :boolean, required: false, default: true, desc: 'BOOLEAN - true or false' + # Tags Object + option :test, type: :string, required: false, desc: 'The test tag' + # ComplianceResults Array Objects + option :assessmentProcedure, type: :string, required: false, desc: 'Comma separated correlation to Assessment Procedure (i.e. CCI number for DoD Control Set)' + option :complianceCheckTimestamp, type: :numeric, required: false, desc: 'The compliance timestamp Unix date format.' + option :complianceReason, type: :string, required: false, desc: 'Reason/comments for compliance result' + option :control, type: :string, required: false, desc: 'Comma separated correlation to Security Control (e.g. exact NIST Control acronym)' + option :policyDeploymentName, type: :string, required: false, desc: 'Name of policy deployment' + option :policyDeploymentVersion, type: :string, required: false, desc: 'policyDeploymentVersion' + option :severity, type: :string, required: false, enum: %w[Low Medium Moderate High Critical] + + # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + def add + # Required and Optional main fields + body = {} + body[:provider] = options[:provider] + body[:resourceId] = options[:resourceId] + body[:resourceName] = options[:resourceName] + body[:resourceType] = options[:resourceType] + + body[:initiatedBy] = options[:initiatedBy] if options[:initiatedBy] + body[:cspAccountId] = options[:cspAccountId] if options[:cspAccountId] + body[:cspRegion] = options[:cspRegion] if options[:cspRegion] + body[:isBaseline] = options[:isBaseline] if options[:isBaseline] + + # Optional tags field + tags = {} + tags[:test] = options[:test] if options[:test] + + # Required and Optional compliances results fields + compliance_results = {} + compliance_results[:cspPolicyDefinitionId] = options[:cspPolicyDefinitionId] + compliance_results[:isCompliant] = options[:isCompliant] + compliance_results[:policyDefinitionTitle] = options[:policyDefinitionTitle] + # Optional fields + compliance_results[:assessmentProcedure] = options[:assessmentProcedure] if options[:assessmentProcedure] + compliance_results[:complianceCheckTimestamp] = options[:complianceCheckTimestamp] if options[:complianceCheckTimestamp] + compliance_results[:complianceReason] = options[:complianceReason] if options[:complianceReason] + compliance_results[:control] = options[:control] if options[:control] + compliance_results[:policyDeploymentName] = options[:policyDeploymentName] if options[:policyDeploymentName] + compliance_results[:policyDeploymentVersion] = options[:policyDeploymentVersion] if options[:policyDeploymentVersion] + compliance_results[:severity] = options[:severity] if options[:severity] + + compliance_results_array = Array.new(1, compliance_results) + + body[:tags] = tags + body[:complianceResults] = compliance_results_array + + body_array = Array.new(1, body) + + begin + result = EmassClient::CloudResourcesApi + .new.add_cloud_resources_by_system_id(options[:systemId], body_array) + puts to_output_hash(result).green + rescue EmassClient::ApiError => e + puts 'Exception when calling StaticCodeScansApi->add_cloud_resources_by_system_id'.red + puts to_output_hash(e) + end + end + # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + end + + # The Containers endpoint provides the ability to upload (add) + # containers and their scan results in the assets module for a system. + # + # + # Endpoint: + # /api/systems/{systemId}/container-scan-results - Upload containers and their scan results + class Container < SubCommandBase + def self.exit_on_failure? + true + end + + desc 'add', 'Upload containers and their scan results' + long_desc Help.text(:container_post_mapper) + + # Required parameters/fields + option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification' + option :containerId, type: :string, required: true, desc: 'Unique identifier of the container' + option :containerName, type: :string, required: true, desc: 'Friendly name of the container' + option :time, type: :numeric, required: true, desc: 'Datetime of scan/result. Unix date format' + # Benchmarks Array Objects + option :benchmark, type: :string, required: true, desc: 'Identifier of the benchmark/grouping of compliance results' + # Benchmarks.Results Array Objects + option :lastSeen, type: :numeric, required: true, desc: 'Date last seen, Unix date format' + option :ruleId, type: :string, required: true, desc: 'Identifier for the compliance result, vulnerability, etc. the result is for' + option :status, type: :string, required: true, enum: ['Pass', 'Fail', 'Other', 'Not Reviewed', 'Not Checked', 'Not Applicable'] + + # Optional parameter/fields + option :namespace, type: :string, required: false, desc: 'Namespace of container in container orchestration' + option :podIp, type: :string, required: false, desc: 'IP address of the pod' + option :podName, type: :string, required: false, desc: 'Name of pod (e.g. Kubernetes pod)' + # Tags Object + option :test, type: :string, required: false, desc: 'The test tag' + # Benchmarks Array Objects + option :isBaseline, type: :boolean, required: false, default: true, desc: 'BOOLEAN - true or false' + # Benchmarks.Results Array Objects + option :message, type: :string, required: false, desc: 'Benchmark result comments' + + # rubocop:disable Metrics/CyclomaticComplexity + def add + # Required and Optional main fields + body = {} + body[:containerId] = options[:containerId] + body[:containerName] = options[:containerName] + body[:time] = options[:time] + body[:namespace] = options[:namespace] if options[:namespace] + body[:podIp] = options[:podIp] if options[:podIp] + body[:podName] = options[:podName] if options[:podName] + + # Optional tags field + tags = {} + tags[:test] = options[:test] if options[:test] + + # Required and Optional Benchmarks fields + benchmarks = {} + benchmarks[:benchmark] = options[:benchmark] + # Optional fields + benchmarks[:isBaseline] = options[:isBaseline] if options[:isBaseline] + + # Required and Optional Benchmarks.Results + benchmarks_results = {} + benchmarks_results[:lastSeen] = options[:lastSeen] + benchmarks_results[:ruleId] = options[:ruleId] + benchmarks_results[:status] = options[:status] + benchmarks_results[:message] = options[:message] if options[:message] + + # Add Benchmark results to an array and add array to benchmarks object + benchmarks_results_array = Array.new(1, benchmarks_results) + benchmarks[:results] = benchmarks_results_array # = Array.new(1, benchmarks_results) + # Add benchmarks object to an array + benchmarks_array = Array.new(1, benchmarks) + # Add tags and benchmark ojects to body object + body[:tags] = tags + body[:benchmarks] = benchmarks_array + + body_array = Array.new(1, body) + + begin + result = EmassClient::ContainersApi + .new.add_container_sans_by_system_id(options[:systemId], body_array) + puts to_output_hash(result).green + rescue EmassClient::ApiError => e + puts 'Exception when calling StaticCodeScansApi->add_container_sans_by_system_id'.red + puts to_output_hash(e) + end + end + # rubocop:enable Metrics/CyclomaticComplexity + end + class Post < SubCommandBase desc 'test_results', 'Add system Test Results' subcommand 'test_results', TestResults @@ -605,5 +792,11 @@ class Post < SubCommandBase desc 'scan_findings', 'Upload static code scans' subcommand 'scan_findings', ScanFindings + + desc 'cloud_resource', 'Upload cloud resource and their scan results' + subcommand 'cloud_resource', CloudResource + + desc 'container', 'Upload container and their scan results' + subcommand 'container', Container end end diff --git a/lib/emasser/put.rb b/lib/emasser/put.rb index 473f43a..1de5ecb 100644 --- a/lib/emasser/put.rb +++ b/lib/emasser/put.rb @@ -129,7 +129,7 @@ def self.exit_on_failure? # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity def update # Required fields - body = EmassClient::ControlsRequestPutBody.new + body = EmassClient::ControlsGet.new body.acronym = options[:acronym] body.responsible_entities = options[:responsibleEntities] body.control_designation = options[:controlDesignation] @@ -147,11 +147,12 @@ def update body.impact = options[:impact] if options[:impact] body.impact_description = options[:impactDescription] if options[:impactDescription] body.residual_risk_level = options[:residualRiskLevel] if options[:residualRiskLevel] + body.test_method = options[:testMethod] if options[:testMethod] body_array = Array.new(1, body) begin - result = EmassClient::ControlsApi.new.update_control_by_system_id(body_array, options[:systemId]) + result = EmassClient::ControlsApi.new.update_control_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ControlsApi->update_control_by_system_id'.red @@ -268,9 +269,9 @@ def self.exit_on_failure? # Required parameters/fields option :systemId, type: :numeric, required: true, desc: 'A numeric value representing the system identification' option :poamId, type: :numeric, required: true, desc: 'A numeric value representing the poam identification' - option :displayPoamId, - type: :numeric, required: true, - desc: 'Globally unique identifier for individual POA&M Items, seen on the front-end as "ID"' + # option :displayPoamId, + # type: :numeric, required: true, + # desc: 'Globally unique identifier for individual POA&M Items, seen on the front-end as "ID"' option :status, type: :string, required: true, enum: ['Ongoing', 'Risk Accepted', 'Completed', 'Not Applicable'] option :vulnerabilityDescription, type: :string, required: true, desc: 'POA&M vulnerability description' option :sourceIdentVuln, @@ -312,12 +313,13 @@ def self.exit_on_failure? # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity def update # Required fields - body = EmassClient::PoamRequiredPut.new + body = EmassClient::PoamGet.new body.poam_id = options[:poamId] body.status = options[:status] body.vulnerability_description = options[:vulnerabilityDescription] body.source_ident_vuln = options[:sourceIdentVuln] body.poc_organization = options[:pocOrganization] + body.resources = options[:resources] process_business_logic(body) @@ -345,7 +347,7 @@ def update body_array = Array.new(1, body) begin - result = EmassClient::POAMApi.new.update_poam_by_system_id(body_array, options[:systemId]) + result = EmassClient::POAMApi.new.update_poam_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling POAMApi->update_poam_by_system_id'.red @@ -354,7 +356,7 @@ def update end # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity - # rubocop:disable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + # rubocop:disable Metrics/AbcSize, Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity no_commands do def process_business_logic(body) #----------------------------------------------------------------------------- @@ -372,13 +374,18 @@ def process_business_logic(body) puts ' comments'.red puts POAMS_PUT_HELP_MESSAGE.yellow exit + elsif !(options[:scheduledCompletionDate].nil? && options[:milestone].nil?) + puts 'When status = "Risk Accepted" POA&M Item CAN NOT be saved with the following parameters/fields:'.red + puts ' scheduledCompletionDate, or milestone'.red + puts POAMS_PUT_HELP_MESSAGE.yellow + exit else body.comments = options[:comments] end elsif options[:status] == "Ongoing" if options[:scheduledCompletionDate].nil? || options[:milestone].nil? puts 'When status = "Ongoing" the following parameters/fields are required:'.red - puts ' scheduledCompletionDate, or milestone'.red + puts ' scheduledCompletionDate, milestone'.red print_milestone_help puts POAMS_PUT_HELP_MESSAGE.yellow exit @@ -457,7 +464,7 @@ def print_milestone_help puts 'The milestoneId:[value] is optional, if not provided a new milestone is created'.yellow end end - # rubocop:enable Metrics/BlockLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + # rubocop:enable Metrics/AbcSize, Metrics/BlockLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity end # Update Milestones items to a system. @@ -482,7 +489,7 @@ def self.exit_on_failure? type: :numeric, required: false, desc: 'The scheduled completion date - Unix time format' def update - body = EmassClient::MilestonesRequestPutBody.new + body = EmassClient::MilestonesGet.new body.milestone_id = options[:milestoneId] body.description = options[:description] body.scheduled_completion_date = options[:scheduledCompletionDate] @@ -490,12 +497,12 @@ def update begin # Get milestones in one or many poa&m items in a system - result = EmassClient::POAMApi + result = EmassClient::MilestonesApi .new - .update_milestone_by_system_id_and_poam_id(body_array, options[:systemId], options[:poamId]) + .update_milestone_by_system_id_and_poam_id(options[:systemId], options[:poamId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e - puts 'Exception when calling POAMApi->update_milestone_by_system_id_and_poam_id'.red + puts 'Exception when calling MilestonesApi->update_milestone_by_system_id_and_poam_id'.red puts to_output_hash(e) end end @@ -539,7 +546,7 @@ def self.exit_on_failure? # rubocop:disable Metrics/CyclomaticComplexity def update - body = EmassClient::ArtifactsRequestPutBody.new + body = EmassClient::ArtifactsGet.new body.filename = options[:filename] body.type = options[:type] body.category = options[:category] @@ -555,7 +562,7 @@ def update body_array = Array.new(1, body) begin - result = EmassClient::ArtifactsApi.new.update_artifact_by_system_id(body_array, options[:systemId]) + result = EmassClient::ArtifactsApi.new.update_artifact_by_system_id(options[:systemId], body_array) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ArtifactsApi->update_artifact_by_system_id'.red diff --git a/lib/emasser/version.rb b/lib/emasser/version.rb index ed4fb2f..b1eb46e 100644 --- a/lib/emasser/version.rb +++ b/lib/emasser/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Emasser - VERSION = '1.0.3' + VERSION = '1.0.6' end diff --git a/spec/test_delete_cli_spec.rb b/spec/test_delete_cli_spec.rb new file mode 100644 index 0000000..4a8bc85 --- /dev/null +++ b/spec/test_delete_cli_spec.rb @@ -0,0 +1,43 @@ +require 'thor' +require 'emasser/errors' +require 'emasser/output_converters' +require 'emasser/help' +require 'emasser/delete' + +# ----------------------------------------------------- +# Test that all required CLI DELETE classes are available +describe Emasser::Poams do + before do + # run before each test + @instance = Emasser::Poams.new + end + context 'test an instance of Poams class object' do + it 'should create an instance of Poams (delete)' do + expect(@instance).to be_instance_of(Emasser::Poams) + end + end +end + +describe Emasser::Milestones do + before do + # run before each test + @instance = Emasser::Milestones.new + end + context 'test an instance of Milestones class object' do + it 'should create an instance of Milestones (delete)' do + expect(@instance).to be_instance_of(Emasser::Milestones) + end + end +end + +describe Emasser::Artifacts do + before do + # run before each test + @instance = Emasser::Artifacts.new + end + context 'test an instance of Artifacts class object' do + it 'should create an instance of Artifacts (delete)' do + expect(@instance).to be_instance_of(Emasser::Artifacts) + end + end +end diff --git a/spec/test_emass_client_spec.rb b/spec/test_emass_client_spec.rb deleted file mode 100644 index 0ced092..0000000 --- a/spec/test_emass_client_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -ruby_client_path = File.expand_path('../emass_client/ruby_client/lib', __dir__) -$LOAD_PATH.unshift(ruby_client_path) unless $LOAD_PATH.include?(ruby_client_path) - -spec_path = File.expand_path('../emass_client/ruby_client/spec', __dir__) -$LOAD_PATH.unshift(spec_path) unless $LOAD_PATH.include?(spec_path) - -api_path = File.expand_path('../emass_client/ruby_client/spec/api', __dir__) -$LOAD_PATH.unshift(api_path) unless $LOAD_PATH.include?(api_path) - -require 'rspec' - -# Test client common files -require 'api_client_spec' -require 'configuration_spec' - -# Test Client APIs -require 'artifacts_api_spec' -require 'artifacts_export_api_spec' -require 'cac_api_spec' -require 'cmmc_assessments_api_spec' -require 'controls_api_spec' -require 'milestones_api_spec' -require 'pac_api_spec' -require 'poam_api_spec' -require 'registration_api_spec' -require 'static_code_scans_api_spec' -require 'system_roles_api_spec' -require 'systems_api_spec' -require 'test_api_spec' -require 'test_results_api_spec' -require 'workflow_definitions_api_spec' -require 'workflow_instances_api_spec' - -# Test that versions match -require 'emasser/version' - -describe 'emass_client version number' do - it 'is equal to the emasser version number' do - expect(Emasser::VERSION).to eq(EmassClient::VERSION) - end -end diff --git a/spec/test_emasser_cli_spec.rb b/spec/test_emasser_cli_spec.rb index af2ca70..a4632ab 100644 --- a/spec/test_emasser_cli_spec.rb +++ b/spec/test_emasser_cli_spec.rb @@ -14,33 +14,17 @@ # # The top describe block can also be any string that describes the testing. describe 'emasser cli' do - # rubocop:disable Style/StringConcatenation, Style/CommandLiteral, Style/PercentLiteralDelimiters - let(:yamlFile) { File.expand_path('../emass_client', __dir__)+'/eMASSRestOpenApi.yaml' } - let(:devDoc) { File.expand_path('../docs', __dir__)+'/developers.md' } + # rubocop:disable Style/StringConcatenation let(:featuresDoc) { File.expand_path('../docs', __dir__)+'/features.md' } it 'has a version number' do expect(Emasser::VERSION).not_to be nil end - it 'should have the eMASS API yaml definition file' do - yaml_object = JSON.generate(YAML.load_file(yamlFile)) - expect(yaml_object.length).to be > 0 - end - - it 'should have a valid API yaml definition file' do - yaml_object = %x[ruby -r yaml -e 'YAML.load_file ARGV[0];puts "ok"' #{yamlFile}] - expect(yaml_object).to eq("ok\n") - end - - it 'should have a developers markdown file' do - expect(File).to exist(devDoc) - end - it 'should have a features markdown file' do expect(File).to exist(featuresDoc) end - # rubocop:enable Style/StringConcatenation, Style/CommandLiteral, Style/PercentLiteralDelimiters + # rubocop:enable Style/StringConcatenation end # to run use: diff --git a/spec/test_get_cli_spec.rb b/spec/test_get_cli_spec.rb index a7d21f4..9cae85c 100644 --- a/spec/test_get_cli_spec.rb +++ b/spec/test_get_cli_spec.rb @@ -1,4 +1,3 @@ -# require 'dotenv/load' require 'thor' require 'emasser/errors' require 'emasser/options_parser' @@ -15,7 +14,7 @@ @instance = Emasser::Test.new end context 'test an instance of Test class object' do - it 'should create an instance of Test' do + it 'should create an instance of Test (get)' do expect(@instance).to be_instance_of(Emasser::Test) end end @@ -27,7 +26,7 @@ @instance = Emasser::System.new end context 'test an instance of System class object' do - it 'should create an instance of System' do + it 'should create an instance of System (get)' do expect(@instance).to be_instance_of(Emasser::System) end end @@ -39,7 +38,7 @@ @instance = Emasser::Systems.new end context 'test an instance of Systems class object' do - it 'should create an instance of Systems' do + it 'should create an instance of Systems (get)' do expect(@instance).to be_instance_of(Emasser::Systems) end end @@ -51,7 +50,7 @@ @instance = Emasser::Roles.new end context 'test an instance of Roles class object' do - it 'should create an instance of Roles' do + it 'should create an instance of Roles (get)' do expect(@instance).to be_instance_of(Emasser::Roles) end end @@ -63,7 +62,7 @@ @instance = Emasser::Controls.new end context 'test an instance of Controls class object' do - it 'should create an instance of Controls' do + it 'should create an instance of Controls (get)' do expect(@instance).to be_instance_of(Emasser::Controls) end end @@ -75,7 +74,7 @@ @instance = Emasser::TestResults.new end context 'test an instance of TestResults class object' do - it 'should create an instance of TestResults' do + it 'should create an instance of TestResults (get)' do expect(@instance).to be_instance_of(Emasser::TestResults) end end @@ -87,7 +86,7 @@ @instance = Emasser::Poams.new end context 'test an instance of Poams class object' do - it 'should create an instance of Poams' do + it 'should create an instance of Poams (get)' do expect(@instance).to be_instance_of(Emasser::Poams) end end @@ -99,7 +98,7 @@ @instance = Emasser::Milestones.new end context 'test an instance of Milestones class object' do - it 'should create an instance of Milestones' do + it 'should create an instance of Milestones (get)' do expect(@instance).to be_instance_of(Emasser::Milestones) end end @@ -111,7 +110,7 @@ @instance = Emasser::Artifacts.new end context 'test an instance of Artifacts class object' do - it 'should create an instance of Artifacts' do + it 'should create an instance of Artifacts (get)' do expect(@instance).to be_instance_of(Emasser::Artifacts) end end @@ -123,7 +122,7 @@ @instance = Emasser::CAC.new end context 'test an instance of CAC class object' do - it 'should create an instance of CAC' do + it 'should create an instance of CAC (get)' do expect(@instance).to be_instance_of(Emasser::CAC) end end @@ -135,7 +134,7 @@ @instance = Emasser::PAC.new end context 'test an instance of PAC class object' do - it 'should create an instance of PAC' do + it 'should create an instance of PAC (get)' do expect(@instance).to be_instance_of(Emasser::PAC) end end @@ -147,7 +146,7 @@ @instance = Emasser::CMMC.new end context 'test an instance of CMMC class object' do - it 'should create an instance of CMMC' do + it 'should create an instance of CMMC (get)' do expect(@instance).to be_instance_of(Emasser::CMMC) end end @@ -159,7 +158,7 @@ @instance = Emasser::WorkflowDefinitions.new end context 'test an instance of WorkflowDefinitions class object' do - it 'should create an instance of WorkflowDefinitions' do + it 'should create an instance of WorkflowDefinitions (get)' do expect(@instance).to be_instance_of(Emasser::WorkflowDefinitions) end end @@ -171,7 +170,7 @@ @instance = Emasser::WorkflowInstances.new end context 'test an instance of WorkflowInstances class object' do - it 'should create an instance of WorkflowInstances' do + it 'should create an instance of WorkflowInstances (get)' do expect(@instance).to be_instance_of(Emasser::WorkflowInstances) end end diff --git a/spec/test_post_cli_spec.rb b/spec/test_post_cli_spec.rb index a224083..06f2faf 100644 --- a/spec/test_post_cli_spec.rb +++ b/spec/test_post_cli_spec.rb @@ -14,7 +14,7 @@ @instance = Emasser::TestResults.new end context 'test an instance of TestResults class object' do - it 'should create an instance of TestResults' do + it 'should create an instance of TestResults (post)' do expect(@instance).to be_instance_of(Emasser::TestResults) end end @@ -26,7 +26,7 @@ @instance = Emasser::Poams.new end context 'test an instance of Poams class object' do - it 'should create an instance of Poams' do + it 'should create an instance of Poams (post)' do expect(@instance).to be_instance_of(Emasser::Poams) end end @@ -38,7 +38,7 @@ @instance = Emasser::Milestones.new end context 'test an instance of Milestones class object' do - it 'should create an instance of Milestones' do + it 'should create an instance of Milestones (post)' do expect(@instance).to be_instance_of(Emasser::Milestones) end end @@ -50,20 +50,68 @@ @instance = Emasser::Artifacts.new end context 'test an instance of Artifacts class object' do - it 'should create an instance of Artifacts' do + it 'should create an instance of Artifacts (post)' do expect(@instance).to be_instance_of(Emasser::Artifacts) end end end +describe Emasser::PAC do + before do + # run before each test + @instance = Emasser::PAC.new + end + context 'test an instance of PAC class object' do + it 'should create an instance of PAC (post)' do + expect(@instance).to be_instance_of(Emasser::PAC) + end + end +end + describe Emasser::CAC do before do # run before each test @instance = Emasser::CAC.new end context 'test an instance of CAC class object' do - it 'should create an instance of CAC' do + it 'should create an instance of CAC (post)' do expect(@instance).to be_instance_of(Emasser::CAC) end end end + +describe Emasser::ScanFindings do + before do + # run before each test + @instance = Emasser::ScanFindings.new + end + context 'test an instance of ScanFindings class object' do + it 'should create an instance of ScanFindings (post)' do + expect(@instance).to be_instance_of(Emasser::ScanFindings) + end + end +end + +describe Emasser::CloudResource do + before do + # run before each test + @instance = Emasser::CloudResource.new + end + context 'test an instance of CloudResource class object' do + it 'should create an instance of CloudResource (post)' do + expect(@instance).to be_instance_of(Emasser::CloudResource) + end + end +end + +describe Emasser::Container do + before do + # run before each test + @instance = Emasser::Container.new + end + context 'test an instance of Container class object' do + it 'should create an instance of Container (post)' do + expect(@instance).to be_instance_of(Emasser::Container) + end + end +end diff --git a/spec/test_put_cli_spec.rb b/spec/test_put_cli_spec.rb index d56869a..9c75837 100644 --- a/spec/test_put_cli_spec.rb +++ b/spec/test_put_cli_spec.rb @@ -1,4 +1,3 @@ -# require 'dotenv/load' require 'thor' require 'emasser/errors' require 'emasser/output_converters' @@ -13,7 +12,7 @@ @instance = Emasser::Controls.new end context 'test an instance of Controls class object' do - it 'should create an instance of Controls' do + it 'should create an instance of Controls (put)' do expect(@instance).to be_instance_of(Emasser::Controls) end end @@ -25,7 +24,7 @@ @instance = Emasser::Poams.new end context 'test an instance of Poams class object' do - it 'should create an instance of Poams' do + it 'should create an instance of Poams (put)' do expect(@instance).to be_instance_of(Emasser::Poams) end end @@ -37,7 +36,7 @@ @instance = Emasser::Milestones.new end context 'test an instance of Milestones class object' do - it 'should create an instance of Milestones' do + it 'should create an instance of Milestones (put)' do expect(@instance).to be_instance_of(Emasser::Milestones) end end @@ -49,7 +48,7 @@ @instance = Emasser::Artifacts.new end context 'test an instance of Artifacts class object' do - it 'should create an instance of Artifacts' do + it 'should create an instance of Artifacts (put)' do expect(@instance).to be_instance_of(Emasser::Artifacts) end end