From f9cff52fb26f86d9995b1caef505d265caa11e75 Mon Sep 17 00:00:00 2001 From: bpmcdevitt Date: Mon, 3 Oct 2022 14:58:46 -0500 Subject: [PATCH] added in microsoft exchange release scraper --- .../app_build_number_cpe_mapper/exchange.rb | 81 ++++ .../bin/get_exploited_vulns_msft_bulletin.rb | 2 +- .../{ => cvrf}/generate_cvrf_api_ruby.sh | 0 .../{ => cvrf}/microsoft_cvrf_client.rb | 0 .../openapi_client_msft_cvrf_api.zip | Bin tools/microsoft/cvrf/ruby-client/.gitignore | 39 ++ .../ruby-client/.openapi-generator-ignore | 23 ++ .../cvrf/ruby-client/.openapi-generator/FILES | 159 +++++++ .../ruby-client/.openapi-generator/VERSION | 1 + tools/microsoft/cvrf/ruby-client/.rspec | 2 + tools/microsoft/cvrf/ruby-client/.rubocop.yml | 148 +++++++ tools/microsoft/cvrf/ruby-client/.travis.yml | 11 + tools/microsoft/cvrf/ruby-client/Gemfile | 9 + tools/microsoft/cvrf/ruby-client/README.md | 137 ++++++ tools/microsoft/cvrf/ruby-client/Rakefile | 10 + .../ruby-client/docs/CvrfReturnTypes200.md | 30 ++ .../CvrfReturnTypes200Acknowledgements.md | 20 + .../docs/CvrfReturnTypes200AffectedFiles.md | 28 ++ .../docs/CvrfReturnTypes200CVSSScoreSets.md | 24 ++ .../docs/CvrfReturnTypes200DocumentNotes.md | 26 ++ .../CvrfReturnTypes200DocumentPublisher.md | 22 + .../docs/CvrfReturnTypes200DocumentTitle.md | 18 + .../CvrfReturnTypes200DocumentTracking.md | 28 ++ ...nTypes200DocumentTrackingIdentification.md | 20 + ...Types200DocumentTrackingRevisionHistory.md | 22 + .../docs/CvrfReturnTypes200Notes.md | 24 ++ .../docs/CvrfReturnTypes200ProductStatuses.md | 20 + .../docs/CvrfReturnTypes200ProductTree.md | 20 + .../CvrfReturnTypes200ProductTreeBranch.md | 18 + .../CvrfReturnTypes200ProductTreeItems.md | 20 + .../CvrfReturnTypes200ProductTreeItems1.md | 22 + .../docs/CvrfReturnTypes200Remediations.md | 34 ++ .../docs/CvrfReturnTypes200Threats.md | 24 ++ .../docs/CvrfReturnTypes200Vulnerability.md | 40 ++ .../ruby-client/docs/CvrfReturnTypes200Xml.md | 18 + .../docs/CvrfReturnTypes200XmlCvrfdoc.md | 30 ++ ...rfReturnTypes200XmlCvrfdocDocumentNotes.md | 18 + ...turnTypes200XmlCvrfdocDocumentPublisher.md | 22 + ...eturnTypes200XmlCvrfdocDocumentTracking.md | 28 ++ ...mlCvrfdocDocumentTrackingIdentification.md | 20 + ...lCvrfdocDocumentTrackingRevisionHistory.md | 18 + ...DocumentTrackingRevisionHistoryRevision.md | 22 + .../docs/CvrfReturnTypes200XmlCvrfdocNote.md | 24 ++ ...CvrfReturnTypes200XmlCvrfdocProductTree.md | 20 + ...turnTypes200XmlCvrfdocProductTreeBranch.md | 22 + ...urnTypes200XmlCvrfdocProductTreeBranch1.md | 22 + ...200XmlCvrfdocProductTreeFullProductName.md | 18 + ...00XmlCvrfdocProductTreeFullProductName1.md | 18 + ...rfReturnTypes200XmlCvrfdocVulnerability.md | 36 ++ ...XmlCvrfdocVulnerabilityAcknowledgements.md | 20 + ...200XmlCvrfdocVulnerabilityAffectedFiles.md | 28 ++ ...200XmlCvrfdocVulnerabilityCVSSScoreSets.md | 24 ++ ...urnTypes200XmlCvrfdocVulnerabilityNotes.md | 18 + ...ypes200XmlCvrfdocVulnerabilityNotesNote.md | 22 + ...0XmlCvrfdocVulnerabilityProductStatuses.md | 20 + ...s200XmlCvrfdocVulnerabilityRemediations.md | 32 ++ ...0XmlCvrfdocVulnerabilityRevisionHistory.md | 22 + ...rnTypes200XmlCvrfdocVulnerabilityThreat.md | 22 + ...nTypes200XmlCvrfdocVulnerabilityThreats.md | 18 + .../cvrf/ruby-client/docs/DefaultApi.md | 212 ++++++++++ .../ruby-client/docs/UpdatesReturnTypes200.md | 20 + .../docs/UpdatesReturnTypes200Value.md | 30 ++ tools/microsoft/cvrf/ruby-client/git_push.sh | 58 +++ .../cvrf/ruby-client/lib/openapi_client.rb | 86 ++++ .../lib/openapi_client/api/default_api.rb | 241 +++++++++++ .../lib/openapi_client/api_client.rb | 389 ++++++++++++++++++ .../lib/openapi_client/api_error.rb | 57 +++ .../lib/openapi_client/configuration.rb | 270 ++++++++++++ .../models/cvrf_return_types200.rb | 276 +++++++++++++ .../cvrf_return_types200_acknowledgements.rb | 231 +++++++++++ .../cvrf_return_types200_affected_files.rb | 263 ++++++++++++ .../cvrf_return_types200_cvss_score_sets.rb | 247 +++++++++++ .../cvrf_return_types200_document_notes.rb | 254 ++++++++++++ ...cvrf_return_types200_document_publisher.rb | 236 +++++++++++ .../cvrf_return_types200_document_title.rb | 218 ++++++++++ .../cvrf_return_types200_document_tracking.rb | 265 ++++++++++++ ...pes200_document_tracking_identification.rb | 227 ++++++++++ ...s200_document_tracking_revision_history.rb | 236 +++++++++++ .../models/cvrf_return_types200_notes.rb | 245 +++++++++++ .../cvrf_return_types200_product_statuses.rb | 229 +++++++++++ .../cvrf_return_types200_product_tree.rb | 231 +++++++++++ ...vrf_return_types200_product_tree_branch.rb | 220 ++++++++++ ...cvrf_return_types200_product_tree_items.rb | 227 ++++++++++ ...vrf_return_types200_product_tree_items1.rb | 238 +++++++++++ .../cvrf_return_types200_remediations.rb | 294 +++++++++++++ .../models/cvrf_return_types200_threats.rb | 247 +++++++++++ .../cvrf_return_types200_vulnerability.rb | 331 +++++++++++++++ .../models/cvrf_return_types200_xml.rb | 219 ++++++++++ .../cvrf_return_types200_xml_cvrfdoc.rb | 274 ++++++++++++ ...urn_types200_xml_cvrfdoc_document_notes.rb | 218 ++++++++++ ...types200_xml_cvrfdoc_document_publisher.rb | 236 +++++++++++ ..._types200_xml_cvrfdoc_document_tracking.rb | 263 ++++++++++++ ...vrfdoc_document_tracking_identification.rb | 227 ++++++++++ ...fdoc_document_tracking_revision_history.rb | 218 ++++++++++ ...ment_tracking_revision_history_revision.rb | 236 +++++++++++ .../cvrf_return_types200_xml_cvrfdoc_note.rb | 246 +++++++++++ ...eturn_types200_xml_cvrfdoc_product_tree.rb | 231 +++++++++++ ...ypes200_xml_cvrfdoc_product_tree_branch.rb | 238 +++++++++++ ...pes200_xml_cvrfdoc_product_tree_branch1.rb | 238 +++++++++++ ..._cvrfdoc_product_tree_full_product_name.rb | 218 ++++++++++ ...cvrfdoc_product_tree_full_product_name1.rb | 219 ++++++++++ ...turn_types200_xml_cvrfdoc_vulnerability.rb | 311 ++++++++++++++ ..._cvrfdoc_vulnerability_acknowledgements.rb | 227 ++++++++++ ...ml_cvrfdoc_vulnerability_affected_files.rb | 263 ++++++++++++ ...l_cvrfdoc_vulnerability_cvss_score_sets.rb | 245 +++++++++++ ...ypes200_xml_cvrfdoc_vulnerability_notes.rb | 218 ++++++++++ ...00_xml_cvrfdoc_vulnerability_notes_note.rb | 237 +++++++++++ ..._cvrfdoc_vulnerability_product_statuses.rb | 227 ++++++++++ ..._xml_cvrfdoc_vulnerability_remediations.rb | 285 +++++++++++++ ..._cvrfdoc_vulnerability_revision_history.rb | 236 +++++++++++ ...pes200_xml_cvrfdoc_vulnerability_threat.rb | 236 +++++++++++ ...es200_xml_cvrfdoc_vulnerability_threats.rb | 218 ++++++++++ .../models/updates_return_types200.rb | 230 +++++++++++ .../models/updates_return_types200_value.rb | 272 ++++++++++++ .../ruby-client/lib/openapi_client/version.rb | 15 + .../cvrf/ruby-client/openapi_client.gemspec | 38 ++ .../ruby-client/spec/api/default_api_spec.rb | 73 ++++ .../cvrf/ruby-client/spec/api_client_spec.rb | 226 ++++++++++ .../ruby-client/spec/configuration_spec.rb | 42 ++ ...f_return_types200_acknowledgements_spec.rb | 40 ++ ...vrf_return_types200_affected_files_spec.rb | 64 +++ ...rf_return_types200_cvss_score_sets_spec.rb | 52 +++ ...vrf_return_types200_document_notes_spec.rb | 58 +++ ...return_types200_document_publisher_spec.rb | 46 +++ ...vrf_return_types200_document_title_spec.rb | 34 ++ ...0_document_tracking_identification_spec.rb | 40 ++ ...document_tracking_revision_history_spec.rb | 46 +++ ..._return_types200_document_tracking_spec.rb | 64 +++ .../models/cvrf_return_types200_notes_spec.rb | 52 +++ ...f_return_types200_product_statuses_spec.rb | 40 ++ ...eturn_types200_product_tree_branch_spec.rb | 34 ++ ...eturn_types200_product_tree_items1_spec.rb | 46 +++ ...return_types200_product_tree_items_spec.rb | 40 ++ .../cvrf_return_types200_product_tree_spec.rb | 40 ++ .../cvrf_return_types200_remediations_spec.rb | 82 ++++ .../spec/models/cvrf_return_types200_spec.rb | 70 ++++ .../cvrf_return_types200_threats_spec.rb | 52 +++ ...cvrf_return_types200_vulnerability_spec.rb | 100 +++++ ...ypes200_xml_cvrfdoc_document_notes_spec.rb | 34 ++ ...200_xml_cvrfdoc_document_publisher_spec.rb | 46 +++ ...c_document_tracking_identification_spec.rb | 40 ++ ...tracking_revision_history_revision_spec.rb | 46 +++ ...document_tracking_revision_history_spec.rb | 34 ++ ...s200_xml_cvrfdoc_document_tracking_spec.rb | 64 +++ ...f_return_types200_xml_cvrfdoc_note_spec.rb | 52 +++ ...0_xml_cvrfdoc_product_tree_branch1_spec.rb | 46 +++ ...00_xml_cvrfdoc_product_tree_branch_spec.rb | 46 +++ ...oc_product_tree_full_product_name1_spec.rb | 34 ++ ...doc_product_tree_full_product_name_spec.rb | 34 ++ ..._types200_xml_cvrfdoc_product_tree_spec.rb | 40 ++ .../cvrf_return_types200_xml_cvrfdoc_spec.rb | 70 ++++ ...doc_vulnerability_acknowledgements_spec.rb | 40 ++ ...rfdoc_vulnerability_affected_files_spec.rb | 64 +++ ...fdoc_vulnerability_cvss_score_sets_spec.rb | 52 +++ ...l_cvrfdoc_vulnerability_notes_note_spec.rb | 46 +++ ...00_xml_cvrfdoc_vulnerability_notes_spec.rb | 34 ++ ...doc_vulnerability_product_statuses_spec.rb | 40 ++ ...cvrfdoc_vulnerability_remediations_spec.rb | 76 ++++ ...doc_vulnerability_revision_history_spec.rb | 46 +++ ...types200_xml_cvrfdoc_vulnerability_spec.rb | 88 ++++ ...0_xml_cvrfdoc_vulnerability_threat_spec.rb | 46 +++ ..._xml_cvrfdoc_vulnerability_threats_spec.rb | 34 ++ .../models/cvrf_return_types200_xml_spec.rb | 34 ++ .../models/updates_return_types200_spec.rb | 40 ++ .../updates_return_types200_value_spec.rb | 70 ++++ .../cvrf/ruby-client/spec/spec_helper.rb | 111 +++++ 166 files changed, 17008 insertions(+), 1 deletion(-) create mode 100644 tools/microsoft/app_build_number_cpe_mapper/exchange.rb rename tools/microsoft/{ => cvrf}/generate_cvrf_api_ruby.sh (100%) rename tools/microsoft/{ => cvrf}/microsoft_cvrf_client.rb (100%) rename tools/microsoft/{ => cvrf}/openapi_client_msft_cvrf_api.zip (100%) create mode 100644 tools/microsoft/cvrf/ruby-client/.gitignore create mode 100644 tools/microsoft/cvrf/ruby-client/.openapi-generator-ignore create mode 100644 tools/microsoft/cvrf/ruby-client/.openapi-generator/FILES create mode 100644 tools/microsoft/cvrf/ruby-client/.openapi-generator/VERSION create mode 100644 tools/microsoft/cvrf/ruby-client/.rspec create mode 100644 tools/microsoft/cvrf/ruby-client/.rubocop.yml create mode 100644 tools/microsoft/cvrf/ruby-client/.travis.yml create mode 100644 tools/microsoft/cvrf/ruby-client/Gemfile create mode 100644 tools/microsoft/cvrf/ruby-client/README.md create mode 100644 tools/microsoft/cvrf/ruby-client/Rakefile create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Acknowledgements.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200AffectedFiles.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200CVSSScoreSets.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentNotes.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentPublisher.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTitle.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTracking.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingIdentification.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingRevisionHistory.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Notes.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductStatuses.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTree.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeBranch.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems1.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Remediations.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Threats.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Vulnerability.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Xml.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdoc.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentNotes.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTracking.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocNote.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTree.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerability.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/DefaultApi.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200.md create mode 100644 tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200Value.md create mode 100644 tools/microsoft/cvrf/ruby-client/git_push.sh create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/api/default_api.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_client.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_error.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/configuration.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_acknowledgements.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_affected_files.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_cvss_score_sets.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_notes.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_publisher.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_title.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_identification.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_revision_history.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_notes.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_statuses.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_branch.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items1.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_remediations.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_threats.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_vulnerability.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_notes.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_publisher.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_note.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200_value.rb create mode 100644 tools/microsoft/cvrf/ruby-client/lib/openapi_client/version.rb create mode 100644 tools/microsoft/cvrf/ruby-client/openapi_client.gemspec create mode 100644 tools/microsoft/cvrf/ruby-client/spec/api/default_api_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/api_client_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/configuration_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_acknowledgements_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_affected_files_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_cvss_score_sets_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_notes_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_publisher_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_title_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_identification_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_revision_history_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_notes_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_statuses_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_branch_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items1_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_remediations_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_threats_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_vulnerability_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_notes_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_publisher_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_note_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_value_spec.rb create mode 100644 tools/microsoft/cvrf/ruby-client/spec/spec_helper.rb diff --git a/tools/microsoft/app_build_number_cpe_mapper/exchange.rb b/tools/microsoft/app_build_number_cpe_mapper/exchange.rb new file mode 100644 index 0000000..b49adb4 --- /dev/null +++ b/tools/microsoft/app_build_number_cpe_mapper/exchange.rb @@ -0,0 +1,81 @@ +#!/usr/bin/env ruby +# this will scrape the following: +# https://learn.microsoft.com/en-us/exchange/new-features/build-numbers-and-release-dates + +require 'nokogiri' +require 'json' +require 'rest-client' + + +class MicrosoftExchangeReleaseInfo + attr_accessor :url + + def initialize + @url = 'https://learn.microsoft.com/en-us/exchange/new-features/build-numbers-and-release-dates' + end + + + def get + r = RestClient::Request.execute( + :method => :get, + :url => url + ) + if r.code == 200 + r.body + else + puts "HTTP Code: #{r.code}" + end + end + + def parse_html(html) + Nokogiri::HTML(html) + end + + def headings(html_doc) + html_doc.xpath("//table").first.xpath('./thead/tr').text.split("\n").drop(1) + end + + def table_nodes(html_doc) + html_doc.xpath("//table") + end + + def table_records(table_node) + table_node.xpath("./tbody/tr") + end + + def data_from_table(tr) + tds = tr.xpath("./td") + + # NO BREAK SPACE removal with the gsub \u00A0. thx msft + # only happens if there is a URL linking to the kb for a product_name + product_name_text = tds[0].xpath("./a").children.text.gsub("\u00A0", "") + if product_name_text.empty? + product_name_text = tds[0].text + end + + kb_url = tds[0]&.xpath("./a/@href").text + release_date = tds[1]&.text + build_num_short = tds[2]&.text + build_num_long = tds[3]&.text + + { + :product_name => product_name_text, + :kb_url => kb_url, + :release_date => release_date, + :build_num_short => build_num_short, + :build_num_long => build_num_long + } + end + + def main + html = get + doc = parse_html(html) + tables = table_nodes(doc) + tables.map do |table_node| + trs = table_records(table_node) + trs.map do |tr| + data_from_table(tr) + end + end + end +end diff --git a/tools/microsoft/bin/get_exploited_vulns_msft_bulletin.rb b/tools/microsoft/bin/get_exploited_vulns_msft_bulletin.rb index 8e7eaef..2b89b89 100755 --- a/tools/microsoft/bin/get_exploited_vulns_msft_bulletin.rb +++ b/tools/microsoft/bin/get_exploited_vulns_msft_bulletin.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require '../microsoft_cvrf_client.rb' +require '../cvrf/microsoft_cvrf_client.rb' require 'optparse' require 'json' diff --git a/tools/microsoft/generate_cvrf_api_ruby.sh b/tools/microsoft/cvrf/generate_cvrf_api_ruby.sh similarity index 100% rename from tools/microsoft/generate_cvrf_api_ruby.sh rename to tools/microsoft/cvrf/generate_cvrf_api_ruby.sh diff --git a/tools/microsoft/microsoft_cvrf_client.rb b/tools/microsoft/cvrf/microsoft_cvrf_client.rb similarity index 100% rename from tools/microsoft/microsoft_cvrf_client.rb rename to tools/microsoft/cvrf/microsoft_cvrf_client.rb diff --git a/tools/microsoft/openapi_client_msft_cvrf_api.zip b/tools/microsoft/cvrf/openapi_client_msft_cvrf_api.zip similarity index 100% rename from tools/microsoft/openapi_client_msft_cvrf_api.zip rename to tools/microsoft/cvrf/openapi_client_msft_cvrf_api.zip diff --git a/tools/microsoft/cvrf/ruby-client/.gitignore b/tools/microsoft/cvrf/ruby-client/.gitignore new file mode 100644 index 0000000..05a17cb --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.gitignore @@ -0,0 +1,39 @@ +# Generated by: https://openapi-generator.tech +# + +*.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/tools/microsoft/cvrf/ruby-client/.openapi-generator-ignore b/tools/microsoft/cvrf/ruby-client/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/tools/microsoft/cvrf/ruby-client/.openapi-generator/FILES b/tools/microsoft/cvrf/ruby-client/.openapi-generator/FILES new file mode 100644 index 0000000..0012db8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.openapi-generator/FILES @@ -0,0 +1,159 @@ +.gitignore +.openapi-generator-ignore +.rspec +.rubocop.yml +.travis.yml +Gemfile +README.md +Rakefile +docs/CvrfReturnTypes200.md +docs/CvrfReturnTypes200Acknowledgements.md +docs/CvrfReturnTypes200AffectedFiles.md +docs/CvrfReturnTypes200CVSSScoreSets.md +docs/CvrfReturnTypes200DocumentNotes.md +docs/CvrfReturnTypes200DocumentPublisher.md +docs/CvrfReturnTypes200DocumentTitle.md +docs/CvrfReturnTypes200DocumentTracking.md +docs/CvrfReturnTypes200DocumentTrackingIdentification.md +docs/CvrfReturnTypes200DocumentTrackingRevisionHistory.md +docs/CvrfReturnTypes200Notes.md +docs/CvrfReturnTypes200ProductStatuses.md +docs/CvrfReturnTypes200ProductTree.md +docs/CvrfReturnTypes200ProductTreeBranch.md +docs/CvrfReturnTypes200ProductTreeItems.md +docs/CvrfReturnTypes200ProductTreeItems1.md +docs/CvrfReturnTypes200Remediations.md +docs/CvrfReturnTypes200Threats.md +docs/CvrfReturnTypes200Vulnerability.md +docs/CvrfReturnTypes200Xml.md +docs/CvrfReturnTypes200XmlCvrfdoc.md +docs/CvrfReturnTypes200XmlCvrfdocDocumentNotes.md +docs/CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md +docs/CvrfReturnTypes200XmlCvrfdocDocumentTracking.md +docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md +docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md +docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md +docs/CvrfReturnTypes200XmlCvrfdocNote.md +docs/CvrfReturnTypes200XmlCvrfdocProductTree.md +docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md +docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md +docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md +docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerability.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md +docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md +docs/DefaultApi.md +docs/UpdatesReturnTypes200.md +docs/UpdatesReturnTypes200Value.md +git_push.sh +lib/openapi_client.rb +lib/openapi_client/api/default_api.rb +lib/openapi_client/api_client.rb +lib/openapi_client/api_error.rb +lib/openapi_client/configuration.rb +lib/openapi_client/models/cvrf_return_types200.rb +lib/openapi_client/models/cvrf_return_types200_acknowledgements.rb +lib/openapi_client/models/cvrf_return_types200_affected_files.rb +lib/openapi_client/models/cvrf_return_types200_cvss_score_sets.rb +lib/openapi_client/models/cvrf_return_types200_document_notes.rb +lib/openapi_client/models/cvrf_return_types200_document_publisher.rb +lib/openapi_client/models/cvrf_return_types200_document_title.rb +lib/openapi_client/models/cvrf_return_types200_document_tracking.rb +lib/openapi_client/models/cvrf_return_types200_document_tracking_identification.rb +lib/openapi_client/models/cvrf_return_types200_document_tracking_revision_history.rb +lib/openapi_client/models/cvrf_return_types200_notes.rb +lib/openapi_client/models/cvrf_return_types200_product_statuses.rb +lib/openapi_client/models/cvrf_return_types200_product_tree.rb +lib/openapi_client/models/cvrf_return_types200_product_tree_branch.rb +lib/openapi_client/models/cvrf_return_types200_product_tree_items.rb +lib/openapi_client/models/cvrf_return_types200_product_tree_items1.rb +lib/openapi_client/models/cvrf_return_types200_remediations.rb +lib/openapi_client/models/cvrf_return_types200_threats.rb +lib/openapi_client/models/cvrf_return_types200_vulnerability.rb +lib/openapi_client/models/cvrf_return_types200_xml.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_notes.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_publisher.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_note.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat.rb +lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats.rb +lib/openapi_client/models/updates_return_types200.rb +lib/openapi_client/models/updates_return_types200_value.rb +lib/openapi_client/version.rb +openapi_client.gemspec +spec/api/default_api_spec.rb +spec/api_client_spec.rb +spec/configuration_spec.rb +spec/models/cvrf_return_types200_acknowledgements_spec.rb +spec/models/cvrf_return_types200_affected_files_spec.rb +spec/models/cvrf_return_types200_cvss_score_sets_spec.rb +spec/models/cvrf_return_types200_document_notes_spec.rb +spec/models/cvrf_return_types200_document_publisher_spec.rb +spec/models/cvrf_return_types200_document_title_spec.rb +spec/models/cvrf_return_types200_document_tracking_identification_spec.rb +spec/models/cvrf_return_types200_document_tracking_revision_history_spec.rb +spec/models/cvrf_return_types200_document_tracking_spec.rb +spec/models/cvrf_return_types200_notes_spec.rb +spec/models/cvrf_return_types200_product_statuses_spec.rb +spec/models/cvrf_return_types200_product_tree_branch_spec.rb +spec/models/cvrf_return_types200_product_tree_items1_spec.rb +spec/models/cvrf_return_types200_product_tree_items_spec.rb +spec/models/cvrf_return_types200_product_tree_spec.rb +spec/models/cvrf_return_types200_remediations_spec.rb +spec/models/cvrf_return_types200_spec.rb +spec/models/cvrf_return_types200_threats_spec.rb +spec/models/cvrf_return_types200_vulnerability_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_document_notes_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_document_publisher_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_note_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat_spec.rb +spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats_spec.rb +spec/models/cvrf_return_types200_xml_spec.rb +spec/models/updates_return_types200_spec.rb +spec/models/updates_return_types200_value_spec.rb +spec/spec_helper.rb diff --git a/tools/microsoft/cvrf/ruby-client/.openapi-generator/VERSION b/tools/microsoft/cvrf/ruby-client/.openapi-generator/VERSION new file mode 100644 index 0000000..6555596 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.0-SNAPSHOT \ No newline at end of file diff --git a/tools/microsoft/cvrf/ruby-client/.rspec b/tools/microsoft/cvrf/ruby-client/.rspec new file mode 100644 index 0000000..83e16f8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/tools/microsoft/cvrf/ruby-client/.rubocop.yml b/tools/microsoft/cvrf/ruby-client/.rubocop.yml new file mode 100644 index 0000000..d32b2b1 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.rubocop.yml @@ -0,0 +1,148 @@ +# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) +# Automatically generated by OpenAPI Generator (https://openapi-generator.tech) +AllCops: + TargetRubyVersion: 2.4 + # 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 + +# 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/FirstArgumentIndentation: + 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: indented_internal_methods + +# 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/IndentationStyle: + Enabled: true + +# Blank lines should not have any spaces. +Layout/TrailingEmptyLines: + Enabled: true + +# No trailing whitespace. +Layout/TrailingWhitespace: + Enabled: false + +# Use quotes for string literals when they are enough. +Style/RedundantPercentQ: + Enabled: true + +# Align `end` with the matching keyword or starting expression except for +# assignments, where it should be aligned with the LHS. +Layout/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/tools/microsoft/cvrf/ruby-client/.travis.yml b/tools/microsoft/cvrf/ruby-client/.travis.yml new file mode 100644 index 0000000..219f99f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/.travis.yml @@ -0,0 +1,11 @@ +language: ruby +cache: bundler +rvm: + - 2.3 + - 2.4 + - 2.5 +script: + - bundle install --path vendor/bundle + - bundle exec rspec + - gem build openapi_client.gemspec + - gem install ./openapi_client-1.0.0.gem diff --git a/tools/microsoft/cvrf/ruby-client/Gemfile b/tools/microsoft/cvrf/ruby-client/Gemfile new file mode 100644 index 0000000..c2e3127 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/Gemfile @@ -0,0 +1,9 @@ +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/tools/microsoft/cvrf/ruby-client/README.md b/tools/microsoft/cvrf/ruby-client/README.md new file mode 100644 index 0000000..0829176 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/README.md @@ -0,0 +1,137 @@ +# openapi_client + +OpenapiClient - the Ruby gem for the Microsoft Security Updates API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.RubyClientCodegen + +## Installation + +### Build a gem + +To build the Ruby code into a gem: + +```shell +gem build openapi_client.gemspec +``` + +Then either install the gem locally: + +```shell +gem install ./openapi_client-1.0.0.gem +``` + +(for development, run `gem install --dev ./openapi_client-1.0.0.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 'openapi_client', '~> 1.0.0' + +### Install from Git + +If the Ruby gem is hosted at a git repository: https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile: + + gem 'openapi_client', :git => 'https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO.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 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +api_version = 'api_version_example' # String | +api_key = 'api_key_example' # String | +id = 'id_example' # String | + +begin + result = api_instance.cvrf_id_get(api_version, api_key, id) + p result +rescue OpenapiClient::ApiError => e + puts "Exception when calling DefaultApi->cvrf_id_get: #{e}" +end + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.msrc.microsoft.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*OpenapiClient::DefaultApi* | [**cvrf_id_get**](docs/DefaultApi.md#cvrf_id_get) | **GET** /cvrf/{id} | +*OpenapiClient::DefaultApi* | [**updates_get**](docs/DefaultApi.md#updates_get) | **GET** /Updates | +*OpenapiClient::DefaultApi* | [**updates_id_get**](docs/DefaultApi.md#updates_id_get) | **GET** /Updates('{id}') | + + +## Documentation for Models + + - [OpenapiClient::CvrfReturnTypes200](docs/CvrfReturnTypes200.md) + - [OpenapiClient::CvrfReturnTypes200Acknowledgements](docs/CvrfReturnTypes200Acknowledgements.md) + - [OpenapiClient::CvrfReturnTypes200AffectedFiles](docs/CvrfReturnTypes200AffectedFiles.md) + - [OpenapiClient::CvrfReturnTypes200CVSSScoreSets](docs/CvrfReturnTypes200CVSSScoreSets.md) + - [OpenapiClient::CvrfReturnTypes200DocumentNotes](docs/CvrfReturnTypes200DocumentNotes.md) + - [OpenapiClient::CvrfReturnTypes200DocumentPublisher](docs/CvrfReturnTypes200DocumentPublisher.md) + - [OpenapiClient::CvrfReturnTypes200DocumentTitle](docs/CvrfReturnTypes200DocumentTitle.md) + - [OpenapiClient::CvrfReturnTypes200DocumentTracking](docs/CvrfReturnTypes200DocumentTracking.md) + - [OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification](docs/CvrfReturnTypes200DocumentTrackingIdentification.md) + - [OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory](docs/CvrfReturnTypes200DocumentTrackingRevisionHistory.md) + - [OpenapiClient::CvrfReturnTypes200Notes](docs/CvrfReturnTypes200Notes.md) + - [OpenapiClient::CvrfReturnTypes200ProductStatuses](docs/CvrfReturnTypes200ProductStatuses.md) + - [OpenapiClient::CvrfReturnTypes200ProductTree](docs/CvrfReturnTypes200ProductTree.md) + - [OpenapiClient::CvrfReturnTypes200ProductTreeBranch](docs/CvrfReturnTypes200ProductTreeBranch.md) + - [OpenapiClient::CvrfReturnTypes200ProductTreeItems](docs/CvrfReturnTypes200ProductTreeItems.md) + - [OpenapiClient::CvrfReturnTypes200ProductTreeItems1](docs/CvrfReturnTypes200ProductTreeItems1.md) + - [OpenapiClient::CvrfReturnTypes200Remediations](docs/CvrfReturnTypes200Remediations.md) + - [OpenapiClient::CvrfReturnTypes200Threats](docs/CvrfReturnTypes200Threats.md) + - [OpenapiClient::CvrfReturnTypes200Vulnerability](docs/CvrfReturnTypes200Vulnerability.md) + - [OpenapiClient::CvrfReturnTypes200Xml](docs/CvrfReturnTypes200Xml.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdoc](docs/CvrfReturnTypes200XmlCvrfdoc.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes](docs/CvrfReturnTypes200XmlCvrfdocDocumentNotes.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher](docs/CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking](docs/CvrfReturnTypes200XmlCvrfdocDocumentTracking.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification](docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory](docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision](docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote](docs/CvrfReturnTypes200XmlCvrfdocNote.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree](docs/CvrfReturnTypes200XmlCvrfdocProductTree.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch](docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1](docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName](docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1](docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability](docs/CvrfReturnTypes200XmlCvrfdocVulnerability.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md) + - [OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats](docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md) + - [OpenapiClient::UpdatesReturnTypes200](docs/UpdatesReturnTypes200.md) + - [OpenapiClient::UpdatesReturnTypes200Value](docs/UpdatesReturnTypes200Value.md) + + +## Documentation for Authorization + + All endpoints do not require authorization. + diff --git a/tools/microsoft/cvrf/ruby-client/Rakefile b/tools/microsoft/cvrf/ruby-client/Rakefile new file mode 100644 index 0000000..c72ca30 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/Rakefile @@ -0,0 +1,10 @@ +require "bundler/gem_tasks" + +begin + require 'rspec/core/rake_task' + + RSpec::Core::RakeTask.new(:spec) + task default: :spec +rescue LoadError + # no rspec available +end diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200.md new file mode 100644 index 0000000..42a4d2d --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200.md @@ -0,0 +1,30 @@ +# OpenapiClient::CvrfReturnTypes200 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **document_title** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **document_type** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **document_publisher** | [**CvrfReturnTypes200DocumentPublisher**](CvrfReturnTypes200DocumentPublisher.md) | | [optional] | +| **document_tracking** | [**CvrfReturnTypes200DocumentTracking**](CvrfReturnTypes200DocumentTracking.md) | | [optional] | +| **document_notes** | [**Array<CvrfReturnTypes200DocumentNotes>**](CvrfReturnTypes200DocumentNotes.md) | | [optional] | +| **product_tree** | [**CvrfReturnTypes200ProductTree**](CvrfReturnTypes200ProductTree.md) | | [optional] | +| **vulnerability** | [**Array<CvrfReturnTypes200Vulnerability>**](CvrfReturnTypes200Vulnerability.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200.new( + document_title: null, + document_type: null, + document_publisher: null, + document_tracking: null, + document_notes: null, + product_tree: null, + vulnerability: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Acknowledgements.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Acknowledgements.md new file mode 100644 index 0000000..736cf8e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Acknowledgements.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200Acknowledgements + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | [**Array<CvrfReturnTypes200DocumentTitle>**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **url** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200Acknowledgements.new( + name: null, + url: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200AffectedFiles.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200AffectedFiles.md new file mode 100644 index 0000000..72f1ca6 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200AffectedFiles.md @@ -0,0 +1,28 @@ +# OpenapiClient::CvrfReturnTypes200AffectedFiles + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | [optional] | +| **file_name** | **String** | | [optional] | +| **file_version** | **String** | | [optional] | +| **file_path** | **String** | | [optional] | +| **file_last_modified** | **Time** | | [optional] | +| **file_architecture** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200AffectedFiles.new( + product_id: null, + file_name: null, + file_version: null, + file_path: null, + file_last_modified: null, + file_architecture: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200CVSSScoreSets.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200CVSSScoreSets.md new file mode 100644 index 0000000..2a04e95 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200CVSSScoreSets.md @@ -0,0 +1,24 @@ +# OpenapiClient::CvrfReturnTypes200CVSSScoreSets + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **base_score** | **Float** | | [optional] | +| **temporal_score** | **Float** | | [optional] | +| **vector** | **String** | | [optional] | +| **product_id** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200CVSSScoreSets.new( + base_score: null, + temporal_score: null, + vector: null, + product_id: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentNotes.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentNotes.md new file mode 100644 index 0000000..d28ff74 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentNotes.md @@ -0,0 +1,26 @@ +# OpenapiClient::CvrfReturnTypes200DocumentNotes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | | [optional] | +| **audience** | **String** | | [optional] | +| **type** | **Integer** | | [optional] | +| **ordinal** | **String** | | [optional] | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200DocumentNotes.new( + title: null, + audience: null, + type: null, + ordinal: null, + value: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentPublisher.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentPublisher.md new file mode 100644 index 0000000..d521705 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentPublisher.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200DocumentPublisher + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **contact_details** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **issuing_athority** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **type** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200DocumentPublisher.new( + contact_details: null, + issuing_athority: null, + type: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTitle.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTitle.md new file mode 100644 index 0000000..0cea28c --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTitle.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200DocumentTitle + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200DocumentTitle.new( + value: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTracking.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTracking.md new file mode 100644 index 0000000..ad880ed --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTracking.md @@ -0,0 +1,28 @@ +# OpenapiClient::CvrfReturnTypes200DocumentTracking + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identification** | [**CvrfReturnTypes200DocumentTrackingIdentification**](CvrfReturnTypes200DocumentTrackingIdentification.md) | | [optional] | +| **status** | **Integer** | | [optional] | +| **version** | **String** | | [optional] | +| **revision_history** | [**Array<CvrfReturnTypes200DocumentTrackingRevisionHistory>**](CvrfReturnTypes200DocumentTrackingRevisionHistory.md) | | [optional] | +| **initial_release_date** | **Time** | | [optional] | +| **current_release_date** | **Time** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200DocumentTracking.new( + identification: null, + status: null, + version: null, + revision_history: null, + initial_release_date: null, + current_release_date: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingIdentification.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingIdentification.md new file mode 100644 index 0000000..43b43a7 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingIdentification.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **_alias** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification.new( + id: null, + _alias: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingRevisionHistory.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingRevisionHistory.md new file mode 100644 index 0000000..d3b2c2f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200DocumentTrackingRevisionHistory.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **number** | **String** | | [optional] | +| **date** | **Time** | | [optional] | +| **description** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory.new( + number: null, + date: null, + description: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Notes.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Notes.md new file mode 100644 index 0000000..c0f542e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Notes.md @@ -0,0 +1,24 @@ +# OpenapiClient::CvrfReturnTypes200Notes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | | [optional] | +| **type** | **Integer** | | [optional] | +| **ordinal** | **String** | | [optional] | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200Notes.new( + title: null, + type: null, + ordinal: null, + value: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductStatuses.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductStatuses.md new file mode 100644 index 0000000..beb0c00 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductStatuses.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200ProductStatuses + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **Array<String>** | | [optional] | +| **type** | **Integer** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200ProductStatuses.new( + product_id: null, + type: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTree.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTree.md new file mode 100644 index 0000000..e50a1de --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTree.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200ProductTree + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **branch** | [**Array<CvrfReturnTypes200ProductTreeBranch>**](CvrfReturnTypes200ProductTreeBranch.md) | | [optional] | +| **full_product_name** | [**Array<CvrfReturnTypes200ProductTreeItems>**](CvrfReturnTypes200ProductTreeItems.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200ProductTree.new( + branch: null, + full_product_name: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeBranch.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeBranch.md new file mode 100644 index 0000000..77dd606 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeBranch.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200ProductTreeBranch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **items** | [**Array<CvrfReturnTypes200ProductTreeItems1>**](CvrfReturnTypes200ProductTreeItems1.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200ProductTreeBranch.new( + items: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems.md new file mode 100644 index 0000000..911220b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200ProductTreeItems + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | [optional] | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200ProductTreeItems.new( + product_id: null, + value: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems1.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems1.md new file mode 100644 index 0000000..2464d6d --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200ProductTreeItems1.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200ProductTreeItems1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **items** | [**Array<CvrfReturnTypes200ProductTreeItems>**](CvrfReturnTypes200ProductTreeItems.md) | | [optional] | +| **type** | **Integer** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200ProductTreeItems1.new( + items: null, + type: null, + name: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Remediations.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Remediations.md new file mode 100644 index 0000000..112275a --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Remediations.md @@ -0,0 +1,34 @@ +# OpenapiClient::CvrfReturnTypes200Remediations + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **url** | **String** | | [optional] | +| **supersedence** | **String** | | [optional] | +| **product_id** | **Array<String>** | | [optional] | +| **type** | **Integer** | | [optional] | +| **date_specified** | **Boolean** | | [optional] | +| **affected_files** | [**Array<CvrfReturnTypes200AffectedFiles>**](CvrfReturnTypes200AffectedFiles.md) | | [optional] | +| **sub_type** | **String** | | [optional] | +| **restart_required** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200Remediations.new( + description: null, + url: null, + supersedence: null, + product_id: null, + type: null, + date_specified: null, + affected_files: null, + sub_type: null, + restart_required: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Threats.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Threats.md new file mode 100644 index 0000000..d7f93a5 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Threats.md @@ -0,0 +1,24 @@ +# OpenapiClient::CvrfReturnTypes200Threats + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **product_id** | **Array<String>** | | [optional] | +| **type** | **Integer** | | [optional] | +| **date_specified** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200Threats.new( + description: null, + product_id: null, + type: null, + date_specified: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Vulnerability.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Vulnerability.md new file mode 100644 index 0000000..74e2c20 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Vulnerability.md @@ -0,0 +1,40 @@ +# OpenapiClient::CvrfReturnTypes200Vulnerability + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | [**CvrfReturnTypes200DocumentTitle**](CvrfReturnTypes200DocumentTitle.md) | | [optional] | +| **notes** | [**Array<CvrfReturnTypes200Notes>**](CvrfReturnTypes200Notes.md) | | [optional] | +| **discovery_date_specified** | **Boolean** | | [optional] | +| **release_date_specified** | **Boolean** | | [optional] | +| **cve** | **String** | | [optional] | +| **product_statuses** | [**Array<CvrfReturnTypes200ProductStatuses>**](CvrfReturnTypes200ProductStatuses.md) | | [optional] | +| **threats** | [**Array<CvrfReturnTypes200Threats>**](CvrfReturnTypes200Threats.md) | | [optional] | +| **cvss_score_sets** | [**Array<CvrfReturnTypes200CVSSScoreSets>**](CvrfReturnTypes200CVSSScoreSets.md) | | [optional] | +| **remediations** | [**Array<CvrfReturnTypes200Remediations>**](CvrfReturnTypes200Remediations.md) | | [optional] | +| **acknowledgements** | [**Array<CvrfReturnTypes200Acknowledgements>**](CvrfReturnTypes200Acknowledgements.md) | | [optional] | +| **ordinal** | **String** | | [optional] | +| **revision_history** | [**Array<CvrfReturnTypes200DocumentTrackingRevisionHistory>**](CvrfReturnTypes200DocumentTrackingRevisionHistory.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200Vulnerability.new( + title: null, + notes: null, + discovery_date_specified: null, + release_date_specified: null, + cve: null, + product_statuses: null, + threats: null, + cvss_score_sets: null, + remediations: null, + acknowledgements: null, + ordinal: null, + revision_history: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Xml.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Xml.md new file mode 100644 index 0000000..1a21918 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200Xml.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200Xml + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cvrfdoc** | [**CvrfReturnTypes200XmlCvrfdoc**](CvrfReturnTypes200XmlCvrfdoc.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200Xml.new( + cvrfdoc: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdoc.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdoc.md new file mode 100644 index 0000000..e8df12b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdoc.md @@ -0,0 +1,30 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdoc + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **document_title** | **String** | | [optional] | +| **document_type** | **String** | | [optional] | +| **document_publisher** | [**CvrfReturnTypes200XmlCvrfdocDocumentPublisher**](CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md) | | [optional] | +| **document_tracking** | [**CvrfReturnTypes200XmlCvrfdocDocumentTracking**](CvrfReturnTypes200XmlCvrfdocDocumentTracking.md) | | [optional] | +| **document_notes** | [**Array<CvrfReturnTypes200XmlCvrfdocDocumentNotes>**](CvrfReturnTypes200XmlCvrfdocDocumentNotes.md) | | [optional] | +| **product_tree** | [**CvrfReturnTypes200XmlCvrfdocProductTree**](CvrfReturnTypes200XmlCvrfdocProductTree.md) | | [optional] | +| **vulnerability** | [**CvrfReturnTypes200XmlCvrfdocVulnerability**](CvrfReturnTypes200XmlCvrfdocVulnerability.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdoc.new( + document_title: null, + document_type: null, + document_publisher: null, + document_tracking: null, + document_notes: null, + product_tree: null, + vulnerability: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentNotes.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentNotes.md new file mode 100644 index 0000000..295d581 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentNotes.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **note** | [**CvrfReturnTypes200XmlCvrfdocNote**](CvrfReturnTypes200XmlCvrfdocNote.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes.new( + note: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md new file mode 100644 index 0000000..462ac15 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentPublisher.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **contact_details** | **String** | | [optional] | +| **issuing_authority** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher.new( + type: null, + contact_details: null, + issuing_authority: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTracking.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTracking.md new file mode 100644 index 0000000..c1524c8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTracking.md @@ -0,0 +1,28 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identification** | [**CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification**](CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md) | | [optional] | +| **status** | **String** | | [optional] | +| **version** | **Float** | | [optional] | +| **revision_history** | [**CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory**](CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md) | | [optional] | +| **initial_release_date** | **Time** | | [optional] | +| **current_release_date** | **Time** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking.new( + identification: null, + status: null, + version: null, + revision_history: null, + initial_release_date: null, + current_release_date: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md new file mode 100644 index 0000000..b91be24 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **_alias** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.new( + id: null, + _alias: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md new file mode 100644 index 0000000..c1f8f0f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **revision** | [**CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision**](CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.new( + revision: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md new file mode 100644 index 0000000..e9bf88d --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **number** | **Integer** | | [optional] | +| **date** | **Time** | | [optional] | +| **description** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.new( + number: null, + date: null, + description: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocNote.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocNote.md new file mode 100644 index 0000000..66326b4 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocNote.md @@ -0,0 +1,24 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | | [optional] | +| **audience** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **ordinal** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote.new( + title: null, + audience: null, + type: null, + ordinal: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTree.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTree.md new file mode 100644 index 0000000..7713780 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTree.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **branch** | [**Array<CvrfReturnTypes200XmlCvrfdocProductTreeBranch1>**](CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md) | | [optional] | +| **full_product_name** | [**Array<CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1>**](CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree.new( + branch: null, + full_product_name: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md new file mode 100644 index 0000000..4536253 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **full_product_name** | [**Array<CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName>**](CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch.new( + type: null, + name: null, + full_product_name: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md new file mode 100644 index 0000000..3b12478 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **branch** | [**Array<CvrfReturnTypes200XmlCvrfdocProductTreeBranch>**](CvrfReturnTypes200XmlCvrfdocProductTreeBranch.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.new( + type: null, + name: null, + branch: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md new file mode 100644 index 0000000..f538a0c --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.new( + product_id: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md new file mode 100644 index 0000000..c755f9a --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.new( + product_id: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerability.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerability.md new file mode 100644 index 0000000..8032b0f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerability.md @@ -0,0 +1,36 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ordinal** | **String** | | [optional] | +| **title** | **String** | | [optional] | +| **notes** | [**CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes**](CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md) | | [optional] | +| **cve** | **String** | | [optional] | +| **product_statuses** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md) | | [optional] | +| **threats** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md) | | [optional] | +| **cvss_score_sets** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md) | | [optional] | +| **remediations** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md) | | [optional] | +| **acknowledgements** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md) | | [optional] | +| **revision_history** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability.new( + ordinal: null, + title: null, + notes: null, + cve: null, + product_statuses: null, + threats: null, + cvss_score_sets: null, + remediations: null, + acknowledgements: null, + revision_history: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md new file mode 100644 index 0000000..f2ed9bd --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **url** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.new( + name: null, + url: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md new file mode 100644 index 0000000..65e5b48 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md @@ -0,0 +1,28 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **product_id** | **String** | | [optional] | +| **file_name** | **String** | | [optional] | +| **file_version** | **String** | | [optional] | +| **file_path** | **String** | | [optional] | +| **file_last_modified** | **Time** | | [optional] | +| **file_architecture** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.new( + product_id: null, + file_name: null, + file_version: null, + file_path: null, + file_last_modified: null, + file_architecture: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md new file mode 100644 index 0000000..d19ac0e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.md @@ -0,0 +1,24 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **base_score** | **Float** | | [optional] | +| **temporal_score** | **Float** | | [optional] | +| **vector** | **String** | | [optional] | +| **product_id** | **Float** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.new( + base_score: null, + temporal_score: null, + vector: null, + product_id: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md new file mode 100644 index 0000000..613d13b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **note** | [**CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote**](CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.new( + note: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md new file mode 100644 index 0000000..d4a22af --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **ordianl** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.new( + title: null, + type: null, + ordianl: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md new file mode 100644 index 0000000..72a5323 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.md @@ -0,0 +1,20 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **product_id** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.new( + type: null, + product_id: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md new file mode 100644 index 0000000..15ad679 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.md @@ -0,0 +1,32 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **description** | **Integer** | | [optional] | +| **url** | **String** | | [optional] | +| **supersedence** | **String** | | [optional] | +| **product_id** | **Array<String>** | | [optional] | +| **affected_files** | [**Array<CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles>**](CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.md) | | [optional] | +| **restart_required** | **String** | | [optional] | +| **sub_type** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.new( + type: null, + description: null, + url: null, + supersedence: null, + product_id: null, + affected_files: null, + restart_required: null, + sub_type: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md new file mode 100644 index 0000000..a76a7b8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **number** | **Float** | | [optional] | +| **date** | **Time** | | [optional] | +| **description** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.new( + number: null, + date: null, + description: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md new file mode 100644 index 0000000..68d3822 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md @@ -0,0 +1,22 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **product_id** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.new( + type: null, + description: null, + product_id: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md new file mode 100644 index 0000000..47ffecb --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.md @@ -0,0 +1,18 @@ +# OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **threat** | [**CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat**](CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.md) | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.new( + threat: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/DefaultApi.md b/tools/microsoft/cvrf/ruby-client/docs/DefaultApi.md new file mode 100644 index 0000000..41303e7 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/DefaultApi.md @@ -0,0 +1,212 @@ +# OpenapiClient::DefaultApi + +All URIs are relative to *https://api.msrc.microsoft.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**cvrf_id_get**](DefaultApi.md#cvrf_id_get) | **GET** /cvrf/{id} | | +| [**updates_get**](DefaultApi.md#updates_get) | **GET** /Updates | | +| [**updates_id_get**](DefaultApi.md#updates_id_get) | **GET** /Updates('{id}') | | + + +## cvrf_id_get + +> cvrf_id_get(api_version, api_key, id) + + + +Gets a CVRF document by ID (ie: 2016-Aug) Note: to view the correct XML response, please change *$ref: '#/definitions/cvrfReturnTypes200'* to *$ref: '#/definitions/cvrfReturnTypes200_xml'* in the swagger.json or swagger.yaml file + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +api_version = 'api_version_example' # String | +api_key = 'api_key_example' # String | +id = 'id_example' # String | + +begin + + result = api_instance.cvrf_id_get(api_version, api_key, id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->cvrf_id_get: #{e}" +end +``` + +#### Using the cvrf_id_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> cvrf_id_get_with_http_info(api_version, api_key, id) + +```ruby +begin + + data, status_code, headers = api_instance.cvrf_id_get_with_http_info(api_version, api_key, id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->cvrf_id_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **api_version** | **String** | | [default to '2016-08-01'] | +| **api_key** | **String** | | | +| **id** | **String** | | | + +### Return type + +[**CvrfReturnTypes200**](CvrfReturnTypes200.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + + +## updates_get + +> updates_get(api_version, api_key) + + + +Get all updates with a link to the CVRF document + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +api_version = 'api_version_example' # String | +api_key = 'api_key_example' # String | + +begin + + result = api_instance.updates_get(api_version, api_key) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->updates_get: #{e}" +end +``` + +#### Using the updates_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> updates_get_with_http_info(api_version, api_key) + +```ruby +begin + + data, status_code, headers = api_instance.updates_get_with_http_info(api_version, api_key) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->updates_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **api_version** | **String** | | [default to '2016-08-01'] | +| **api_key** | **String** | | | + +### Return type + +[**UpdatesReturnTypes200**](UpdatesReturnTypes200.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + + +## updates_id_get + +> updates_id_get(api_version, api_key, id) + + + +Get updates with a link to the CVRF document for a particular ID. ID can be: * Update ID (ie: 2016-Aug) * Vulnerability ID (ie: CVE-2016-0128) * Year (ie: 2016) + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::DefaultApi.new +api_version = 'api_version_example' # String | +api_key = 'api_key_example' # String | +id = 'id_example' # String | + +begin + + result = api_instance.updates_id_get(api_version, api_key, id) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->updates_id_get: #{e}" +end +``` + +#### Using the updates_id_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> updates_id_get_with_http_info(api_version, api_key, id) + +```ruby +begin + + data, status_code, headers = api_instance.updates_id_get_with_http_info(api_version, api_key, id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OpenapiClient::ApiError => e + puts "Error when calling DefaultApi->updates_id_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **api_version** | **String** | | [default to '2016-08-01'] | +| **api_key** | **String** | | | +| **id** | **String** | | | + +### Return type + +[**UpdatesReturnTypes200**](UpdatesReturnTypes200.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + diff --git a/tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200.md b/tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200.md new file mode 100644 index 0000000..36dc826 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200.md @@ -0,0 +1,20 @@ +# OpenapiClient::UpdatesReturnTypes200 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **odata_context** | **String** | | [optional] | +| **value** | [**Array<UpdatesReturnTypes200Value>**](UpdatesReturnTypes200Value.md) | array of files returned | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::UpdatesReturnTypes200.new( + odata_context: null, + value: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200Value.md b/tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200Value.md new file mode 100644 index 0000000..b6b7be8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/docs/UpdatesReturnTypes200Value.md @@ -0,0 +1,30 @@ +# OpenapiClient::UpdatesReturnTypes200Value + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_alias** | **String** | | [optional] | +| **current_release_date** | **String** | | [optional] | +| **cvrf_url** | **String** | | [optional] | +| **document_title** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **initial_release_data** | **String** | | [optional] | +| **severity** | **String** | | [optional] | + +## Example + +```ruby +require 'openapi_client' + +instance = OpenapiClient::UpdatesReturnTypes200Value.new( + _alias: null, + current_release_date: null, + cvrf_url: null, + document_title: null, + id: null, + initial_release_data: null, + severity: null +) +``` + diff --git a/tools/microsoft/cvrf/ruby-client/git_push.sh b/tools/microsoft/cvrf/ruby-client/git_push.sh new file mode 100644 index 0000000..19ce5b5 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + 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="" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/tools/microsoft/cvrf/ruby-client/lib/openapi_client.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client.rb new file mode 100644 index 0000000..cf5a5ca --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client.rb @@ -0,0 +1,86 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +# Common files +require 'openapi_client/api_client' +require 'openapi_client/api_error' +require 'openapi_client/version' +require 'openapi_client/configuration' + +# Models +require 'openapi_client/models/cvrf_return_types200' +require 'openapi_client/models/cvrf_return_types200_acknowledgements' +require 'openapi_client/models/cvrf_return_types200_affected_files' +require 'openapi_client/models/cvrf_return_types200_cvss_score_sets' +require 'openapi_client/models/cvrf_return_types200_document_notes' +require 'openapi_client/models/cvrf_return_types200_document_publisher' +require 'openapi_client/models/cvrf_return_types200_document_title' +require 'openapi_client/models/cvrf_return_types200_document_tracking' +require 'openapi_client/models/cvrf_return_types200_document_tracking_identification' +require 'openapi_client/models/cvrf_return_types200_document_tracking_revision_history' +require 'openapi_client/models/cvrf_return_types200_notes' +require 'openapi_client/models/cvrf_return_types200_product_statuses' +require 'openapi_client/models/cvrf_return_types200_product_tree' +require 'openapi_client/models/cvrf_return_types200_product_tree_branch' +require 'openapi_client/models/cvrf_return_types200_product_tree_items' +require 'openapi_client/models/cvrf_return_types200_product_tree_items1' +require 'openapi_client/models/cvrf_return_types200_remediations' +require 'openapi_client/models/cvrf_return_types200_threats' +require 'openapi_client/models/cvrf_return_types200_vulnerability' +require 'openapi_client/models/cvrf_return_types200_xml' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_notes' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_publisher' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_note' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat' +require 'openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats' +require 'openapi_client/models/updates_return_types200' +require 'openapi_client/models/updates_return_types200_value' + +# APIs +require 'openapi_client/api/default_api' + +module OpenapiClient + class << self + # Customize default settings for the SDK using block. + # OpenapiClient.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api/default_api.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api/default_api.rb new file mode 100644 index 0000000..0ba203e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api/default_api.rb @@ -0,0 +1,241 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'cgi' + +module OpenapiClient + class DefaultApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Gets a CVRF document by ID (ie: 2016-Aug) Note: to view the correct XML response, please change *$ref: '#/definitions/cvrfReturnTypes200'* to *$ref: '#/definitions/cvrfReturnTypes200_xml'* in the swagger.json or swagger.yaml file + # @param api_version [String] + # @param api_key [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [CvrfReturnTypes200] + def cvrf_id_get(api_version, api_key, id, opts = {}) + data, _status_code, _headers = cvrf_id_get_with_http_info(api_version, api_key, id, opts) + data + end + + # Gets a CVRF document by ID (ie: 2016-Aug) Note: to view the correct XML response, please change *$ref: '#/definitions/cvrfReturnTypes200'* to *$ref: '#/definitions/cvrfReturnTypes200_xml'* in the swagger.json or swagger.yaml file + # @param api_version [String] + # @param api_key [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(CvrfReturnTypes200, Integer, Hash)>] CvrfReturnTypes200 data, response status code and response headers + def cvrf_id_get_with_http_info(api_version, api_key, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.cvrf_id_get ...' + end + # verify the required parameter 'api_version' is set + if @api_client.config.client_side_validation && api_version.nil? + fail ArgumentError, "Missing the required parameter 'api_version' when calling DefaultApi.cvrf_id_get" + end + # verify the required parameter 'api_key' is set + if @api_client.config.client_side_validation && api_key.nil? + fail ArgumentError, "Missing the required parameter 'api_key' when calling DefaultApi.cvrf_id_get" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.cvrf_id_get" + end + # resource path + local_var_path = '/cvrf/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'api-version'] = api_version + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/xml', 'application/json']) + header_params[:'api-key'] = api_key + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CvrfReturnTypes200' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.cvrf_id_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#cvrf_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all updates with a link to the CVRF document + # @param api_version [String] + # @param api_key [String] + # @param [Hash] opts the optional parameters + # @return [UpdatesReturnTypes200] + def updates_get(api_version, api_key, opts = {}) + data, _status_code, _headers = updates_get_with_http_info(api_version, api_key, opts) + data + end + + # Get all updates with a link to the CVRF document + # @param api_version [String] + # @param api_key [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UpdatesReturnTypes200, Integer, Hash)>] UpdatesReturnTypes200 data, response status code and response headers + def updates_get_with_http_info(api_version, api_key, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.updates_get ...' + end + # verify the required parameter 'api_version' is set + if @api_client.config.client_side_validation && api_version.nil? + fail ArgumentError, "Missing the required parameter 'api_version' when calling DefaultApi.updates_get" + end + # verify the required parameter 'api_key' is set + if @api_client.config.client_side_validation && api_key.nil? + fail ArgumentError, "Missing the required parameter 'api_key' when calling DefaultApi.updates_get" + end + # resource path + local_var_path = '/Updates' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'api-version'] = api_version + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) + header_params[:'api-key'] = api_key + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UpdatesReturnTypes200' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.updates_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#updates_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get updates with a link to the CVRF document for a particular ID. ID can be: * Update ID (ie: 2016-Aug) * Vulnerability ID (ie: CVE-2016-0128) * Year (ie: 2016) + # @param api_version [String] + # @param api_key [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [UpdatesReturnTypes200] + def updates_id_get(api_version, api_key, id, opts = {}) + data, _status_code, _headers = updates_id_get_with_http_info(api_version, api_key, id, opts) + data + end + + # Get updates with a link to the CVRF document for a particular ID. ID can be: * Update ID (ie: 2016-Aug) * Vulnerability ID (ie: CVE-2016-0128) * Year (ie: 2016) + # @param api_version [String] + # @param api_key [String] + # @param id [String] + # @param [Hash] opts the optional parameters + # @return [Array<(UpdatesReturnTypes200, Integer, Hash)>] UpdatesReturnTypes200 data, response status code and response headers + def updates_id_get_with_http_info(api_version, api_key, id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.updates_id_get ...' + end + # verify the required parameter 'api_version' is set + if @api_client.config.client_side_validation && api_version.nil? + fail ArgumentError, "Missing the required parameter 'api_version' when calling DefaultApi.updates_id_get" + end + # verify the required parameter 'api_key' is set + if @api_client.config.client_side_validation && api_key.nil? + fail ArgumentError, "Missing the required parameter 'api_key' when calling DefaultApi.updates_id_get" + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.updates_id_get" + end + # resource path + local_var_path = '/Updates('{id}')'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'api-version'] = api_version + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml']) + header_params[:'api-key'] = api_key + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UpdatesReturnTypes200' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"DefaultApi.updates_id_get", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#updates_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_client.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_client.rb new file mode 100644 index 0000000..390b94f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_client.rb @@ -0,0 +1,389 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'json' +require 'logger' +require 'tempfile' +require 'time' +require 'typhoeus' + +module OpenapiClient + 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 = "OpenAPI-Generator/#{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, opts) + 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] || {} + + + # 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 + } + + # 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 + + # 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 + + # 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 Time).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 'Time' + # parse date time (expecting ISO 8601 format) + Time.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) or oneOf + klass = OpenapiClient.const_get(return_type) + klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data) + 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, opts = {}) + # Add leading and trailing slashes to path + path = "/#{path}".gsub(/\/+/, '/') + @config.base_url(opts[:operation]) + 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` or `header`' + end + end + end + + # Sets user agent in HTTP header + # + # @param [String] user_agent User agent (e.g. openapi-generator/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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_error.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_error.rb new file mode 100644 index 0000000..e624f87 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/api_error.rb @@ -0,0 +1,57 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +module OpenapiClient + 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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/configuration.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/configuration.rb new file mode 100644 index 0000000..ecba48e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/configuration.rb @@ -0,0 +1,270 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +module OpenapiClient + class Configuration + # Defines url scheme + attr_accessor :scheme + + # Defines url host + attr_accessor :host + + # Defines url base path + attr_accessor :base_path + + # Define server configuration index + attr_accessor :server_index + + # Define server operation configuration index + attr_accessor :server_operation_index + + # Default server variables + attr_accessor :server_variables + + # Default server operation variables + attr_accessor :server_operation_variables + + # 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 + + # 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 = 'https' + @host = 'api.msrc.microsoft.com' + @base_path = '' + @server_index = 0 + @server_operation_index = {} + @server_variables = {} + @server_operation_variables = {} + @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 + @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 + + # Returns base URL for specified operation based on server settings + def base_url(operation = nil) + index = server_operation_index.fetch(operation, server_index) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil + + server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) + 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, param_alias = nil) + key = @api_key[param_name] + key = @api_key.fetch(param_alias, key) unless param_alias.nil? + if @api_key_prefix[param_name] + "#{@api_key_prefix[param_name]} #{key}" + else + key + 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 + { + } + end + + # Returns an array of Server setting + def server_settings + [ + { + url: "https://api.msrc.microsoft.com", + description: "No description provided", + } + ] + end + + def operation_server_settings + { + } + end + + # Returns URL based on server settings + # + # @param index array index of the server settings + # @param variables hash of variable and the corresponding value + def server_url(index, variables = {}, servers = nil) + servers = server_settings if servers == nil + + # check array index out of bound + if (index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" + end + + server = servers[index] + url = server[:url] + + return url unless server.key? :variables + + # go through variable and assign a value + server[:variables].each do |name, variable| + if variables.key?(name) + if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name])) + url.gsub! "{" + name.to_s + "}", variables[name] + else + fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}." + end + else + # use default value + url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value] + end + end + + url + end + end +end diff --git a/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200.rb new file mode 100644 index 0000000..602e745 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200.rb @@ -0,0 +1,276 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200 + attr_accessor :document_title + + attr_accessor :document_type + + attr_accessor :document_publisher + + attr_accessor :document_tracking + + attr_accessor :document_notes + + attr_accessor :product_tree + + attr_accessor :vulnerability + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'document_title' => :'DocumentTitle', + :'document_type' => :'DocumentType', + :'document_publisher' => :'DocumentPublisher', + :'document_tracking' => :'DocumentTracking', + :'document_notes' => :'DocumentNotes', + :'product_tree' => :'ProductTree', + :'vulnerability' => :'Vulnerability' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'document_title' => :'CvrfReturnTypes200DocumentTitle', + :'document_type' => :'CvrfReturnTypes200DocumentTitle', + :'document_publisher' => :'CvrfReturnTypes200DocumentPublisher', + :'document_tracking' => :'CvrfReturnTypes200DocumentTracking', + :'document_notes' => :'Array', + :'product_tree' => :'CvrfReturnTypes200ProductTree', + :'vulnerability' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200` 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 `OpenapiClient::CvrfReturnTypes200`. 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?(:'document_title') + self.document_title = attributes[:'document_title'] + end + + if attributes.key?(:'document_type') + self.document_type = attributes[:'document_type'] + end + + if attributes.key?(:'document_publisher') + self.document_publisher = attributes[:'document_publisher'] + end + + if attributes.key?(:'document_tracking') + self.document_tracking = attributes[:'document_tracking'] + end + + if attributes.key?(:'document_notes') + if (value = attributes[:'document_notes']).is_a?(Array) + self.document_notes = value + end + end + + if attributes.key?(:'product_tree') + self.product_tree = attributes[:'product_tree'] + end + + if attributes.key?(:'vulnerability') + if (value = attributes[:'vulnerability']).is_a?(Array) + self.vulnerability = 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 && + document_title == o.document_title && + document_type == o.document_type && + document_publisher == o.document_publisher && + document_tracking == o.document_tracking && + document_notes == o.document_notes && + product_tree == o.product_tree && + vulnerability == o.vulnerability + 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 + [document_title, document_type, document_publisher, document_tracking, document_notes, product_tree, vulnerability].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_acknowledgements.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_acknowledgements.rb new file mode 100644 index 0000000..f764e01 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_acknowledgements.rb @@ -0,0 +1,231 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200Acknowledgements + attr_accessor :name + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'Name', + :'url' => :'URL' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'Array', + :'url' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200Acknowledgements` 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 `OpenapiClient::CvrfReturnTypes200Acknowledgements`. 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') + if (value = attributes[:'name']).is_a?(Array) + self.name = value + end + end + + if attributes.key?(:'url') + if (value = attributes[:'url']).is_a?(Array) + self.url = 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 && + name == o.name && + url == o.url + 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, url].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_affected_files.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_affected_files.rb new file mode 100644 index 0000000..13f93f7 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_affected_files.rb @@ -0,0 +1,263 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200AffectedFiles + attr_accessor :product_id + + attr_accessor :file_name + + attr_accessor :file_version + + attr_accessor :file_path + + attr_accessor :file_last_modified + + attr_accessor :file_architecture + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_id' => :'ProductId', + :'file_name' => :'FileName', + :'file_version' => :'FileVersion', + :'file_path' => :'FilePath', + :'file_last_modified' => :'FileLastModified', + :'file_architecture' => :'FileArchitecture' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'product_id' => :'String', + :'file_name' => :'String', + :'file_version' => :'String', + :'file_path' => :'String', + :'file_last_modified' => :'Time', + :'file_architecture' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200AffectedFiles` 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 `OpenapiClient::CvrfReturnTypes200AffectedFiles`. 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?(:'product_id') + self.product_id = attributes[:'product_id'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'file_version') + self.file_version = attributes[:'file_version'] + end + + if attributes.key?(:'file_path') + self.file_path = attributes[:'file_path'] + end + + if attributes.key?(:'file_last_modified') + self.file_last_modified = attributes[:'file_last_modified'] + end + + if attributes.key?(:'file_architecture') + self.file_architecture = attributes[:'file_architecture'] + 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 && + product_id == o.product_id && + file_name == o.file_name && + file_version == o.file_version && + file_path == o.file_path && + file_last_modified == o.file_last_modified && + file_architecture == o.file_architecture + 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 + [product_id, file_name, file_version, file_path, file_last_modified, file_architecture].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_cvss_score_sets.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_cvss_score_sets.rb new file mode 100644 index 0000000..d0fea08 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_cvss_score_sets.rb @@ -0,0 +1,247 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200CVSSScoreSets + attr_accessor :base_score + + attr_accessor :temporal_score + + attr_accessor :vector + + attr_accessor :product_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'base_score' => :'BaseScore', + :'temporal_score' => :'TemporalScore', + :'vector' => :'Vector', + :'product_id' => :'ProductID' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'base_score' => :'Float', + :'temporal_score' => :'Float', + :'vector' => :'String', + :'product_id' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200CVSSScoreSets` 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 `OpenapiClient::CvrfReturnTypes200CVSSScoreSets`. 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?(:'base_score') + self.base_score = attributes[:'base_score'] + end + + if attributes.key?(:'temporal_score') + self.temporal_score = attributes[:'temporal_score'] + end + + if attributes.key?(:'vector') + self.vector = attributes[:'vector'] + end + + if attributes.key?(:'product_id') + if (value = attributes[:'product_id']).is_a?(Array) + self.product_id = 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 && + base_score == o.base_score && + temporal_score == o.temporal_score && + vector == o.vector && + product_id == o.product_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 + [base_score, temporal_score, vector, product_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_notes.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_notes.rb new file mode 100644 index 0000000..3d6504b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_notes.rb @@ -0,0 +1,254 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200DocumentNotes + attr_accessor :title + + attr_accessor :audience + + attr_accessor :type + + attr_accessor :ordinal + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'Title', + :'audience' => :'Audience', + :'type' => :'Type', + :'ordinal' => :'Ordinal', + :'value' => :'Value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'title' => :'String', + :'audience' => :'String', + :'type' => :'Integer', + :'ordinal' => :'String', + :'value' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200DocumentNotes` 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 `OpenapiClient::CvrfReturnTypes200DocumentNotes`. 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?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'audience') + self.audience = attributes[:'audience'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'ordinal') + self.ordinal = attributes[:'ordinal'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 && + title == o.title && + audience == o.audience && + type == o.type && + ordinal == o.ordinal && + value == o.value + 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 + [title, audience, type, ordinal, value].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_publisher.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_publisher.rb new file mode 100644 index 0000000..df24f27 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_publisher.rb @@ -0,0 +1,236 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200DocumentPublisher + attr_accessor :contact_details + + attr_accessor :issuing_athority + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'contact_details' => :'ContactDetails', + :'issuing_athority' => :'IssuingAthority', + :'type' => :'Type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'contact_details' => :'CvrfReturnTypes200DocumentTitle', + :'issuing_athority' => :'CvrfReturnTypes200DocumentTitle', + :'type' => :'Integer' + } + 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 `OpenapiClient::CvrfReturnTypes200DocumentPublisher` 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 `OpenapiClient::CvrfReturnTypes200DocumentPublisher`. 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?(:'contact_details') + self.contact_details = attributes[:'contact_details'] + end + + if attributes.key?(:'issuing_athority') + self.issuing_athority = attributes[:'issuing_athority'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 && + contact_details == o.contact_details && + issuing_athority == o.issuing_athority && + type == o.type + 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 + [contact_details, issuing_athority, type].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_title.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_title.rb new file mode 100644 index 0000000..46a09dc --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_title.rb @@ -0,0 +1,218 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200DocumentTitle + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'Value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200DocumentTitle` 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 `OpenapiClient::CvrfReturnTypes200DocumentTitle`. 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?(:'value') + self.value = attributes[:'value'] + 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 && + value == o.value + 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 + [value].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking.rb new file mode 100644 index 0000000..432bc39 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking.rb @@ -0,0 +1,265 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200DocumentTracking + attr_accessor :identification + + attr_accessor :status + + attr_accessor :version + + attr_accessor :revision_history + + attr_accessor :initial_release_date + + attr_accessor :current_release_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identification' => :'Identification', + :'status' => :'Status', + :'version' => :'Version', + :'revision_history' => :'RevisionHistory', + :'initial_release_date' => :'InitialReleaseDate', + :'current_release_date' => :'CurrentReleaseDate' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identification' => :'CvrfReturnTypes200DocumentTrackingIdentification', + :'status' => :'Integer', + :'version' => :'String', + :'revision_history' => :'Array', + :'initial_release_date' => :'Time', + :'current_release_date' => :'Time' + } + 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 `OpenapiClient::CvrfReturnTypes200DocumentTracking` 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 `OpenapiClient::CvrfReturnTypes200DocumentTracking`. 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?(:'identification') + self.identification = attributes[:'identification'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'revision_history') + if (value = attributes[:'revision_history']).is_a?(Array) + self.revision_history = value + end + end + + if attributes.key?(:'initial_release_date') + self.initial_release_date = attributes[:'initial_release_date'] + end + + if attributes.key?(:'current_release_date') + self.current_release_date = attributes[:'current_release_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 && + identification == o.identification && + status == o.status && + version == o.version && + revision_history == o.revision_history && + initial_release_date == o.initial_release_date && + current_release_date == o.current_release_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 + [identification, status, version, revision_history, initial_release_date, current_release_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_identification.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_identification.rb new file mode 100644 index 0000000..f049ba8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_identification.rb @@ -0,0 +1,227 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200DocumentTrackingIdentification + attr_accessor :id + + attr_accessor :_alias + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'ID', + :'_alias' => :'Alias' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'CvrfReturnTypes200DocumentTitle', + :'_alias' => :'CvrfReturnTypes200DocumentTitle' + } + 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 `OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification` 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 `OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification`. 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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'_alias') + self._alias = attributes[:'_alias'] + 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 && + id == o.id && + _alias == o._alias + 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 + [id, _alias].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_revision_history.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_revision_history.rb new file mode 100644 index 0000000..54f0594 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_document_tracking_revision_history.rb @@ -0,0 +1,236 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200DocumentTrackingRevisionHistory + attr_accessor :number + + attr_accessor :date + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'Number', + :'date' => :'Date', + :'description' => :'Description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String', + :'date' => :'Time', + :'description' => :'CvrfReturnTypes200DocumentTitle' + } + 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 `OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory` 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 `OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory`. 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?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + 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 && + number == o.number && + date == o.date && + description == o.description + 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 + [number, date, description].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_notes.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_notes.rb new file mode 100644 index 0000000..25cffa8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_notes.rb @@ -0,0 +1,245 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200Notes + attr_accessor :title + + attr_accessor :type + + attr_accessor :ordinal + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'Title', + :'type' => :'Type', + :'ordinal' => :'Ordinal', + :'value' => :'Value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'title' => :'String', + :'type' => :'Integer', + :'ordinal' => :'String', + :'value' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200Notes` 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 `OpenapiClient::CvrfReturnTypes200Notes`. 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?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'ordinal') + self.ordinal = attributes[:'ordinal'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 && + title == o.title && + type == o.type && + ordinal == o.ordinal && + value == o.value + 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 + [title, type, ordinal, value].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_statuses.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_statuses.rb new file mode 100644 index 0000000..b9e723d --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_statuses.rb @@ -0,0 +1,229 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200ProductStatuses + attr_accessor :product_id + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_id' => :'ProductID', + :'type' => :'Type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'product_id' => :'Array', + :'type' => :'Integer' + } + 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 `OpenapiClient::CvrfReturnTypes200ProductStatuses` 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 `OpenapiClient::CvrfReturnTypes200ProductStatuses`. 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?(:'product_id') + if (value = attributes[:'product_id']).is_a?(Array) + self.product_id = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 && + product_id == o.product_id && + type == o.type + 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 + [product_id, type].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree.rb new file mode 100644 index 0000000..db5a0fd --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree.rb @@ -0,0 +1,231 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200ProductTree + attr_accessor :branch + + attr_accessor :full_product_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'branch' => :'Branch', + :'full_product_name' => :'FullProductName' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'branch' => :'Array', + :'full_product_name' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200ProductTree` 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 `OpenapiClient::CvrfReturnTypes200ProductTree`. 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?(:'branch') + if (value = attributes[:'branch']).is_a?(Array) + self.branch = value + end + end + + if attributes.key?(:'full_product_name') + if (value = attributes[:'full_product_name']).is_a?(Array) + self.full_product_name = 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 && + branch == o.branch && + full_product_name == o.full_product_name + 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 + [branch, full_product_name].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_branch.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_branch.rb new file mode 100644 index 0000000..d2c723f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_branch.rb @@ -0,0 +1,220 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200ProductTreeBranch + attr_accessor :items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'items' => :'Items' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'items' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200ProductTreeBranch` 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 `OpenapiClient::CvrfReturnTypes200ProductTreeBranch`. 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?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = 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 && + items == o.items + 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 + [items].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items.rb new file mode 100644 index 0000000..175f911 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items.rb @@ -0,0 +1,227 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200ProductTreeItems + attr_accessor :product_id + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_id' => :'ProductID', + :'value' => :'Value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'product_id' => :'String', + :'value' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200ProductTreeItems` 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 `OpenapiClient::CvrfReturnTypes200ProductTreeItems`. 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?(:'product_id') + self.product_id = attributes[:'product_id'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 && + product_id == o.product_id && + value == o.value + 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 + [product_id, value].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items1.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items1.rb new file mode 100644 index 0000000..9aafb56 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_product_tree_items1.rb @@ -0,0 +1,238 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200ProductTreeItems1 + attr_accessor :items + + attr_accessor :type + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'items' => :'Items', + :'type' => :'Type', + :'name' => :'Name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'items' => :'Array', + :'type' => :'Integer', + :'name' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200ProductTreeItems1` 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 `OpenapiClient::CvrfReturnTypes200ProductTreeItems1`. 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?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 && + items == o.items && + type == o.type && + name == o.name + 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 + [items, type, name].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_remediations.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_remediations.rb new file mode 100644 index 0000000..7ac288c --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_remediations.rb @@ -0,0 +1,294 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200Remediations + attr_accessor :description + + attr_accessor :url + + attr_accessor :supersedence + + attr_accessor :product_id + + attr_accessor :type + + attr_accessor :date_specified + + attr_accessor :affected_files + + attr_accessor :sub_type + + attr_accessor :restart_required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'Description', + :'url' => :'URL', + :'supersedence' => :'Supersedence', + :'product_id' => :'ProductID', + :'type' => :'Type', + :'date_specified' => :'DateSpecified', + :'affected_files' => :'AffectedFiles', + :'sub_type' => :'SubType', + :'restart_required' => :'RestartRequired' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'CvrfReturnTypes200DocumentTitle', + :'url' => :'String', + :'supersedence' => :'String', + :'product_id' => :'Array', + :'type' => :'Integer', + :'date_specified' => :'Boolean', + :'affected_files' => :'Array', + :'sub_type' => :'String', + :'restart_required' => :'CvrfReturnTypes200DocumentTitle' + } + 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 `OpenapiClient::CvrfReturnTypes200Remediations` 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 `OpenapiClient::CvrfReturnTypes200Remediations`. 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?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'supersedence') + self.supersedence = attributes[:'supersedence'] + end + + if attributes.key?(:'product_id') + if (value = attributes[:'product_id']).is_a?(Array) + self.product_id = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'date_specified') + self.date_specified = attributes[:'date_specified'] + end + + if attributes.key?(:'affected_files') + if (value = attributes[:'affected_files']).is_a?(Array) + self.affected_files = value + end + end + + if attributes.key?(:'sub_type') + self.sub_type = attributes[:'sub_type'] + end + + if attributes.key?(:'restart_required') + self.restart_required = attributes[:'restart_required'] + 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 && + description == o.description && + url == o.url && + supersedence == o.supersedence && + product_id == o.product_id && + type == o.type && + date_specified == o.date_specified && + affected_files == o.affected_files && + sub_type == o.sub_type && + restart_required == o.restart_required + 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, url, supersedence, product_id, type, date_specified, affected_files, sub_type, restart_required].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_threats.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_threats.rb new file mode 100644 index 0000000..f2065f9 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_threats.rb @@ -0,0 +1,247 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200Threats + attr_accessor :description + + attr_accessor :product_id + + attr_accessor :type + + attr_accessor :date_specified + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'Description', + :'product_id' => :'ProductID', + :'type' => :'Type', + :'date_specified' => :'DateSpecified' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'CvrfReturnTypes200DocumentTitle', + :'product_id' => :'Array', + :'type' => :'Integer', + :'date_specified' => :'Boolean' + } + 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 `OpenapiClient::CvrfReturnTypes200Threats` 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 `OpenapiClient::CvrfReturnTypes200Threats`. 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?(:'product_id') + if (value = attributes[:'product_id']).is_a?(Array) + self.product_id = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'date_specified') + self.date_specified = attributes[:'date_specified'] + 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 && + description == o.description && + product_id == o.product_id && + type == o.type && + date_specified == o.date_specified + 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, product_id, type, date_specified].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_vulnerability.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_vulnerability.rb new file mode 100644 index 0000000..9db18f7 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_vulnerability.rb @@ -0,0 +1,331 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200Vulnerability + attr_accessor :title + + attr_accessor :notes + + attr_accessor :discovery_date_specified + + attr_accessor :release_date_specified + + attr_accessor :cve + + attr_accessor :product_statuses + + attr_accessor :threats + + attr_accessor :cvss_score_sets + + attr_accessor :remediations + + attr_accessor :acknowledgements + + attr_accessor :ordinal + + attr_accessor :revision_history + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'Title', + :'notes' => :'Notes', + :'discovery_date_specified' => :'DiscoveryDateSpecified', + :'release_date_specified' => :'ReleaseDateSpecified', + :'cve' => :'CVE', + :'product_statuses' => :'ProductStatuses', + :'threats' => :'Threats', + :'cvss_score_sets' => :'CVSSScoreSets', + :'remediations' => :'Remediations', + :'acknowledgements' => :'Acknowledgements', + :'ordinal' => :'Ordinal', + :'revision_history' => :'RevisionHistory' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'title' => :'CvrfReturnTypes200DocumentTitle', + :'notes' => :'Array', + :'discovery_date_specified' => :'Boolean', + :'release_date_specified' => :'Boolean', + :'cve' => :'String', + :'product_statuses' => :'Array', + :'threats' => :'Array', + :'cvss_score_sets' => :'Array', + :'remediations' => :'Array', + :'acknowledgements' => :'Array', + :'ordinal' => :'String', + :'revision_history' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200Vulnerability` 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 `OpenapiClient::CvrfReturnTypes200Vulnerability`. 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?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + + if attributes.key?(:'discovery_date_specified') + self.discovery_date_specified = attributes[:'discovery_date_specified'] + end + + if attributes.key?(:'release_date_specified') + self.release_date_specified = attributes[:'release_date_specified'] + end + + if attributes.key?(:'cve') + self.cve = attributes[:'cve'] + end + + if attributes.key?(:'product_statuses') + if (value = attributes[:'product_statuses']).is_a?(Array) + self.product_statuses = value + end + end + + if attributes.key?(:'threats') + if (value = attributes[:'threats']).is_a?(Array) + self.threats = value + end + end + + if attributes.key?(:'cvss_score_sets') + if (value = attributes[:'cvss_score_sets']).is_a?(Array) + self.cvss_score_sets = value + end + end + + if attributes.key?(:'remediations') + if (value = attributes[:'remediations']).is_a?(Array) + self.remediations = value + end + end + + if attributes.key?(:'acknowledgements') + if (value = attributes[:'acknowledgements']).is_a?(Array) + self.acknowledgements = value + end + end + + if attributes.key?(:'ordinal') + self.ordinal = attributes[:'ordinal'] + end + + if attributes.key?(:'revision_history') + if (value = attributes[:'revision_history']).is_a?(Array) + self.revision_history = 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 && + title == o.title && + notes == o.notes && + discovery_date_specified == o.discovery_date_specified && + release_date_specified == o.release_date_specified && + cve == o.cve && + product_statuses == o.product_statuses && + threats == o.threats && + cvss_score_sets == o.cvss_score_sets && + remediations == o.remediations && + acknowledgements == o.acknowledgements && + ordinal == o.ordinal && + revision_history == o.revision_history + 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 + [title, notes, discovery_date_specified, release_date_specified, cve, product_statuses, threats, cvss_score_sets, remediations, acknowledgements, ordinal, revision_history].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml.rb new file mode 100644 index 0000000..87246c9 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml.rb @@ -0,0 +1,219 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + # Swagger has some limitations and can not display complex XML documents in a model, please refer to the ICASI CVRF schema online. for a more exact specification on return schema. + class CvrfReturnTypes200Xml + attr_accessor :cvrfdoc + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cvrfdoc' => :'cvrfdoc' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cvrfdoc' => :'CvrfReturnTypes200XmlCvrfdoc' + } + 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 `OpenapiClient::CvrfReturnTypes200Xml` 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 `OpenapiClient::CvrfReturnTypes200Xml`. 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?(:'cvrfdoc') + self.cvrfdoc = attributes[:'cvrfdoc'] + 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 && + cvrfdoc == o.cvrfdoc + 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 + [cvrfdoc].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc.rb new file mode 100644 index 0000000..d325d33 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc.rb @@ -0,0 +1,274 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdoc + attr_accessor :document_title + + attr_accessor :document_type + + attr_accessor :document_publisher + + attr_accessor :document_tracking + + attr_accessor :document_notes + + attr_accessor :product_tree + + attr_accessor :vulnerability + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'document_title' => :'DocumentTitle', + :'document_type' => :'DocumentType', + :'document_publisher' => :'DocumentPublisher', + :'document_tracking' => :'DocumentTracking', + :'document_notes' => :'DocumentNotes', + :'product_tree' => :'ProductTree', + :'vulnerability' => :'Vulnerability' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'document_title' => :'String', + :'document_type' => :'String', + :'document_publisher' => :'CvrfReturnTypes200XmlCvrfdocDocumentPublisher', + :'document_tracking' => :'CvrfReturnTypes200XmlCvrfdocDocumentTracking', + :'document_notes' => :'Array', + :'product_tree' => :'CvrfReturnTypes200XmlCvrfdocProductTree', + :'vulnerability' => :'CvrfReturnTypes200XmlCvrfdocVulnerability' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdoc` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdoc`. 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?(:'document_title') + self.document_title = attributes[:'document_title'] + end + + if attributes.key?(:'document_type') + self.document_type = attributes[:'document_type'] + end + + if attributes.key?(:'document_publisher') + self.document_publisher = attributes[:'document_publisher'] + end + + if attributes.key?(:'document_tracking') + self.document_tracking = attributes[:'document_tracking'] + end + + if attributes.key?(:'document_notes') + if (value = attributes[:'document_notes']).is_a?(Array) + self.document_notes = value + end + end + + if attributes.key?(:'product_tree') + self.product_tree = attributes[:'product_tree'] + end + + if attributes.key?(:'vulnerability') + self.vulnerability = attributes[:'vulnerability'] + 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 && + document_title == o.document_title && + document_type == o.document_type && + document_publisher == o.document_publisher && + document_tracking == o.document_tracking && + document_notes == o.document_notes && + product_tree == o.product_tree && + vulnerability == o.vulnerability + 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 + [document_title, document_type, document_publisher, document_tracking, document_notes, product_tree, vulnerability].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_notes.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_notes.rb new file mode 100644 index 0000000..d28fe45 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_notes.rb @@ -0,0 +1,218 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocDocumentNotes + attr_accessor :note + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'note' => :'Note' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'note' => :'CvrfReturnTypes200XmlCvrfdocNote' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes`. 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?(:'note') + self.note = attributes[:'note'] + 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 && + note == o.note + 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 + [note].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_publisher.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_publisher.rb new file mode 100644 index 0000000..e9a941a --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_publisher.rb @@ -0,0 +1,236 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocDocumentPublisher + attr_accessor :type + + attr_accessor :contact_details + + attr_accessor :issuing_authority + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'Type', + :'contact_details' => :'ContactDetails', + :'issuing_authority' => :'IssuingAuthority' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'contact_details' => :'String', + :'issuing_authority' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'contact_details') + self.contact_details = attributes[:'contact_details'] + end + + if attributes.key?(:'issuing_authority') + self.issuing_authority = attributes[:'issuing_authority'] + 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 && + type == o.type && + contact_details == o.contact_details && + issuing_authority == o.issuing_authority + 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 + [type, contact_details, issuing_authority].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking.rb new file mode 100644 index 0000000..0d1a734 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking.rb @@ -0,0 +1,263 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocDocumentTracking + attr_accessor :identification + + attr_accessor :status + + attr_accessor :version + + attr_accessor :revision_history + + attr_accessor :initial_release_date + + attr_accessor :current_release_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identification' => :'Identification', + :'status' => :'Status', + :'version' => :'Version', + :'revision_history' => :'RevisionHistory', + :'initial_release_date' => :'InitialReleaseDate', + :'current_release_date' => :'CurrentReleaseDate' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identification' => :'CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification', + :'status' => :'String', + :'version' => :'Float', + :'revision_history' => :'CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory', + :'initial_release_date' => :'Time', + :'current_release_date' => :'Time' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking`. 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?(:'identification') + self.identification = attributes[:'identification'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'revision_history') + self.revision_history = attributes[:'revision_history'] + end + + if attributes.key?(:'initial_release_date') + self.initial_release_date = attributes[:'initial_release_date'] + end + + if attributes.key?(:'current_release_date') + self.current_release_date = attributes[:'current_release_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 && + identification == o.identification && + status == o.status && + version == o.version && + revision_history == o.revision_history && + initial_release_date == o.initial_release_date && + current_release_date == o.current_release_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 + [identification, status, version, revision_history, initial_release_date, current_release_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification.rb new file mode 100644 index 0000000..d030e9e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification.rb @@ -0,0 +1,227 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification + attr_accessor :id + + attr_accessor :_alias + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'ID', + :'_alias' => :'Alias' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'_alias' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification`. 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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'_alias') + self._alias = attributes[:'_alias'] + 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 && + id == o.id && + _alias == o._alias + 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 + [id, _alias].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history.rb new file mode 100644 index 0000000..b8ff0d1 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history.rb @@ -0,0 +1,218 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory + attr_accessor :revision + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'revision' => :'Revision' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'revision' => :'CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory`. 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?(:'revision') + self.revision = attributes[:'revision'] + 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 && + revision == o.revision + 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 + [revision].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision.rb new file mode 100644 index 0000000..9e471da --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision.rb @@ -0,0 +1,236 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision + attr_accessor :number + + attr_accessor :date + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'Number', + :'date' => :'Date', + :'description' => :'Description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'Integer', + :'date' => :'Time', + :'description' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision`. 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?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + 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 && + number == o.number && + date == o.date && + description == o.description + 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 + [number, date, description].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_note.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_note.rb new file mode 100644 index 0000000..a319ed2 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_note.rb @@ -0,0 +1,246 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + # has a string in ... + class CvrfReturnTypes200XmlCvrfdocNote + attr_accessor :title + + attr_accessor :audience + + attr_accessor :type + + attr_accessor :ordinal + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'Title', + :'audience' => :'Audience', + :'type' => :'Type', + :'ordinal' => :'Ordinal' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'title' => :'String', + :'audience' => :'String', + :'type' => :'String', + :'ordinal' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote`. 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?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'audience') + self.audience = attributes[:'audience'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'ordinal') + self.ordinal = attributes[:'ordinal'] + 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 && + title == o.title && + audience == o.audience && + type == o.type && + ordinal == o.ordinal + 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 + [title, audience, type, ordinal].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree.rb new file mode 100644 index 0000000..d055034 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree.rb @@ -0,0 +1,231 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocProductTree + attr_accessor :branch + + attr_accessor :full_product_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'branch' => :'Branch', + :'full_product_name' => :'FullProductName' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'branch' => :'Array', + :'full_product_name' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree`. 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?(:'branch') + if (value = attributes[:'branch']).is_a?(Array) + self.branch = value + end + end + + if attributes.key?(:'full_product_name') + if (value = attributes[:'full_product_name']).is_a?(Array) + self.full_product_name = 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 && + branch == o.branch && + full_product_name == o.full_product_name + 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 + [branch, full_product_name].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch.rb new file mode 100644 index 0000000..c0aaacd --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch.rb @@ -0,0 +1,238 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocProductTreeBranch + attr_accessor :type + + attr_accessor :name + + attr_accessor :full_product_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'Type', + :'name' => :'Name', + :'full_product_name' => :'FullProductName' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'name' => :'String', + :'full_product_name' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'full_product_name') + if (value = attributes[:'full_product_name']).is_a?(Array) + self.full_product_name = 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 && + type == o.type && + name == o.name && + full_product_name == o.full_product_name + 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 + [type, name, full_product_name].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1.rb new file mode 100644 index 0000000..6f810f6 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1.rb @@ -0,0 +1,238 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocProductTreeBranch1 + attr_accessor :type + + attr_accessor :name + + attr_accessor :branch + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'Type', + :'name' => :'Name', + :'branch' => :'Branch' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'name' => :'String', + :'branch' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'branch') + if (value = attributes[:'branch']).is_a?(Array) + self.branch = 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 && + type == o.type && + name == o.name && + branch == o.branch + 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 + [type, name, branch].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name.rb new file mode 100644 index 0000000..b4342f6 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name.rb @@ -0,0 +1,218 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName + attr_accessor :product_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_id' => :'ProductID' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'product_id' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName`. 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?(:'product_id') + self.product_id = attributes[:'product_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 && + product_id == o.product_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 + [product_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1.rb new file mode 100644 index 0000000..34f54fa --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1.rb @@ -0,0 +1,219 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + # has a string in between ... + class CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1 + attr_accessor :product_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_id' => :'ProductID' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'product_id' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1`. 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?(:'product_id') + self.product_id = attributes[:'product_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 && + product_id == o.product_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 + [product_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability.rb new file mode 100644 index 0000000..99e729f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability.rb @@ -0,0 +1,311 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerability + attr_accessor :ordinal + + attr_accessor :title + + attr_accessor :notes + + attr_accessor :cve + + attr_accessor :product_statuses + + attr_accessor :threats + + attr_accessor :cvss_score_sets + + attr_accessor :remediations + + attr_accessor :acknowledgements + + attr_accessor :revision_history + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ordinal' => :'Ordinal', + :'title' => :'Title', + :'notes' => :'Notes', + :'cve' => :'CVE', + :'product_statuses' => :'ProductStatuses', + :'threats' => :'Threats', + :'cvss_score_sets' => :'CVSSScoreSets', + :'remediations' => :'Remediations', + :'acknowledgements' => :'Acknowledgements', + :'revision_history' => :'RevisionHistory' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ordinal' => :'String', + :'title' => :'String', + :'notes' => :'CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes', + :'cve' => :'String', + :'product_statuses' => :'Array', + :'threats' => :'Array', + :'cvss_score_sets' => :'Array', + :'remediations' => :'Array', + :'acknowledgements' => :'Array', + :'revision_history' => :'Array' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability`. 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?(:'ordinal') + self.ordinal = attributes[:'ordinal'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'notes') + self.notes = attributes[:'notes'] + end + + if attributes.key?(:'cve') + self.cve = attributes[:'cve'] + end + + if attributes.key?(:'product_statuses') + if (value = attributes[:'product_statuses']).is_a?(Array) + self.product_statuses = value + end + end + + if attributes.key?(:'threats') + if (value = attributes[:'threats']).is_a?(Array) + self.threats = value + end + end + + if attributes.key?(:'cvss_score_sets') + if (value = attributes[:'cvss_score_sets']).is_a?(Array) + self.cvss_score_sets = value + end + end + + if attributes.key?(:'remediations') + if (value = attributes[:'remediations']).is_a?(Array) + self.remediations = value + end + end + + if attributes.key?(:'acknowledgements') + if (value = attributes[:'acknowledgements']).is_a?(Array) + self.acknowledgements = value + end + end + + if attributes.key?(:'revision_history') + if (value = attributes[:'revision_history']).is_a?(Array) + self.revision_history = 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 && + ordinal == o.ordinal && + title == o.title && + notes == o.notes && + cve == o.cve && + product_statuses == o.product_statuses && + threats == o.threats && + cvss_score_sets == o.cvss_score_sets && + remediations == o.remediations && + acknowledgements == o.acknowledgements && + revision_history == o.revision_history + 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 + [ordinal, title, notes, cve, product_statuses, threats, cvss_score_sets, remediations, acknowledgements, revision_history].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements.rb new file mode 100644 index 0000000..7a58e94 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements.rb @@ -0,0 +1,227 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements + attr_accessor :name + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'Name', + :'url' => :'URL' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'url' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements`. 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?(:'url') + self.url = attributes[:'url'] + 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 && + name == o.name && + url == o.url + 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, url].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files.rb new file mode 100644 index 0000000..b5a2a79 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files.rb @@ -0,0 +1,263 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles + attr_accessor :product_id + + attr_accessor :file_name + + attr_accessor :file_version + + attr_accessor :file_path + + attr_accessor :file_last_modified + + attr_accessor :file_architecture + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'product_id' => :'ProductId', + :'file_name' => :'FileName', + :'file_version' => :'FileVersion', + :'file_path' => :'FilePath', + :'file_last_modified' => :'FileLastModified', + :'file_architecture' => :'FileArchitecture' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'product_id' => :'String', + :'file_name' => :'String', + :'file_version' => :'String', + :'file_path' => :'String', + :'file_last_modified' => :'Time', + :'file_architecture' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles`. 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?(:'product_id') + self.product_id = attributes[:'product_id'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'file_version') + self.file_version = attributes[:'file_version'] + end + + if attributes.key?(:'file_path') + self.file_path = attributes[:'file_path'] + end + + if attributes.key?(:'file_last_modified') + self.file_last_modified = attributes[:'file_last_modified'] + end + + if attributes.key?(:'file_architecture') + self.file_architecture = attributes[:'file_architecture'] + 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 && + product_id == o.product_id && + file_name == o.file_name && + file_version == o.file_version && + file_path == o.file_path && + file_last_modified == o.file_last_modified && + file_architecture == o.file_architecture + 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 + [product_id, file_name, file_version, file_path, file_last_modified, file_architecture].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets.rb new file mode 100644 index 0000000..68fa2e2 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets.rb @@ -0,0 +1,245 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets + attr_accessor :base_score + + attr_accessor :temporal_score + + attr_accessor :vector + + attr_accessor :product_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'base_score' => :'BaseScore', + :'temporal_score' => :'TemporalScore', + :'vector' => :'Vector', + :'product_id' => :'ProductID' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'base_score' => :'Float', + :'temporal_score' => :'Float', + :'vector' => :'String', + :'product_id' => :'Float' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets`. 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?(:'base_score') + self.base_score = attributes[:'base_score'] + end + + if attributes.key?(:'temporal_score') + self.temporal_score = attributes[:'temporal_score'] + end + + if attributes.key?(:'vector') + self.vector = attributes[:'vector'] + end + + if attributes.key?(:'product_id') + self.product_id = attributes[:'product_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 && + base_score == o.base_score && + temporal_score == o.temporal_score && + vector == o.vector && + product_id == o.product_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 + [base_score, temporal_score, vector, product_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes.rb new file mode 100644 index 0000000..080820c --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes.rb @@ -0,0 +1,218 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes + attr_accessor :note + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'note' => :'Note' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'note' => :'CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes`. 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?(:'note') + self.note = attributes[:'note'] + 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 && + note == o.note + 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 + [note].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note.rb new file mode 100644 index 0000000..7135667 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note.rb @@ -0,0 +1,237 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + # has a string in ... + class CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote + attr_accessor :title + + attr_accessor :type + + attr_accessor :ordianl + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'Title', + :'type' => :'Type', + :'ordianl' => :'Ordianl' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'title' => :'String', + :'type' => :'String', + :'ordianl' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote`. 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?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'ordianl') + self.ordianl = attributes[:'ordianl'] + 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 && + title == o.title && + type == o.type && + ordianl == o.ordianl + 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 + [title, type, ordianl].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses.rb new file mode 100644 index 0000000..906be15 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses.rb @@ -0,0 +1,227 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses + attr_accessor :type + + attr_accessor :product_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'Type', + :'product_id' => :'ProductID' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'product_id' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'product_id') + self.product_id = attributes[:'product_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 && + type == o.type && + product_id == o.product_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 + [type, product_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations.rb new file mode 100644 index 0000000..048c502 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations.rb @@ -0,0 +1,285 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations + attr_accessor :type + + attr_accessor :description + + attr_accessor :url + + attr_accessor :supersedence + + attr_accessor :product_id + + attr_accessor :affected_files + + attr_accessor :restart_required + + attr_accessor :sub_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'Type', + :'description' => :'Description', + :'url' => :'URL', + :'supersedence' => :'Supersedence', + :'product_id' => :'ProductID', + :'affected_files' => :'AffectedFiles', + :'restart_required' => :'RestartRequired', + :'sub_type' => :'SubType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'description' => :'Integer', + :'url' => :'String', + :'supersedence' => :'String', + :'product_id' => :'Array', + :'affected_files' => :'Array', + :'restart_required' => :'String', + :'sub_type' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'supersedence') + self.supersedence = attributes[:'supersedence'] + end + + if attributes.key?(:'product_id') + if (value = attributes[:'product_id']).is_a?(Array) + self.product_id = value + end + end + + if attributes.key?(:'affected_files') + if (value = attributes[:'affected_files']).is_a?(Array) + self.affected_files = value + end + end + + if attributes.key?(:'restart_required') + self.restart_required = attributes[:'restart_required'] + end + + if attributes.key?(:'sub_type') + self.sub_type = attributes[:'sub_type'] + 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 && + type == o.type && + description == o.description && + url == o.url && + supersedence == o.supersedence && + product_id == o.product_id && + affected_files == o.affected_files && + restart_required == o.restart_required && + sub_type == o.sub_type + 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 + [type, description, url, supersedence, product_id, affected_files, restart_required, sub_type].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history.rb new file mode 100644 index 0000000..33c6e8b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history.rb @@ -0,0 +1,236 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory + attr_accessor :number + + attr_accessor :date + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'Number', + :'date' => :'Date', + :'description' => :'Description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'Float', + :'date' => :'Time', + :'description' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory`. 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?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + 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 && + number == o.number && + date == o.date && + description == o.description + 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 + [number, date, description].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat.rb new file mode 100644 index 0000000..9bf58c8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat.rb @@ -0,0 +1,236 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat + attr_accessor :type + + attr_accessor :description + + attr_accessor :product_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'Type', + :'description' => :'Description', + :'product_id' => :'ProductID' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'description' => :'String', + :'product_id' => :'String' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'product_id') + self.product_id = attributes[:'product_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 && + type == o.type && + description == o.description && + product_id == o.product_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 + [type, description, product_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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats.rb new file mode 100644 index 0000000..6c58ce5 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats.rb @@ -0,0 +1,218 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats + attr_accessor :threat + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'threat' => :'Threat' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'threat' => :'CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat' + } + 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats` 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 `OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats`. 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?(:'threat') + self.threat = attributes[:'threat'] + 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 && + threat == o.threat + 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 + [threat].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200.rb new file mode 100644 index 0000000..0773e73 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200.rb @@ -0,0 +1,230 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class UpdatesReturnTypes200 + attr_accessor :odata_context + + # array of files returned + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'odata_context' => :'@odata.context', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'odata_context' => :'String', + :'value' => :'Array' + } + 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 `OpenapiClient::UpdatesReturnTypes200` 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 `OpenapiClient::UpdatesReturnTypes200`. 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?(:'odata_context') + self.odata_context = attributes[:'odata_context'] + end + + if attributes.key?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = 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 && + odata_context == o.odata_context && + value == o.value + 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 + [odata_context, value].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200_value.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200_value.rb new file mode 100644 index 0000000..0257cb6 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/models/updates_return_types200_value.rb @@ -0,0 +1,272 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module OpenapiClient + class UpdatesReturnTypes200Value + attr_accessor :_alias + + attr_accessor :current_release_date + + attr_accessor :cvrf_url + + attr_accessor :document_title + + attr_accessor :id + + attr_accessor :initial_release_data + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_alias' => :'Alias', + :'current_release_date' => :'CurrentReleaseDate', + :'cvrf_url' => :'CvrfUrl', + :'document_title' => :'DocumentTitle', + :'id' => :'ID', + :'initial_release_data' => :'InitialReleaseData', + :'severity' => :'Severity' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_alias' => :'String', + :'current_release_date' => :'String', + :'cvrf_url' => :'String', + :'document_title' => :'String', + :'id' => :'String', + :'initial_release_data' => :'String', + :'severity' => :'String' + } + 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 `OpenapiClient::UpdatesReturnTypes200Value` 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 `OpenapiClient::UpdatesReturnTypes200Value`. 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?(:'_alias') + self._alias = attributes[:'_alias'] + end + + if attributes.key?(:'current_release_date') + self.current_release_date = attributes[:'current_release_date'] + end + + if attributes.key?(:'cvrf_url') + self.cvrf_url = attributes[:'cvrf_url'] + end + + if attributes.key?(:'document_title') + self.document_title = attributes[:'document_title'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'initial_release_data') + self.initial_release_data = attributes[:'initial_release_data'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 && + _alias == o._alias && + current_release_date == o.current_release_date && + cvrf_url == o.cvrf_url && + document_title == o.document_title && + id == o.id && + initial_release_data == o.initial_release_data && + severity == o.severity + 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 + [_alias, current_release_date, cvrf_url, document_title, id, initial_release_data, severity].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 attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif 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]])) + 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 :Time + Time.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 + # models (e.g. Pet) or oneOf + klass = OpenapiClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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/tools/microsoft/cvrf/ruby-client/lib/openapi_client/version.rb b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/version.rb new file mode 100644 index 0000000..784d0d7 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/lib/openapi_client/version.rb @@ -0,0 +1,15 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +module OpenapiClient + VERSION = '1.0.0' +end diff --git a/tools/microsoft/cvrf/ruby-client/openapi_client.gemspec b/tools/microsoft/cvrf/ruby-client/openapi_client.gemspec new file mode 100644 index 0000000..6fea285 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/openapi_client.gemspec @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- + +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +$:.push File.expand_path("../lib", __FILE__) +require "openapi_client/version" + +Gem::Specification.new do |s| + s.name = "openapi_client" + s.version = OpenapiClient::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["OpenAPI-Generator"] + s.email = [""] + s.homepage = "https://openapi-generator.tech" + s.summary = "Microsoft Security Updates API Ruby Gem" + s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" + s.license = "Unlicense" + s.required_ruby_version = ">= 2.4" + + s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' + + 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.executables = [] + s.require_paths = ["lib"] +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/api/default_api_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/api/default_api_spec.rb new file mode 100644 index 0000000..7cad3bf --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/api/default_api_spec.rb @@ -0,0 +1,73 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for OpenapiClient::DefaultApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'DefaultApi' do + before do + # run before each test + @api_instance = OpenapiClient::DefaultApi.new + end + + after do + # run after each test + end + + describe 'test an instance of DefaultApi' do + it 'should create an instance of DefaultApi' do + expect(@api_instance).to be_instance_of(OpenapiClient::DefaultApi) + end + end + + # unit tests for cvrf_id_get + # Gets a CVRF document by ID (ie: 2016-Aug) Note: to view the correct XML response, please change *$ref: '#/definitions/cvrfReturnTypes200'* to *$ref: '#/definitions/cvrfReturnTypes200_xml'* in the swagger.json or swagger.yaml file + # @param api_version + # @param api_key + # @param id + # @param [Hash] opts the optional parameters + # @return [CvrfReturnTypes200] + describe 'cvrf_id_get 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 updates_get + # Get all updates with a link to the CVRF document + # @param api_version + # @param api_key + # @param [Hash] opts the optional parameters + # @return [UpdatesReturnTypes200] + describe 'updates_get 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 updates_id_get + # Get updates with a link to the CVRF document for a particular ID. ID can be: * Update ID (ie: 2016-Aug) * Vulnerability ID (ie: CVE-2016-0128) * Year (ie: 2016) + # @param api_version + # @param api_key + # @param id + # @param [Hash] opts the optional parameters + # @return [UpdatesReturnTypes200] + describe 'updates_id_get 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/tools/microsoft/cvrf/ruby-client/spec/api_client_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/api_client_spec.rb new file mode 100644 index 0000000..28e63e7 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/api_client_spec.rb @@ -0,0 +1,226 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' + +describe OpenapiClient::ApiClient do + context 'initialization' do + context 'URL stuff' do + context 'host' do + it 'removes http from host' do + OpenapiClient.configure { |c| c.host = 'http://example.com' } + expect(OpenapiClient::Configuration.default.host).to eq('example.com') + end + + it 'removes https from host' do + OpenapiClient.configure { |c| c.host = 'https://wookiee.com' } + expect(OpenapiClient::ApiClient.default.config.host).to eq('wookiee.com') + end + + it 'removes trailing path from host' do + OpenapiClient.configure { |c| c.host = 'hobo.com/v4' } + expect(OpenapiClient::Configuration.default.host).to eq('hobo.com') + end + end + + context 'base_path' do + it "prepends a slash to base_path" do + OpenapiClient.configure { |c| c.base_path = 'v4/dog' } + expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog') + end + + it "doesn't prepend a slash if one is already there" do + OpenapiClient.configure { |c| c.base_path = '/v4/dog' } + expect(OpenapiClient::Configuration.default.base_path).to eq('/v4/dog') + end + + it "ends up as a blank string if nil" do + OpenapiClient.configure { |c| c.base_path = nil } + expect(OpenapiClient::Configuration.default.base_path).to eq('') + end + end + end + end + + describe 'params_encoding in #build_request' do + let(:config) { OpenapiClient::Configuration.new } + let(:api_client) { OpenapiClient::ApiClient.new(config) } + + it 'defaults to nil' do + expect(OpenapiClient::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) { OpenapiClient::Configuration.new } + let(:api_client) { OpenapiClient::ApiClient.new(config) } + + it 'defaults to 0' do + expect(OpenapiClient::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 = OpenapiClient::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 = OpenapiClient::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 = OpenapiClient::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 = OpenapiClient::ApiClient.new + # _model = OpenapiClient::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) { OpenapiClient::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 { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID') + end + end + + describe '#json_mime?' do + let(:api_client) { OpenapiClient::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) { OpenapiClient::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) { OpenapiClient::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) { OpenapiClient::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/tools/microsoft/cvrf/ruby-client/spec/configuration_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/configuration_spec.rb new file mode 100644 index 0000000..d9ea601 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/configuration_spec.rb @@ -0,0 +1,42 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' + +describe OpenapiClient::Configuration do + let(:config) { OpenapiClient::Configuration.default } + + before(:each) do + # uncomment below to setup host and base_path + # require 'URI' + # uri = URI.parse("https://api.msrc.microsoft.com") + # OpenapiClient.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("https://api.msrc.microsoft.com") + 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("https://api.msrc.microsoft.com") + end + end + end +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_acknowledgements_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_acknowledgements_spec.rb new file mode 100644 index 0000000..ddf1dce --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_acknowledgements_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200Acknowledgements +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200Acknowledgements do + let(:instance) { OpenapiClient::CvrfReturnTypes200Acknowledgements.new } + + describe 'test an instance of CvrfReturnTypes200Acknowledgements' do + it 'should create an instance of CvrfReturnTypes200Acknowledgements' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200Acknowledgements) + 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 "url"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_affected_files_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_affected_files_spec.rb new file mode 100644 index 0000000..de3aa83 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_affected_files_spec.rb @@ -0,0 +1,64 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200AffectedFiles +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200AffectedFiles do + let(:instance) { OpenapiClient::CvrfReturnTypes200AffectedFiles.new } + + describe 'test an instance of CvrfReturnTypes200AffectedFiles' do + it 'should create an instance of CvrfReturnTypes200AffectedFiles' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200AffectedFiles) + end + end + describe 'test attribute "product_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 "file_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 "file_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 "file_path"' 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_last_modified"' 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_architecture"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_cvss_score_sets_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_cvss_score_sets_spec.rb new file mode 100644 index 0000000..e48e316 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_cvss_score_sets_spec.rb @@ -0,0 +1,52 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200CVSSScoreSets +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200CVSSScoreSets do + let(:instance) { OpenapiClient::CvrfReturnTypes200CVSSScoreSets.new } + + describe 'test an instance of CvrfReturnTypes200CVSSScoreSets' do + it 'should create an instance of CvrfReturnTypes200CVSSScoreSets' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200CVSSScoreSets) + end + end + describe 'test attribute "base_score"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "temporal_score"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vector"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_notes_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_notes_spec.rb new file mode 100644 index 0000000..c1c5421 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_notes_spec.rb @@ -0,0 +1,58 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200DocumentNotes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200DocumentNotes do + let(:instance) { OpenapiClient::CvrfReturnTypes200DocumentNotes.new } + + describe 'test an instance of CvrfReturnTypes200DocumentNotes' do + it 'should create an instance of CvrfReturnTypes200DocumentNotes' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200DocumentNotes) + end + end + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "audience"' 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 + end + end + + describe 'test attribute "ordinal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_publisher_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_publisher_spec.rb new file mode 100644 index 0000000..244f570 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_publisher_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200DocumentPublisher +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200DocumentPublisher do + let(:instance) { OpenapiClient::CvrfReturnTypes200DocumentPublisher.new } + + describe 'test an instance of CvrfReturnTypes200DocumentPublisher' do + it 'should create an instance of CvrfReturnTypes200DocumentPublisher' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200DocumentPublisher) + end + end + describe 'test attribute "contact_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "issuing_athority"' 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 + end + end + +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_title_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_title_spec.rb new file mode 100644 index 0000000..dad8b90 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_title_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200DocumentTitle +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200DocumentTitle do + let(:instance) { OpenapiClient::CvrfReturnTypes200DocumentTitle.new } + + describe 'test an instance of CvrfReturnTypes200DocumentTitle' do + it 'should create an instance of CvrfReturnTypes200DocumentTitle' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200DocumentTitle) + end + end + describe 'test attribute "value"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_identification_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_identification_spec.rb new file mode 100644 index 0000000..250db46 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_identification_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification do + let(:instance) { OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification.new } + + describe 'test an instance of CvrfReturnTypes200DocumentTrackingIdentification' do + it 'should create an instance of CvrfReturnTypes200DocumentTrackingIdentification' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200DocumentTrackingIdentification) + end + end + describe 'test attribute "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 "_alias"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_revision_history_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_revision_history_spec.rb new file mode 100644 index 0000000..ca771ad --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_revision_history_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory do + let(:instance) { OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory.new } + + describe 'test an instance of CvrfReturnTypes200DocumentTrackingRevisionHistory' do + it 'should create an instance of CvrfReturnTypes200DocumentTrackingRevisionHistory' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200DocumentTrackingRevisionHistory) + end + end + describe 'test attribute "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 "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 + +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_spec.rb new file mode 100644 index 0000000..a466c3f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_document_tracking_spec.rb @@ -0,0 +1,64 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200DocumentTracking +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200DocumentTracking do + let(:instance) { OpenapiClient::CvrfReturnTypes200DocumentTracking.new } + + describe 'test an instance of CvrfReturnTypes200DocumentTracking' do + it 'should create an instance of CvrfReturnTypes200DocumentTracking' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200DocumentTracking) + end + end + describe 'test attribute "identification"' 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 + 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 "revision_history"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "initial_release_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_release_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_notes_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_notes_spec.rb new file mode 100644 index 0000000..3767253 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_notes_spec.rb @@ -0,0 +1,52 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200Notes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200Notes do + let(:instance) { OpenapiClient::CvrfReturnTypes200Notes.new } + + describe 'test an instance of CvrfReturnTypes200Notes' do + it 'should create an instance of CvrfReturnTypes200Notes' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200Notes) + end + end + describe 'test attribute "title"' 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 + end + end + + describe 'test attribute "ordinal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_statuses_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_statuses_spec.rb new file mode 100644 index 0000000..beecb15 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_statuses_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200ProductStatuses +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200ProductStatuses do + let(:instance) { OpenapiClient::CvrfReturnTypes200ProductStatuses.new } + + describe 'test an instance of CvrfReturnTypes200ProductStatuses' do + it 'should create an instance of CvrfReturnTypes200ProductStatuses' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200ProductStatuses) + end + end + describe 'test attribute "product_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 "type"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_branch_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_branch_spec.rb new file mode 100644 index 0000000..01db4b3 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_branch_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200ProductTreeBranch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200ProductTreeBranch do + let(:instance) { OpenapiClient::CvrfReturnTypes200ProductTreeBranch.new } + + describe 'test an instance of CvrfReturnTypes200ProductTreeBranch' do + it 'should create an instance of CvrfReturnTypes200ProductTreeBranch' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200ProductTreeBranch) + end + end + describe 'test attribute "items"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items1_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items1_spec.rb new file mode 100644 index 0000000..ad0a6db --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items1_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200ProductTreeItems1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200ProductTreeItems1 do + let(:instance) { OpenapiClient::CvrfReturnTypes200ProductTreeItems1.new } + + describe 'test an instance of CvrfReturnTypes200ProductTreeItems1' do + it 'should create an instance of CvrfReturnTypes200ProductTreeItems1' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200ProductTreeItems1) + end + end + describe 'test attribute "items"' 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 + 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 + +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items_spec.rb new file mode 100644 index 0000000..9ac959b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_items_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200ProductTreeItems +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200ProductTreeItems do + let(:instance) { OpenapiClient::CvrfReturnTypes200ProductTreeItems.new } + + describe 'test an instance of CvrfReturnTypes200ProductTreeItems' do + it 'should create an instance of CvrfReturnTypes200ProductTreeItems' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200ProductTreeItems) + end + end + describe 'test attribute "product_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 "value"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_spec.rb new file mode 100644 index 0000000..0cef470 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_product_tree_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200ProductTree +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200ProductTree do + let(:instance) { OpenapiClient::CvrfReturnTypes200ProductTree.new } + + describe 'test an instance of CvrfReturnTypes200ProductTree' do + it 'should create an instance of CvrfReturnTypes200ProductTree' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200ProductTree) + end + end + describe 'test attribute "branch"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "full_product_name"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_remediations_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_remediations_spec.rb new file mode 100644 index 0000000..a5f74f9 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_remediations_spec.rb @@ -0,0 +1,82 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200Remediations +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200Remediations do + let(:instance) { OpenapiClient::CvrfReturnTypes200Remediations.new } + + describe 'test an instance of CvrfReturnTypes200Remediations' do + it 'should create an instance of CvrfReturnTypes200Remediations' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200Remediations) + 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 "url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supersedence"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_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 "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 "date_specified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "affected_files"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sub_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 "restart_required"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_spec.rb new file mode 100644 index 0000000..15ec92c --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_spec.rb @@ -0,0 +1,70 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200 do + let(:instance) { OpenapiClient::CvrfReturnTypes200.new } + + describe 'test an instance of CvrfReturnTypes200' do + it 'should create an instance of CvrfReturnTypes200' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200) + end + end + describe 'test attribute "document_title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "document_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 "document_publisher"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "document_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 "document_notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_tree"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vulnerability"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_threats_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_threats_spec.rb new file mode 100644 index 0000000..8d27fae --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_threats_spec.rb @@ -0,0 +1,52 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200Threats +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200Threats do + let(:instance) { OpenapiClient::CvrfReturnTypes200Threats.new } + + describe 'test an instance of CvrfReturnTypes200Threats' do + it 'should create an instance of CvrfReturnTypes200Threats' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200Threats) + 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 "product_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 "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 "date_specified"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_vulnerability_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_vulnerability_spec.rb new file mode 100644 index 0000000..dd877ff --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_vulnerability_spec.rb @@ -0,0 +1,100 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200Vulnerability +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200Vulnerability do + let(:instance) { OpenapiClient::CvrfReturnTypes200Vulnerability.new } + + describe 'test an instance of CvrfReturnTypes200Vulnerability' do + it 'should create an instance of CvrfReturnTypes200Vulnerability' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200Vulnerability) + end + end + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "discovery_date_specified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "release_date_specified"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cve"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_statuses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "threats"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cvss_score_sets"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "remediations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "acknowledgements"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ordinal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "revision_history"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_notes_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_notes_spec.rb new file mode 100644 index 0000000..770bfc8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_notes_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocDocumentNotes' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocDocumentNotes' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentNotes) + end + end + describe 'test attribute "note"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_publisher_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_publisher_spec.rb new file mode 100644 index 0000000..16053d8 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_publisher_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocDocumentPublisher' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocDocumentPublisher' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentPublisher) + 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 + end + end + + describe 'test attribute "contact_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "issuing_authority"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification_spec.rb new file mode 100644 index 0000000..3bed306 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_identification_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingIdentification) + end + end + describe 'test attribute "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 "_alias"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision_spec.rb new file mode 100644 index 0000000..bf40e82 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_revision_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistoryRevision) + end + end + describe 'test attribute "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 "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 + +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_spec.rb new file mode 100644 index 0000000..7e3c1cb --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_revision_history_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTrackingRevisionHistory) + end + end + describe 'test attribute "revision"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_spec.rb new file mode 100644 index 0000000..69b2cea --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_document_tracking_spec.rb @@ -0,0 +1,64 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocDocumentTracking' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocDocumentTracking' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocDocumentTracking) + end + end + describe 'test attribute "identification"' 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 + 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 "revision_history"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "initial_release_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_release_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_note_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_note_spec.rb new file mode 100644 index 0000000..d9a0bea --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_note_spec.rb @@ -0,0 +1,52 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocNote' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocNote' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocNote) + end + end + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "audience"' 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 + end + end + + describe 'test attribute "ordinal"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1_spec.rb new file mode 100644 index 0000000..e50817f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch1_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1 do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocProductTreeBranch1' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocProductTreeBranch1' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch1) + 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 + 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 "branch"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch_spec.rb new file mode 100644 index 0000000..a00ee56 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_branch_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocProductTreeBranch' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocProductTreeBranch' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeBranch) + 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 + 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 "full_product_name"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1_spec.rb new file mode 100644 index 0000000..1ce05ad --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name1_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1 do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName1) + end + end + describe 'test attribute "product_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name_spec.rb new file mode 100644 index 0000000..28c567d --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_full_product_name_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTreeFullProductName) + end + end + describe 'test attribute "product_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_spec.rb new file mode 100644 index 0000000..6a5670f --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_product_tree_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocProductTree' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocProductTree' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocProductTree) + end + end + describe 'test attribute "branch"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "full_product_name"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_spec.rb new file mode 100644 index 0000000..d275b54 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_spec.rb @@ -0,0 +1,70 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdoc +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdoc do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdoc.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdoc' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdoc' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdoc) + end + end + describe 'test attribute "document_title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "document_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 "document_publisher"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "document_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 "document_notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_tree"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vulnerability"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements_spec.rb new file mode 100644 index 0000000..46f0d5e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_acknowledgements_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAcknowledgements) + 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 "url"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files_spec.rb new file mode 100644 index 0000000..309f8a0 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_affected_files_spec.rb @@ -0,0 +1,64 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityAffectedFiles) + end + end + describe 'test attribute "product_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 "file_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 "file_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 "file_path"' 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_last_modified"' 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_architecture"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets_spec.rb new file mode 100644 index 0000000..041d381 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_cvss_score_sets_spec.rb @@ -0,0 +1,52 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityCVSSScoreSets) + end + end + describe 'test attribute "base_score"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "temporal_score"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "vector"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note_spec.rb new file mode 100644 index 0000000..6065c4b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_note_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotesNote) + end + end + describe 'test attribute "title"' 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 + end + end + + describe 'test attribute "ordianl"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_spec.rb new file mode 100644 index 0000000..370fe5a --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_notes_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityNotes) + end + end + describe 'test attribute "note"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses_spec.rb new file mode 100644 index 0000000..10738ea --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_product_statuses_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityProductStatuses) + 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 + end + end + + describe 'test attribute "product_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations_spec.rb new file mode 100644 index 0000000..f7e98de --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_remediations_spec.rb @@ -0,0 +1,76 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRemediations) + 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 + 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 "url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "supersedence"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_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 "affected_files"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "restart_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 "sub_type"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history_spec.rb new file mode 100644 index 0000000..06c7599 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_revision_history_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityRevisionHistory) + end + end + describe 'test attribute "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 "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 + +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_spec.rb new file mode 100644 index 0000000..bd9f87a --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_spec.rb @@ -0,0 +1,88 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerability' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerability' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerability) + end + end + describe 'test attribute "ordinal"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cve"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "product_statuses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "threats"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "cvss_score_sets"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "remediations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "acknowledgements"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "revision_history"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat_spec.rb new file mode 100644 index 0000000..be28398 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threat_spec.rb @@ -0,0 +1,46 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreat) + 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 + 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 "product_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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats_spec.rb new file mode 100644 index 0000000..5d1e9dd --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_cvrfdoc_vulnerability_threats_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats do + let(:instance) { OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats.new } + + describe 'test an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats' do + it 'should create an instance of CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200XmlCvrfdocVulnerabilityThreats) + end + end + describe 'test attribute "threat"' 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/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_spec.rb new file mode 100644 index 0000000..38a9b2e --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/cvrf_return_types200_xml_spec.rb @@ -0,0 +1,34 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::CvrfReturnTypes200Xml +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::CvrfReturnTypes200Xml do + let(:instance) { OpenapiClient::CvrfReturnTypes200Xml.new } + + describe 'test an instance of CvrfReturnTypes200Xml' do + it 'should create an instance of CvrfReturnTypes200Xml' do + expect(instance).to be_instance_of(OpenapiClient::CvrfReturnTypes200Xml) + end + end + describe 'test attribute "cvrfdoc"' 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/tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_spec.rb new file mode 100644 index 0000000..01aa624 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_spec.rb @@ -0,0 +1,40 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::UpdatesReturnTypes200 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::UpdatesReturnTypes200 do + let(:instance) { OpenapiClient::UpdatesReturnTypes200.new } + + describe 'test an instance of UpdatesReturnTypes200' do + it 'should create an instance of UpdatesReturnTypes200' do + expect(instance).to be_instance_of(OpenapiClient::UpdatesReturnTypes200) + end + end + describe 'test attribute "odata_context"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' 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/tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_value_spec.rb b/tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_value_spec.rb new file mode 100644 index 0000000..e2f3d17 --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/models/updates_return_types200_value_spec.rb @@ -0,0 +1,70 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OpenapiClient::UpdatesReturnTypes200Value +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OpenapiClient::UpdatesReturnTypes200Value do + let(:instance) { OpenapiClient::UpdatesReturnTypes200Value.new } + + describe 'test an instance of UpdatesReturnTypes200Value' do + it 'should create an instance of UpdatesReturnTypes200Value' do + expect(instance).to be_instance_of(OpenapiClient::UpdatesReturnTypes200Value) + end + end + describe 'test attribute "_alias"' 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_release_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 "cvrf_url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "document_title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "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 "initial_release_data"' 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 + end + end + +end diff --git a/tools/microsoft/cvrf/ruby-client/spec/spec_helper.rb b/tools/microsoft/cvrf/ruby-client/spec/spec_helper.rb new file mode 100644 index 0000000..279929b --- /dev/null +++ b/tools/microsoft/cvrf/ruby-client/spec/spec_helper.rb @@ -0,0 +1,111 @@ +=begin +#Microsoft Security Updates API + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.2.0-SNAPSHOT + +=end + +# load the gem +require 'openapi_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