diff --git a/src/clients/ctm_api_client/README.md b/src/clients/ctm_api_client/README.md deleted file mode 100644 index fa4d8fc..0000000 --- a/src/clients/ctm_api_client/README.md +++ /dev/null @@ -1,587 +0,0 @@ -# swagger-client -Provides access to BMC Control-M Services - -This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 9.20.215 -- Package version: 1.0.0 -- Build package: io.swagger.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 2.7 and 3.4+ - -## Installation & Usage -### pip install - -If the python package is hosted on Github, you can install directly from Github - -```sh -pip install git+https://github.com//.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com//.git`) - -Then import the package: -```python -import ctm_api_client -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import ctm_api_client -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python -from __future__ import print_function -import time -import ctm_api_client -from clients.ctm_api_client.rest import ApiException -from pprint import pprint - -# Configure API key authorization: Bearer -configuration = ctm_api_client.Configuration() -configuration.api_key['Authorization'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['Authorization'] = 'Bearer' - -# create an instance of the API class -api_instance = ctm_api_client.ArchiveApi(ctm_api_client.ApiClient(configuration)) -job_id = 'job_id_example' # str | The job ID -run_no = 789 # int | The execution number in case of multiple executions - -try: - # Get job log - api_response = api_instance.get_archive_job_log(job_id, run_no) - pprint(api_response) -except ApiException as e: - print("Exception when calling ArchiveApi->get_archive_job_log: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ArchiveApi* | [**get_archive_job_log**](docs/ArchiveApi.md#get_archive_job_log) | **GET** /archive/{jobId}/log | Get job log -*ArchiveApi* | [**get_archive_job_output**](docs/ArchiveApi.md#get_archive_job_output) | **GET** /archive/{jobId}/output | Get job output -*ArchiveApi* | [**search_jobs**](docs/ArchiveApi.md#search_jobs) | **GET** /archive/search | Search jobs in Archive -*BuildApi* | [**build_file**](docs/BuildApi.md#build_file) | **POST** /build | Compile definitions file to check its validity -*ConfigApi* | [**add_agent**](docs/ConfigApi.md#add_agent) | **POST** /config/server/{server}/agent | add agent to Server -*ConfigApi* | [**add_archive_rule**](docs/ConfigApi.md#add_archive_rule) | **POST** /config/archive/rule | Add Workload Archiving rule -*ConfigApi* | [**add_external_user**](docs/ConfigApi.md#add_external_user) | **POST** /config/mft/externaluser | Add and external user -*ConfigApi* | [**add_external_user_or_user_group_to_mft_folder**](docs/ConfigApi.md#add_external_user_or_user_group_to_mft_folder) | **POST** /config/mft/virtualfolder/{folderName}/user/{userOrGroup} | Add external user or user groups to virtual folder external users list. -*ConfigApi* | [**add_gateway**](docs/ConfigApi.md#add_gateway) | **POST** /config/mft/gateway | add gateway. -*ConfigApi* | [**add_host_to_hostgroup**](docs/ConfigApi.md#add_host_to_hostgroup) | **POST** /config/server/{server}/hostgroup/{hostgroup}/agent | add agent to hostgroup -*ConfigApi* | [**add_hub_to_cluster**](docs/ConfigApi.md#add_hub_to_cluster) | **POST** /config/mft/cluster/hub/{agentname} | add hub to cluster. -*ConfigApi* | [**add_mft_folder**](docs/ConfigApi.md#add_mft_folder) | **POST** /config/mft/virtualfolder | Add virtual folder -*ConfigApi* | [**add_mft_user_group**](docs/ConfigApi.md#add_mft_user_group) | **POST** /config/mft/usergroup | Add user group. -*ConfigApi* | [**add_pgp_template**](docs/ConfigApi.md#add_pgp_template) | **POST** /config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName} | Add PGP Template -*ConfigApi* | [**add_remote_host**](docs/ConfigApi.md#add_remote_host) | **POST** /config/server/{server}/remotehost | add remote host to Server -*ConfigApi* | [**add_role**](docs/ConfigApi.md#add_role) | **POST** /config/authorization/role | Add Authorization Role -*ConfigApi* | [**add_role_to_ldap_group**](docs/ConfigApi.md#add_role_to_ldap_group) | **POST** /config/authorization/ldap/{ldapgroup}/role/{role} | Add a role to LDAP group -*ConfigApi* | [**add_role_to_user**](docs/ConfigApi.md#add_role_to_user) | **POST** /config/authorization/user/{user}/role/{role} | Add a role to user -*ConfigApi* | [**add_secret**](docs/ConfigApi.md#add_secret) | **POST** /config/secret | Add a new secret -*ConfigApi* | [**add_server**](docs/ConfigApi.md#add_server) | **POST** /config/server | add server to the system -*ConfigApi* | [**add_user**](docs/ConfigApi.md#add_user) | **POST** /config/authorization/user | Add user -*ConfigApi* | [**add_zos_template**](docs/ConfigApi.md#add_zos_template) | **POST** /config/server/{server}/agent/{agent}/mft/zostemplate/{templateName} | Add z/OS Template -*ConfigApi* | [**authorize_mft_ssh_cluster**](docs/ConfigApi.md#authorize_mft_ssh_cluster) | **POST** /config/server/{server}/agent/{agent}/mft/ssh/cluster/{clusterName} | Authorize SSH Cluster -*ConfigApi* | [**authorize_mft_ssh_host**](docs/ConfigApi.md#authorize_mft_ssh_host) | **POST** /config/server/{server}/agent/{agent}/mft/ssh/host/{hostname} | Authorize SSH Host -*ConfigApi* | [**authorize_ssh_known_remotehost**](docs/ConfigApi.md#authorize_ssh_known_remotehost) | **POST** /config/server/{server}/remotehost/{remotehost}/authorize | Authorize -*ConfigApi* | [**change_user_password**](docs/ConfigApi.md#change_user_password) | **POST** /config/user/{user}/password/adminUpdate | Change user password -*ConfigApi* | [**create_agent_certificate_signing_request**](docs/ConfigApi.md#create_agent_certificate_signing_request) | **POST** /config/server/{server}/agent/{agent}/csr | Create certificate signing request (CSR). -*ConfigApi* | [**create_run_as_user**](docs/ConfigApi.md#create_run_as_user) | **POST** /config/server/{server}/runasuser | Add a new Run-as user -*ConfigApi* | [**delete_agent**](docs/ConfigApi.md#delete_agent) | **DELETE** /config/server/{server}/agent/{agent} | delete an agent from Server -*ConfigApi* | [**delete_archive_rule**](docs/ConfigApi.md#delete_archive_rule) | **DELETE** /config/archive/rule/{ruleName} | Delete Workload Archiving rule -*ConfigApi* | [**delete_authorization_role**](docs/ConfigApi.md#delete_authorization_role) | **DELETE** /config/authorization/role/{role} | Delete Authorization Role -*ConfigApi* | [**delete_external_user**](docs/ConfigApi.md#delete_external_user) | **DELETE** /config/mft/externaluser/{username} | Delete an external user -*ConfigApi* | [**delete_external_user_or_user_group_from_mft_folder**](docs/ConfigApi.md#delete_external_user_or_user_group_from_mft_folder) | **DELETE** /config/mft/virtualfolder/{folderName}/user/{userOrGroup} | Remove an external user or user group from an existing virtual folder in MFT. -*ConfigApi* | [**delete_host_from_group**](docs/ConfigApi.md#delete_host_from_group) | **DELETE** /config/server/{server}/hostgroup/{hostgroup}/agent/{host} | delete an agent from a hostgroup -*ConfigApi* | [**delete_host_group**](docs/ConfigApi.md#delete_host_group) | **DELETE** /config/server/{server}/hostgroup/{hostgroup} | delete host group -*ConfigApi* | [**delete_mft_folder**](docs/ConfigApi.md#delete_mft_folder) | **DELETE** /config/mft/virtualfolder/{folderName} | Delete a virtual folder. -*ConfigApi* | [**delete_mft_user_group**](docs/ConfigApi.md#delete_mft_user_group) | **DELETE** /config/mft/usergroup/{name} | Delete user group. -*ConfigApi* | [**delete_pgp_template**](docs/ConfigApi.md#delete_pgp_template) | **DELETE** /config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName} | Delete PGP Template -*ConfigApi* | [**delete_remote_host**](docs/ConfigApi.md#delete_remote_host) | **DELETE** /config/server/{server}/remotehost/{remotehost} | delete a remote host from Server -*ConfigApi* | [**delete_role_from_ldap_group**](docs/ConfigApi.md#delete_role_from_ldap_group) | **DELETE** /config/authorization/ldap/{ldapgroup}/role/{role} | Delete a role from LDAP group -*ConfigApi* | [**delete_run_as_user**](docs/ConfigApi.md#delete_run_as_user) | **DELETE** /config/server/{server}/runasuser/{agent}/{user} | delete Run-as user -*ConfigApi* | [**delete_secret**](docs/ConfigApi.md#delete_secret) | **DELETE** /config/secret/{name} | Delete an existing secret -*ConfigApi* | [**delete_user**](docs/ConfigApi.md#delete_user) | **DELETE** /config/authorization/user/{user} | Delete user -*ConfigApi* | [**delete_zos_template**](docs/ConfigApi.md#delete_zos_template) | **DELETE** /config/server/{server}/agent/{agent}/mft/zostemplate/{templateName} | Delete z/OS Template -*ConfigApi* | [**deploy_agent_certificate**](docs/ConfigApi.md#deploy_agent_certificate) | **POST** /config/server/{server}/agent/{agent}/crt | Deploy certificate (CRT). -*ConfigApi* | [**disable_agent**](docs/ConfigApi.md#disable_agent) | **POST** /config/server/{server}/agent/{agent}/disable | disable agent from the Server -*ConfigApi* | [**enable_agent**](docs/ConfigApi.md#enable_agent) | **POST** /config/server/{server}/agent/{agent}/enable | enable agent from the Server -*ConfigApi* | [**failover**](docs/ConfigApi.md#failover) | **PUT** /config/server/{server}/failover | Perform Manual Failover on a specified Server -*ConfigApi* | [**generate_mft_rsa_ssh_key**](docs/ConfigApi.md#generate_mft_rsa_ssh_key) | **POST** /config/server/{server}/agent/{agent}/mft/ssh/key | Generate RSA SSH Key -*ConfigApi* | [**get_agent_certificate_expiration_date**](docs/ConfigApi.md#get_agent_certificate_expiration_date) | **GET** /config/server/{server}/agent/{agent}/crt/expiration | Get certificate expiration date. -*ConfigApi* | [**get_agent_parameters**](docs/ConfigApi.md#get_agent_parameters) | **GET** /config/server/{server}/agent/{agent}/params | get agent parameters -*ConfigApi* | [**get_agents**](docs/ConfigApi.md#get_agents) | **GET** /config/server/{server}/agents | get Server agents -*ConfigApi* | [**get_all_archive_rules**](docs/ConfigApi.md#get_all_archive_rules) | **GET** /config/archive/rules | Get all Workload Archiving rules -*ConfigApi* | [**get_all_authorization_roles**](docs/ConfigApi.md#get_all_authorization_roles) | **GET** /config/authorization/roles | Get Authorization Roles -*ConfigApi* | [**get_all_organization_groups**](docs/ConfigApi.md#get_all_organization_groups) | **GET** /config/authorization/organizationgroups | Get All organization groups -*ConfigApi* | [**get_all_roles_associated_with_organization_group**](docs/ConfigApi.md#get_all_roles_associated_with_organization_group) | **GET** /config/authorization/organizationgroup/{organizationgroup}/roles | Get Authorization Roles associated with an organization group -*ConfigApi* | [**get_all_users**](docs/ConfigApi.md#get_all_users) | **GET** /config/authorization/users | Get users -*ConfigApi* | [**get_archive_statistics**](docs/ConfigApi.md#get_archive_statistics) | **GET** /config/archive/statistics | Get Workload Archiving statistics -*ConfigApi* | [**get_external_user_authorized_folders**](docs/ConfigApi.md#get_external_user_authorized_folders) | **GET** /config/mft/externaluser/{name}/virtualfolders | Get MFT external user authorized folders -*ConfigApi* | [**get_external_users**](docs/ConfigApi.md#get_external_users) | **GET** /config/mft/externalusers | Get MFT external users that match the search criteria. -*ConfigApi* | [**get_fts_settings**](docs/ConfigApi.md#get_fts_settings) | **GET** /config/server/{server}/agent/{agent}/mft/fts/settings | Get File Transfer Server (FTS) configuration data. -*ConfigApi* | [**get_hostgroups**](docs/ConfigApi.md#get_hostgroups) | **GET** /config/server/{server}/hostgroups | get Server hostgroups -*ConfigApi* | [**get_hosts_in_group**](docs/ConfigApi.md#get_hosts_in_group) | **GET** /config/server/{server}/hostgroup/{hostgroup}/agents | get hostgroup agents -*ConfigApi* | [**get_hub_status_details**](docs/ConfigApi.md#get_hub_status_details) | **GET** /config/mft/hub/{nodeId}/status | Get hub status. -*ConfigApi* | [**get_mft_configuration**](docs/ConfigApi.md#get_mft_configuration) | **GET** /config/server/{server}/agent/{agent}/mft/configuration | Get MFT Configuration -*ConfigApi* | [**get_mft_folders**](docs/ConfigApi.md#get_mft_folders) | **GET** /config/mft/virtualfolders | Get MFT virtual folders that match the search criteria. -*ConfigApi* | [**get_mft_gateways**](docs/ConfigApi.md#get_mft_gateways) | **GET** /config/mft/gateways | Get MFT gateways -*ConfigApi* | [**get_mft_user_groups**](docs/ConfigApi.md#get_mft_user_groups) | **GET** /config/mft/usergroups | Get all user groups that match the search criteria. -*ConfigApi* | [**get_pgp_templates**](docs/ConfigApi.md#get_pgp_templates) | **GET** /config/server/{server}/agent/{agent}/mft/pgptemplates | Get PGP Templates -*ConfigApi* | [**get_remote_host_properties**](docs/ConfigApi.md#get_remote_host_properties) | **GET** /config/server/{server}/remotehost/{remotehost} | get a remote host configuration from Server -*ConfigApi* | [**get_remote_hosts**](docs/ConfigApi.md#get_remote_hosts) | **GET** /config/server/{server}/remotehosts | get Server remote hosts -*ConfigApi* | [**get_role**](docs/ConfigApi.md#get_role) | **GET** /config/authorization/role/{role} | Get Authorization Role -*ConfigApi* | [**get_role_associates**](docs/ConfigApi.md#get_role_associates) | **GET** /config/authorization/role/{role}/associates | Get all authorization entities associated with role -*ConfigApi* | [**get_run_as_user**](docs/ConfigApi.md#get_run_as_user) | **GET** /config/server/{server}/runasuser/{agent}/{user} | Get Run-as user -*ConfigApi* | [**get_run_as_users_list**](docs/ConfigApi.md#get_run_as_users_list) | **GET** /config/server/{server}/runasusers | Get Run-as user list that match the requested search criteria. -*ConfigApi* | [**get_server_parameters**](docs/ConfigApi.md#get_server_parameters) | **GET** /config/server/{server}/params | get Server parameters -*ConfigApi* | [**get_servers**](docs/ConfigApi.md#get_servers) | **GET** /config/servers | get all the Servers name and hostname in the system -*ConfigApi* | [**get_user**](docs/ConfigApi.md#get_user) | **GET** /config/authorization/user/{user} | Get user -*ConfigApi* | [**get_user_effective_rights**](docs/ConfigApi.md#get_user_effective_rights) | **GET** /config/authorization/user/effectiveRights | Get user real effective authorizations -*ConfigApi* | [**get_workflow_insights_status**](docs/ConfigApi.md#get_workflow_insights_status) | **GET** /config/workflowinsights/status | get Workflow Insights status -*ConfigApi* | [**get_zos_templates**](docs/ConfigApi.md#get_zos_templates) | **GET** /config/server/{server}/agent/{agent}/mft/zostemplates | Get z/OS Templates -*ConfigApi* | [**list_secrets**](docs/ConfigApi.md#list_secrets) | **GET** /config/secrets | Get list of secret names -*ConfigApi* | [**ping_agent**](docs/ConfigApi.md#ping_agent) | **POST** /config/server/{server}/agent/{agent}/ping | ping to the agent in the Server -*ConfigApi* | [**recycle_item**](docs/ConfigApi.md#recycle_item) | **POST** /config/item/{id}/recycle | recycle item -*ConfigApi* | [**remove_controlm_server**](docs/ConfigApi.md#remove_controlm_server) | **DELETE** /config/server/{server} | Delete Server -*ConfigApi* | [**remove_gateway**](docs/ConfigApi.md#remove_gateway) | **DELETE** /config/mft/gateway/{gatewayName} | remove gateway. -*ConfigApi* | [**remove_hub_from_cluster**](docs/ConfigApi.md#remove_hub_from_cluster) | **DELETE** /config/mft/cluster/hub/{agentname} | remove hub from cluster. -*ConfigApi* | [**remove_role_from_user**](docs/ConfigApi.md#remove_role_from_user) | **DELETE** /config/authorization/user/{user}/role/{role} | Remove a role from a user -*ConfigApi* | [**send_archive_cleanup_request**](docs/ConfigApi.md#send_archive_cleanup_request) | **DELETE** /config/archive/cleanup | Deletes data (jobs including outputs and logs) from the Workload Archiving database. -*ConfigApi* | [**set_agent_parameter**](docs/ConfigApi.md#set_agent_parameter) | **POST** /config/server/{server}/agent/{agent}/param/{name} | set agent parameter -*ConfigApi* | [**set_system_param**](docs/ConfigApi.md#set_system_param) | **POST** /config/em/param/{name} | set value of a an em system parameter -*ConfigApi* | [**setasprimary**](docs/ConfigApi.md#setasprimary) | **PUT** /config/server/{server}/setasprimary | Set secondary server as Primary on a specified Server -*ConfigApi* | [**test_run_as_user**](docs/ConfigApi.md#test_run_as_user) | **POST** /config/server/{server}/runasuser/{agent}/{user}/test | Test existed Run-as user -*ConfigApi* | [**update_archive_rule**](docs/ConfigApi.md#update_archive_rule) | **POST** /config/archive/rule/{ruleName} | Edit Workload Archiving rule -*ConfigApi* | [**update_external_user**](docs/ConfigApi.md#update_external_user) | **POST** /config/mft/externaluser/{username} | Update an external user -*ConfigApi* | [**update_fts_settings**](docs/ConfigApi.md#update_fts_settings) | **POST** /config/server/{server}/agent/{agent}/mft/fts/settings | Update File Transfer Server (FTS) configuration data. -*ConfigApi* | [**update_hosts_in_hostgroup**](docs/ConfigApi.md#update_hosts_in_hostgroup) | **POST** /config/server/{server}/hostgroup/{hostgroup} | update agents in hostgroup. -*ConfigApi* | [**update_mft_configuration**](docs/ConfigApi.md#update_mft_configuration) | **POST** /config/server/{server}/agent/{agent}/mft/configuration | Update MFT Configuration -*ConfigApi* | [**update_mft_folder**](docs/ConfigApi.md#update_mft_folder) | **POST** /config/mft/virtualfolder/{folderName} | Update an existing virtual folder in MFT. -*ConfigApi* | [**update_mft_user_group**](docs/ConfigApi.md#update_mft_user_group) | **POST** /config/mft/usergroup/{name} | Update user group. -*ConfigApi* | [**update_pgp_template**](docs/ConfigApi.md#update_pgp_template) | **PUT** /config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName} | Update PGP Template -*ConfigApi* | [**update_role**](docs/ConfigApi.md#update_role) | **POST** /config/authorization/role/{role} | Update Authorization Role -*ConfigApi* | [**update_run_as_user**](docs/ConfigApi.md#update_run_as_user) | **POST** /config/server/{server}/runasuser/{agent}/{user} | Update Run-as user -*ConfigApi* | [**update_secret**](docs/ConfigApi.md#update_secret) | **POST** /config/secret/{name} | Update an existing secret -*ConfigApi* | [**update_user**](docs/ConfigApi.md#update_user) | **POST** /config/authorization/user/{user} | Update user -*ConfigApi* | [**update_zos_template**](docs/ConfigApi.md#update_zos_template) | **PUT** /config/server/{server}/agent/{agent}/mft/zostemplate/{templateName} | Update z/OS Template -*DeployApi* | [**delete_calendar**](docs/DeployApi.md#delete_calendar) | **DELETE** /deploy/calendar/{calendarName} | delete a calendar -*DeployApi* | [**delete_connection_profile**](docs/DeployApi.md#delete_connection_profile) | **DELETE** /deploy/connectionprofile/{server}/{agent}/{type}/{name} | Delete Local Connection Profile -*DeployApi* | [**delete_folder**](docs/DeployApi.md#delete_folder) | **DELETE** /deploy/folder/{controlM}/{folderName} | delete a folder -*DeployApi* | [**delete_local_connection_profile**](docs/DeployApi.md#delete_local_connection_profile) | **DELETE** /deploy/connectionprofile/local/{server}/{agent}/{type}/{name} | Delete Local Connection Profile -*DeployApi* | [**delete_shared_connection_profile**](docs/DeployApi.md#delete_shared_connection_profile) | **DELETE** /deploy/connectionprofile/centralized/{type}/{name} | Delete centralized Connection Profile -*DeployApi* | [**deploy_ai_jobtype**](docs/DeployApi.md#deploy_ai_jobtype) | **POST** /deploy/ai/jobtype | Deploy of Application Integrator job type. -*DeployApi* | [**deploy_file**](docs/DeployApi.md#deploy_file) | **POST** /deploy | Deploy definitions file -*DeployApi* | [**deploy_jobtype_file**](docs/DeployApi.md#deploy_jobtype_file) | **POST** /deploy/jobtype | Deploy jobtype -*DeployApi* | [**get_connection_profiles_deployment_status**](docs/DeployApi.md#get_connection_profiles_deployment_status) | **GET** /deploy/connectionprofile/centralized/deploymentstatus/{type}/{name} | Get deployed connection profiles deployment status -*DeployApi* | [**get_deployed_ai_jobtypes**](docs/DeployApi.md#get_deployed_ai_jobtypes) | **GET** /deploy/ai/jobtypes | Get Application Integrator job types -*DeployApi* | [**get_deployed_calendars**](docs/DeployApi.md#get_deployed_calendars) | **GET** /deploy/calendars | Get deployed calendars that match the search criteria. -*DeployApi* | [**get_deployed_connection_profiles**](docs/DeployApi.md#get_deployed_connection_profiles) | **GET** /deploy/connectionprofiles | Get local deployed connection profiles -*DeployApi* | [**get_deployed_connection_profiles_status**](docs/DeployApi.md#get_deployed_connection_profiles_status) | **GET** /deploy/connectionprofiles/centralized/status | Get deployed connection profiles status -*DeployApi* | [**get_deployed_folders_new**](docs/DeployApi.md#get_deployed_folders_new) | **GET** /deploy/jobs | Get deployed jobs that match the search criteria. -*DeployApi* | [**get_local_connection_profiles**](docs/DeployApi.md#get_local_connection_profiles) | **GET** /deploy/connectionprofiles/local | Get local deployed connection profiles -*DeployApi* | [**get_shared_connection_profiles**](docs/DeployApi.md#get_shared_connection_profiles) | **GET** /deploy/connectionprofiles/centralized | Get centralized deployed connection profile -*DeployApi* | [**get_site_standard_field_restrictions**](docs/DeployApi.md#get_site_standard_field_restrictions) | **GET** /deploy/sitestandard/{standardName}/fieldRestriction/{fieldName} | Get the allowed values for the specified field in the specified site standard. -*DeployApi* | [**set_site_standard_field_restrictions**](docs/DeployApi.md#set_site_standard_field_restrictions) | **POST** /deploy/sitestandard/{standardName}/fieldRestriction/{fieldName} | Replace the allowed values for the specified field in the specified site standard. -*DeployApi* | [**test_connection_profile**](docs/DeployApi.md#test_connection_profile) | **POST** /deploy/connectionprofile/test | Test connection profile on agent -*DeployApi* | [**transform_file**](docs/DeployApi.md#transform_file) | **POST** /deploy/transform | Transform a definitions file -*ProvisionApi* | [**cancel_upgrade_activity**](docs/ProvisionApi.md#cancel_upgrade_activity) | **POST** /provision/upgrade/{upgradeId}/cancel | Cancel upgrade activity -*ProvisionApi* | [**delete_upgrade_activity**](docs/ProvisionApi.md#delete_upgrade_activity) | **DELETE** /provision/upgrade/{upgradeId} | Delete upgrade activity status for specific upgrade id. -*ProvisionApi* | [**get_all_upgrade_activities_status**](docs/ProvisionApi.md#get_all_upgrade_activities_status) | **GET** /provision/upgrades | Get all upgrade activities status. -*ProvisionApi* | [**get_deploy_versions**](docs/ProvisionApi.md#get_deploy_versions) | **GET** /provision/upgrades/versions | Get available versions for upgrade. -*ProvisionApi* | [**get_eligible_agents_for_upgrade**](docs/ProvisionApi.md#get_eligible_agents_for_upgrade) | **GET** /provision/upgrades/agents | Get eligible agents for upgrade that match the requested search criteria. -*ProvisionApi* | [**get_images**](docs/ProvisionApi.md#get_images) | **GET** /provision/images/{os} | get list of available images for the requested OS -*ProvisionApi* | [**get_upgrade_activity_log**](docs/ProvisionApi.md#get_upgrade_activity_log) | **GET** /provision/upgrade/{upgradeId}/output | Returns log of upgrade activity. -*ProvisionApi* | [**get_upgrade_activity_status_per_upgrade_id**](docs/ProvisionApi.md#get_upgrade_activity_status_per_upgrade_id) | **GET** /provision/upgrade/{upgradeId} | Get upgrade activity status for specific upgrade id. -*ProvisionApi* | [**retry_upgrade_activity**](docs/ProvisionApi.md#retry_upgrade_activity) | **POST** /provision/upgrade/{upgradeId}/retry | Retry upgrade activity -*ProvisionApi* | [**transfer_and_install_product**](docs/ProvisionApi.md#transfer_and_install_product) | **POST** /provision/upgrade/install | Transfer and install a product on an agent -*ProvisionApi* | [**uninstall_product**](docs/ProvisionApi.md#uninstall_product) | **POST** /provision/upgrade/uninstall | Uninstall a product from an agent -*ReportingApi* | [**get_report_by_name**](docs/ReportingApi.md#get_report_by_name) | **GET** /reporting/report/{name} | Retrieves a report by name. -*ReportingApi* | [**get_report_filters**](docs/ReportingApi.md#get_report_filters) | **GET** /reporting/reportFilters/{name} | Retrieves report filters -*ReportingApi* | [**get_report_status**](docs/ReportingApi.md#get_report_status) | **GET** /reporting/status/{reportId} | Retrieves status information for a report generation request based on the report ID -*ReportingApi* | [**run_report**](docs/ReportingApi.md#run_report) | **POST** /reporting/report | Run a report -*RunApi* | [**activate_workload_policy**](docs/RunApi.md#activate_workload_policy) | **POST** /run/workloadpolicy/{policy}/activate | activate workload policy -*RunApi* | [**add_event**](docs/RunApi.md#add_event) | **POST** /run/event/{server} | Add a new event. -*RunApi* | [**add_resource**](docs/RunApi.md#add_resource) | **POST** /run/resource/{server} | Add a new pool resource. -*RunApi* | [**add_workload_policies**](docs/RunApi.md#add_workload_policies) | **POST** /run/workloadpolicies | Add workload policies from definitions file -*RunApi* | [**confirm_job**](docs/RunApi.md#confirm_job) | **POST** /run/job/{jobId}/confirm | confirm a job -*RunApi* | [**deactivate_workload_policy**](docs/RunApi.md#deactivate_workload_policy) | **POST** /run/workloadpolicy/{policy}/deactivate | deactivate a workload policy -*RunApi* | [**delete_event**](docs/RunApi.md#delete_event) | **DELETE** /run/event/{server}/{name}/{date} | Delete a event. -*RunApi* | [**delete_job**](docs/RunApi.md#delete_job) | **POST** /run/job/{jobId}/delete | mark job as deleted -*RunApi* | [**delete_resource**](docs/RunApi.md#delete_resource) | **DELETE** /run/resource/{server}/{name} | Delete a pool resource. -*RunApi* | [**delete_workload_policy**](docs/RunApi.md#delete_workload_policy) | **DELETE** /run/workloadpolicy/{workloadpolicyName} | delete workloadpolicy -*RunApi* | [**free_job**](docs/RunApi.md#free_job) | **POST** /run/job/{jobId}/free | free an already held the job -*RunApi* | [**get_active_job**](docs/RunApi.md#get_active_job) | **GET** /run/job/{jobId}/get | get active job -*RunApi* | [**get_active_services**](docs/RunApi.md#get_active_services) | **GET** /run/services/sla | Get SLA active services -*RunApi* | [**get_detailed_workload_policies**](docs/RunApi.md#get_detailed_workload_policies) | **GET** /run/workloadpolicies/detailed | get full workLoad policies data that match the search criteria. -*RunApi* | [**get_events**](docs/RunApi.md#get_events) | **GET** /run/events | Get all events records for specific search. -*RunApi* | [**get_job_log**](docs/RunApi.md#get_job_log) | **GET** /run/job/{jobId}/log | Get job's log -*RunApi* | [**get_job_output**](docs/RunApi.md#get_job_output) | **GET** /run/job/{jobId}/output | Get job output -*RunApi* | [**get_job_statistics**](docs/RunApi.md#get_job_statistics) | **GET** /run/job/{jobId}/statistics | Get job statistics -*RunApi* | [**get_job_status**](docs/RunApi.md#get_job_status) | **GET** /run/job/{jobId}/status | Get status of a job -*RunApi* | [**get_jobs_status**](docs/RunApi.md#get_jobs_status) | **GET** /run/status/{runId} | Get status of running jobs -*RunApi* | [**get_jobs_status_by_filter**](docs/RunApi.md#get_jobs_status_by_filter) | **GET** /run/jobs/status | Get jobs that match the search criteria. -*RunApi* | [**get_resources**](docs/RunApi.md#get_resources) | **GET** /run/resources | Get all resources records matching search. -*RunApi* | [**get_waiting_info**](docs/RunApi.md#get_waiting_info) | **GET** /run/job/{jobId}/waitingInfo | get job's waiting information -*RunApi* | [**get_workload_policies**](docs/RunApi.md#get_workload_policies) | **GET** /run/workloadpolicies | get workload policies -*RunApi* | [**hold_job**](docs/RunApi.md#hold_job) | **POST** /run/job/{jobId}/hold | hold the job so it will not start untill it is freed -*RunApi* | [**kill_job**](docs/RunApi.md#kill_job) | **POST** /run/job/{jobId}/kill | Cancel running job -*RunApi* | [**modify_job**](docs/RunApi.md#modify_job) | **POST** /run/job/{jobId}/modify | Modify active job -*RunApi* | [**order_jobs_in_folder**](docs/RunApi.md#order_jobs_in_folder) | **POST** /run/order | Execute requested jobs in certain folder -*RunApi* | [**rerun_job**](docs/RunApi.md#rerun_job) | **POST** /run/job/{jobId}/rerun | Run job again -*RunApi* | [**run_jobs**](docs/RunApi.md#run_jobs) | **POST** /run | Run jobs -*RunApi* | [**run_now**](docs/RunApi.md#run_now) | **POST** /run/job/{jobId}/runNow | Bypass scheduling cretirias and start the job -*RunApi* | [**set_to_ok**](docs/RunApi.md#set_to_ok) | **POST** /run/job/{jobId}/setToOk | set job end status to OK -*RunApi* | [**undelete_job**](docs/RunApi.md#undelete_job) | **POST** /run/job/{jobId}/undelete | recover a mark for deletion job -*RunApi* | [**update_alert**](docs/RunApi.md#update_alert) | **POST** /run/alerts | Update alert. -*RunApi* | [**update_alert_status**](docs/RunApi.md#update_alert_status) | **POST** /run/alerts/status | Update alert status. -*RunApi* | [**update_resource**](docs/RunApi.md#update_resource) | **POST** /run/resource/{server}/{name} | Update a pool resource. -*SessionApi* | [**do_login**](docs/SessionApi.md#do_login) | **POST** /session/login | login user to Control-M -*SessionApi* | [**do_logout**](docs/SessionApi.md#do_logout) | **POST** /session/logout | logout user from Control-M -*SessionApi* | [**update_my_password**](docs/SessionApi.md#update_my_password) | **POST** /session/user/password/update | Change my password - - -## Documentation For Models - - - [ActionsAuthRecord](docs/ActionsAuthRecord.md) - - [ActiveServices](docs/ActiveServices.md) - - [AddAgentParams](docs/AddAgentParams.md) - - [AddRemoteHostParams](docs/AddRemoteHostParams.md) - - [AddRemoveSuccessData](docs/AddRemoveSuccessData.md) - - [AddServerParams](docs/AddServerParams.md) - - [AgentCertificateExpirationData](docs/AgentCertificateExpirationData.md) - - [AgentData](docs/AgentData.md) - - [AgentDebugInformation](docs/AgentDebugInformation.md) - - [AgentDetails](docs/AgentDetails.md) - - [AgentDetailsList](docs/AgentDetailsList.md) - - [AgentInGroupParams](docs/AgentInGroupParams.md) - - [AgentInGroupParamsList](docs/AgentInGroupParamsList.md) - - [AgentInHostgroup](docs/AgentInHostgroup.md) - - [AgentInfo](docs/AgentInfo.md) - - [AgentInfoResult](docs/AgentInfoResult.md) - - [AgentMngAuth](docs/AgentMngAuth.md) - - [AgentSysParamSetData](docs/AgentSysParamSetData.md) - - [AgentSysParamSetSuccessData](docs/AgentSysParamSetSuccessData.md) - - [AgentTablesName](docs/AgentTablesName.md) - - [AgentThingProperties](docs/AgentThingProperties.md) - - [AgentsDataList](docs/AgentsDataList.md) - - [AgentsInGroupListResult](docs/AgentsInGroupListResult.md) - - [AgentsInGroupSuccessData](docs/AgentsInGroupSuccessData.md) - - [AgentsSysParamSetData](docs/AgentsSysParamSetData.md) - - [AiDeployResponse](docs/AiDeployResponse.md) - - [AiError](docs/AiError.md) - - [AiJobtype](docs/AiJobtype.md) - - [AiJobtypeList](docs/AiJobtypeList.md) - - [AlertParam](docs/AlertParam.md) - - [AlertStatusParam](docs/AlertStatusParam.md) - - [AllMFTDataSettings](docs/AllMFTDataSettings.md) - - [AllowedJobActions](docs/AllowedJobActions.md) - - [AllowedJobs](docs/AllowedJobs.md) - - [AnnotationDetails](docs/AnnotationDetails.md) - - [ApiGtwSession](docs/ApiGtwSession.md) - - [ApiThrowable](docs/ApiThrowable.md) - - [App](docs/App.md) - - [AppDeployResponse](docs/AppDeployResponse.md) - - [AppDeployed](docs/AppDeployed.md) - - [AppDetails](docs/AppDetails.md) - - [AppList](docs/AppList.md) - - [AppPredeployResponse](docs/AppPredeployResponse.md) - - [ArchiveJobsList](docs/ArchiveJobsList.md) - - [ArchiveRule](docs/ArchiveRule.md) - - [ArchiveRulesList](docs/ArchiveRulesList.md) - - [As2KeyData](docs/As2KeyData.md) - - [AssociateData](docs/AssociateData.md) - - [AuthenticateCredentials](docs/AuthenticateCredentials.md) - - [AuthenticationData](docs/AuthenticationData.md) - - [Availability](docs/Availability.md) - - [CPMngAuth](docs/CPMngAuth.md) - - [CTMNameValueSW](docs/CTMNameValueSW.md) - - [CertificateSigningRequestData](docs/CertificateSigningRequestData.md) - - [ClientAccessPrivilegeCategory](docs/ClientAccessPrivilegeCategory.md) - - [Cluster](docs/Cluster.md) - - [ClusterAuthorizationData](docs/ClusterAuthorizationData.md) - - [CommunicationAnalysisResponseType](docs/CommunicationAnalysisResponseType.md) - - [ComponentKeyWithStatusType](docs/ComponentKeyWithStatusType.md) - - [ComponentMetaDataProperties](docs/ComponentMetaDataProperties.md) - - [ComponentMftKeyType](docs/ComponentMftKeyType.md) - - [ConditionProperties](docs/ConditionProperties.md) - - [ConfigurationManagerPrivilegeCategory](docs/ConfigurationManagerPrivilegeCategory.md) - - [ConnectionProfileDeploymentInfo](docs/ConnectionProfileDeploymentInfo.md) - - [ConnectionProfileStatus](docs/ConnectionProfileStatus.md) - - [ConnectionProfilesDeploymentStatusResult](docs/ConnectionProfilesDeploymentStatusResult.md) - - [ConnectionProfilesStatusResult](docs/ConnectionProfilesStatusResult.md) - - [ControlMAuthenticationData](docs/ControlMAuthenticationData.md) - - [CtmDetails](docs/CtmDetails.md) - - [CtmDetailsList](docs/CtmDetailsList.md) - - [CtmagSetExtractServiceStatus](docs/CtmagSetExtractServiceStatus.md) - - [CtmagentBasicInfoType](docs/CtmagentBasicInfoType.md) - - [CtmagentCtmTestType](docs/CtmagentCtmTestType.md) - - [CtmagentStateChangedType](docs/CtmagentStateChangedType.md) - - [CtmvarDelResultItem](docs/CtmvarDelResultItem.md) - - [CtmvarDelResults](docs/CtmvarDelResults.md) - - [CtmvarErrorInfo](docs/CtmvarErrorInfo.md) - - [CtmvarGetResultItem](docs/CtmvarGetResultItem.md) - - [CtmvarGetResults](docs/CtmvarGetResults.md) - - [CtmvarResultItem](docs/CtmvarResultItem.md) - - [CtmvarResults](docs/CtmvarResults.md) - - [CtmvarSetResultItem](docs/CtmvarSetResultItem.md) - - [CtmvarSetResults](docs/CtmvarSetResults.md) - - [DeployJobtypeResponse](docs/DeployJobtypeResponse.md) - - [DeploymentFileError](docs/DeploymentFileError.md) - - [DeploymentFileResults](docs/DeploymentFileResults.md) - - [DiagnosticsDataCollectionInformation](docs/DiagnosticsDataCollectionInformation.md) - - [DiagnosticsDataCollectionResult](docs/DiagnosticsDataCollectionResult.md) - - [EMBasicActiveRequestParameters](docs/EMBasicActiveRequestParameters.md) - - [EMDefaultRequestParameters](docs/EMDefaultRequestParameters.md) - - [EMSystemParameter](docs/EMSystemParameter.md) - - [EmJobsId](docs/EmJobsId.md) - - [EmOrderFolder](docs/EmOrderFolder.md) - - [EmOrderFolderParameters](docs/EmOrderFolderParameters.md) - - [EncryptionMetadata](docs/EncryptionMetadata.md) - - [ErrorData](docs/ErrorData.md) - - [ErrorList](docs/ErrorList.md) - - [Event](docs/Event.md) - - [EventParam](docs/EventParam.md) - - [EventSet](docs/EventSet.md) - - [ExternalProviderAuthenticationData](docs/ExternalProviderAuthenticationData.md) - - [ExternalUserData](docs/ExternalUserData.md) - - [ExtractServicePropParams](docs/ExtractServicePropParams.md) - - [FieldMetadataProperties](docs/FieldMetadataProperties.md) - - [FieldValue](docs/FieldValue.md) - - [FieldValues](docs/FieldValues.md) - - [FolderAuth](docs/FolderAuth.md) - - [FolderProperties](docs/FolderProperties.md) - - [FolderPropertiesData](docs/FolderPropertiesData.md) - - [FoldersUsersSettingsAndMetadataProperties](docs/FoldersUsersSettingsAndMetadataProperties.md) - - [FoldersUsersSettingsAndMetadataPropertiesFromB2B](docs/FoldersUsersSettingsAndMetadataPropertiesFromB2B.md) - - [FtsAuthenticationDetails](docs/FtsAuthenticationDetails.md) - - [FtsFtpSettings](docs/FtsFtpSettings.md) - - [FtsGeneralSettings](docs/FtsGeneralSettings.md) - - [FtsLdapAuthenticationDetails](docs/FtsLdapAuthenticationDetails.md) - - [FtsPamAuthenticationDetails](docs/FtsPamAuthenticationDetails.md) - - [FtsSettingsData](docs/FtsSettingsData.md) - - [FtsSftpSettings](docs/FtsSftpSettings.md) - - [FtsUserHomeDirectoryData](docs/FtsUserHomeDirectoryData.md) - - [GatewayData](docs/GatewayData.md) - - [GetAlertInfo](docs/GetAlertInfo.md) - - [GetManifestParams](docs/GetManifestParams.md) - - [GetManifestParamsResult](docs/GetManifestParamsResult.md) - - [GroupsAllowedFoldersProperties](docs/GroupsAllowedFoldersProperties.md) - - [HostGroupData](docs/HostGroupData.md) - - [HostGroupsDataList](docs/HostGroupsDataList.md) - - [HostProperties](docs/HostProperties.md) - - [HostgroupAgentParticipation](docs/HostgroupAgentParticipation.md) - - [HostgroupProperties](docs/HostgroupProperties.md) - - [HostnamePortPair](docs/HostnamePortPair.md) - - [HubData](docs/HubData.md) - - [HubStatus](docs/HubStatus.md) - - [Job](docs/Job.md) - - [JobLevelAuth](docs/JobLevelAuth.md) - - [JobRunStatus](docs/JobRunStatus.md) - - [JobStatusResult](docs/JobStatusResult.md) - - [JobtypeAgent](docs/JobtypeAgent.md) - - [KeyValue](docs/KeyValue.md) - - [KeyValueListResult](docs/KeyValueListResult.md) - - [KeyValueType](docs/KeyValueType.md) - - [KeyValueTypeListResult](docs/KeyValueTypeListResult.md) - - [KnownHosts](docs/KnownHosts.md) - - [LdapDomainSettings](docs/LdapDomainSettings.md) - - [Log](docs/Log.md) - - [LogDataArguments](docs/LogDataArguments.md) - - [LogJobParameters](docs/LogJobParameters.md) - - [LogJobResultItem](docs/LogJobResultItem.md) - - [LogJobResults](docs/LogJobResults.md) - - [LogParams](docs/LogParams.md) - - [LoginCredentials](docs/LoginCredentials.md) - - [LoginResult](docs/LoginResult.md) - - [MFTEntitiesListNames](docs/MFTEntitiesListNames.md) - - [MFTExternalUserProjectionData](docs/MFTExternalUserProjectionData.md) - - [MFTFolderProjectionData](docs/MFTFolderProjectionData.md) - - [MFTFolderProjectionProperties](docs/MFTFolderProjectionProperties.md) - - [MFTUserGroupProjectionData](docs/MFTUserGroupProjectionData.md) - - [ManifestGroupItemObject](docs/ManifestGroupItemObject.md) - - [ManifestGroupObject](docs/ManifestGroupObject.md) - - [Matching](docs/Matching.md) - - [MftConfigurationData](docs/MftConfigurationData.md) - - [MonitoringPrivilegeCategory](docs/MonitoringPrivilegeCategory.md) - - [MsgDataArguments](docs/MsgDataArguments.md) - - [NameValueAttribute](docs/NameValueAttribute.md) - - [NewSample](docs/NewSample.md) - - [Node](docs/Node.md) - - [OptionalValue](docs/OptionalValue.md) - - [OrderFolderParameters](docs/OrderFolderParameters.md) - - [OrderFolderResultItem](docs/OrderFolderResultItem.md) - - [OrderFolderResults](docs/OrderFolderResults.md) - - [OrderParameters](docs/OrderParameters.md) - - [OrderedItemItem](docs/OrderedItemItem.md) - - [Output](docs/Output.md) - - [OutputParams](docs/OutputParams.md) - - [PasswordsObject](docs/PasswordsObject.md) - - [Performance](docs/Performance.md) - - [PgpTemplateData](docs/PgpTemplateData.md) - - [PingAgentParams](docs/PingAgentParams.md) - - [PlanningPrivilegeCategory](docs/PlanningPrivilegeCategory.md) - - [PluginData](docs/PluginData.md) - - [PluginMngAuth](docs/PluginMngAuth.md) - - [PoolVariablesErrorInfo](docs/PoolVariablesErrorInfo.md) - - [PoolVariablesName](docs/PoolVariablesName.md) - - [PoolVariablesNameValue](docs/PoolVariablesNameValue.md) - - [PossibleValueProperties](docs/PossibleValueProperties.md) - - [PrivilegeName](docs/PrivilegeName.md) - - [PrivilegeNameControlm](docs/PrivilegeNameControlm.md) - - [Privileges](docs/Privileges.md) - - [ProductDescription](docs/ProductDescription.md) - - [ProductSections](docs/ProductSections.md) - - [ProvisionAdvanceParameters](docs/ProvisionAdvanceParameters.md) - - [Query](docs/Query.md) - - [RawCmsXmlRequest](docs/RawCmsXmlRequest.md) - - [ReadOnlyStatus](docs/ReadOnlyStatus.md) - - [ReportDateTimeSettings](docs/ReportDateTimeSettings.md) - - [ReportFilter](docs/ReportFilter.md) - - [ReportFilters](docs/ReportFilters.md) - - [ReportResult](docs/ReportResult.md) - - [RequestParametersWrapperEMDefaultRequestParametersLogJobParameters](docs/RequestParametersWrapperEMDefaultRequestParametersLogJobParameters.md) - - [RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter](docs/RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter.md) - - [RerunParameters](docs/RerunParameters.md) - - [RerunZosParameters](docs/RerunZosParameters.md) - - [ResourceMax](docs/ResourceMax.md) - - [ResourceObj](docs/ResourceObj.md) - - [ResourceParam](docs/ResourceParam.md) - - [ResourceSet](docs/ResourceSet.md) - - [RestartStep](docs/RestartStep.md) - - [ResultsStatus](docs/ResultsStatus.md) - - [RoleData](docs/RoleData.md) - - [RoleDataFull](docs/RoleDataFull.md) - - [RoleHeader](docs/RoleHeader.md) - - [RoleHeaderList](docs/RoleHeaderList.md) - - [RoleProperties](docs/RoleProperties.md) - - [RuleCriteria](docs/RuleCriteria.md) - - [RuleProjection](docs/RuleProjection.md) - - [RuleStatistics](docs/RuleStatistics.md) - - [RulesStatisticList](docs/RulesStatisticList.md) - - [RulesStatisticListSummary](docs/RulesStatisticListSummary.md) - - [RunAsUserData](docs/RunAsUserData.md) - - [RunAsUserDetailsData](docs/RunAsUserDetailsData.md) - - [RunAsUserKeyData](docs/RunAsUserKeyData.md) - - [RunAsUsersList](docs/RunAsUsersList.md) - - [RunReport](docs/RunReport.md) - - [RunReportInfo](docs/RunReportInfo.md) - - [RunResult](docs/RunResult.md) - - [RunasDefinitionAuth](docs/RunasDefinitionAuth.md) - - [RunasUserAuth](docs/RunasUserAuth.md) - - [SLAService](docs/SLAService.md) - - [SLAServiceStatusByJobs](docs/SLAServiceStatusByJobs.md) - - [Saml2IdentityProvider](docs/Saml2IdentityProvider.md) - - [SamlStatus](docs/SamlStatus.md) - - [Sample](docs/Sample.md) - - [SearchParams](docs/SearchParams.md) - - [SearchTagTuple](docs/SearchTagTuple.md) - - [SecretKeyValue](docs/SecretKeyValue.md) - - [SecretValue](docs/SecretValue.md) - - [SectionMetadataProperties](docs/SectionMetadataProperties.md) - - [ServiceAuth](docs/ServiceAuth.md) - - [ServiceAuthAction](docs/ServiceAuthAction.md) - - [ServiceProviderInformation](docs/ServiceProviderInformation.md) - - [SetAgentParams](docs/SetAgentParams.md) - - [SetAgentParamsList](docs/SetAgentParamsList.md) - - [SettingKeyProperties](docs/SettingKeyProperties.md) - - [SettingProperties](docs/SettingProperties.md) - - [SettingPropertiesObject](docs/SettingPropertiesObject.md) - - [SettingsMetadataProperties](docs/SettingsMetadataProperties.md) - - [SettingsUpdateObject](docs/SettingsUpdateObject.md) - - [SshKeyProperties](docs/SshKeyProperties.md) - - [Statistics](docs/Statistics.md) - - [StatisticsAverageInfo](docs/StatisticsAverageInfo.md) - - [StatisticsPeriod](docs/StatisticsPeriod.md) - - [StatisticsRunInfo](docs/StatisticsRunInfo.md) - - [StatisticsSingleRun](docs/StatisticsSingleRun.md) - - [StringListResult](docs/StringListResult.md) - - [SuccessData](docs/SuccessData.md) - - [Summary](docs/Summary.md) - - [SystemParameter](docs/SystemParameter.md) - - [SystemSetting](docs/SystemSetting.md) - - [SystemSettingAnnotationProperty](docs/SystemSettingAnnotationProperty.md) - - [SystemSettingKeyValue](docs/SystemSettingKeyValue.md) - - [SystemSettingKeyValueComponent](docs/SystemSettingKeyValueComponent.md) - - [SystemSettingLdap](docs/SystemSettingLdap.md) - - [SystemSettingProperty](docs/SystemSettingProperty.md) - - [TermGroup](docs/TermGroup.md) - - [TokenDataRequest](docs/TokenDataRequest.md) - - [TokenDataResponse](docs/TokenDataResponse.md) - - [TokenList](docs/TokenList.md) - - [TokenListArray](docs/TokenListArray.md) - - [ToolsPrivilegeCategory](docs/ToolsPrivilegeCategory.md) - - [Topology](docs/Topology.md) - - [UpgradeAgentInfo](docs/UpgradeAgentInfo.md) - - [UpgradeAgentInfoList](docs/UpgradeAgentInfoList.md) - - [UpgradeInfo](docs/UpgradeInfo.md) - - [UpgradeNotification](docs/UpgradeNotification.md) - - [UpgradeRecord](docs/UpgradeRecord.md) - - [UpgradeRecordList](docs/UpgradeRecordList.md) - - [UpgradeRequest](docs/UpgradeRequest.md) - - [UpgradeResponse](docs/UpgradeResponse.md) - - [UserAdditionalProperties](docs/UserAdditionalProperties.md) - - [UserAllowedFoldersProperties](docs/UserAllowedFoldersProperties.md) - - [UserData](docs/UserData.md) - - [UserGroupDetailsData](docs/UserGroupDetailsData.md) - - [UserGroupPropertiesData](docs/UserGroupPropertiesData.md) - - [UserHeader](docs/UserHeader.md) - - [UserPassword](docs/UserPassword.md) - - [UserPreferences](docs/UserPreferences.md) - - [ValidationProperties](docs/ValidationProperties.md) - - [Value](docs/Value.md) - - [Values](docs/Values.md) - - [VariableNameValue](docs/VariableNameValue.md) - - [VariableNames](docs/VariableNames.md) - - [Variables](docs/Variables.md) - - [ViewpointManagerPrivilegeCategory](docs/ViewpointManagerPrivilegeCategory.md) - - [WarningData](docs/WarningData.md) - - [WarningList](docs/WarningList.md) - - [WarningsCollection](docs/WarningsCollection.md) - - [WhyJobParameters](docs/WhyJobParameters.md) - - [WhyJobResultItem](docs/WhyJobResultItem.md) - - [WhyJobResults](docs/WhyJobResults.md) - - [WorkflowInsightsStatus](docs/WorkflowInsightsStatus.md) - - [WorkloadPoliciesFileResults](docs/WorkloadPoliciesFileResults.md) - - [WorkloadPolicy](docs/WorkloadPolicy.md) - - [WorkloadPolicyList](docs/WorkloadPolicyList.md) - - [WorkloadPolicyState](docs/WorkloadPolicyState.md) - - [WorkloadPolicyStateList](docs/WorkloadPolicyStateList.md) - - [WorkspaceFolder](docs/WorkspaceFolder.md) - - [WorkspaceFolders](docs/WorkspaceFolders.md) - - [ZooKeeper](docs/ZooKeeper.md) - - [ZosTemplateData](docs/ZosTemplateData.md) - - -## Documentation For Authorization - - -## Bearer - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - - -## Author - -customer_support@bmc.com - diff --git a/src/clients/ctm_api_client/__init__.py b/src/clients/ctm_api_client/__init__.py index 2be0894..e5d423c 100644 --- a/src/clients/ctm_api_client/__init__.py +++ b/src/clients/ctm_api_client/__init__.py @@ -7,16 +7,19 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +__version__ = "1.0.0" + # import apis into sdk package from clients.ctm_api_client.api.archive_api import ArchiveApi +from clients.ctm_api_client.api.authentication_api import AuthenticationApi from clients.ctm_api_client.api.build_api import BuildApi from clients.ctm_api_client.api.config_api import ConfigApi from clients.ctm_api_client.api.deploy_api import DeployApi @@ -24,295 +27,250 @@ from clients.ctm_api_client.api.reporting_api import ReportingApi from clients.ctm_api_client.api.run_api import RunApi from clients.ctm_api_client.api.session_api import SessionApi +from clients.ctm_api_client.api.status_api import StatusApi +from clients.ctm_api_client.api.usage_api import UsageApi # import ApiClient from clients.ctm_api_client.api_client import ApiClient from clients.ctm_api_client.configuration import Configuration - +from clients.ctm_api_client.exceptions import OpenApiException +from clients.ctm_api_client.exceptions import ApiTypeError +from clients.ctm_api_client.exceptions import ApiValueError +from clients.ctm_api_client.exceptions import ApiKeyError +from clients.ctm_api_client.exceptions import ApiAttributeError +from clients.ctm_api_client.exceptions import ApiException # import models into sdk package -from clients.ctm_api_client.models.actions_auth_record import ( - ActionsAuthRecord, -) +from clients.ctm_api_client.models.action_fails_behaviour_data import ActionFailsBehaviourData +from clients.ctm_api_client.models.actions_auth_record import ActionsAuthRecord +from clients.ctm_api_client.models.active_sec_attrs import ActiveSecAttrs from clients.ctm_api_client.models.active_services import ActiveServices from clients.ctm_api_client.models.add_agent_params import AddAgentParams -from clients.ctm_api_client.models.add_remote_host_params import ( - AddRemoteHostParams, -) -from clients.ctm_api_client.models.add_remove_success_data import ( - AddRemoveSuccessData, -) +from clients.ctm_api_client.models.add_event_action_data import AddEventActionData +from clients.ctm_api_client.models.add_gateway_params import AddGatewayParams +from clients.ctm_api_client.models.add_on_register_request import AddOnRegisterRequest +from clients.ctm_api_client.models.add_ons import AddOns +from clients.ctm_api_client.models.add_remote_host_params import AddRemoteHostParams +from clients.ctm_api_client.models.add_remove_success_data import AddRemoveSuccessData from clients.ctm_api_client.models.add_server_params import AddServerParams -from clients.ctm_api_client.models.agent_certificate_expiration_data import ( - AgentCertificateExpirationData, -) +from clients.ctm_api_client.models.add_ssh_key_polling_result import AddSshKeyPollingResult +from clients.ctm_api_client.models.additional_attribute import AdditionalAttribute +from clients.ctm_api_client.models.agent_certificate_expiration_data import AgentCertificateExpirationData from clients.ctm_api_client.models.agent_data import AgentData -from clients.ctm_api_client.models.agent_debug_information import ( - AgentDebugInformation, -) +from clients.ctm_api_client.models.agent_debug_information import AgentDebugInformation from clients.ctm_api_client.models.agent_details import AgentDetails from clients.ctm_api_client.models.agent_details_list import AgentDetailsList -from clients.ctm_api_client.models.agent_in_group_params import ( - AgentInGroupParams, -) -from clients.ctm_api_client.models.agent_in_group_params_list import ( - AgentInGroupParamsList, -) +from clients.ctm_api_client.models.agent_in_group_params import AgentInGroupParams +from clients.ctm_api_client.models.agent_in_group_params_list import AgentInGroupParamsList from clients.ctm_api_client.models.agent_in_hostgroup import AgentInHostgroup from clients.ctm_api_client.models.agent_info import AgentInfo from clients.ctm_api_client.models.agent_info_result import AgentInfoResult +from clients.ctm_api_client.models.agent_log_entry import AgentLogEntry from clients.ctm_api_client.models.agent_mng_auth import AgentMngAuth -from clients.ctm_api_client.models.agent_sys_param_set_data import ( - AgentSysParamSetData, -) -from clients.ctm_api_client.models.agent_sys_param_set_success_data import ( - AgentSysParamSetSuccessData, -) +from clients.ctm_api_client.models.agent_sys_param_set_data import AgentSysParamSetData +from clients.ctm_api_client.models.agent_sys_param_set_success_data import AgentSysParamSetSuccessData from clients.ctm_api_client.models.agent_tables_name import AgentTablesName -from clients.ctm_api_client.models.agent_thing_properties import ( - AgentThingProperties, -) -from clients.ctm_api_client.models.agents_data_list import AgentsDataList -from clients.ctm_api_client.models.agents_in_group_list_result import ( - AgentsInGroupListResult, -) -from clients.ctm_api_client.models.agents_in_group_success_data import ( - AgentsInGroupSuccessData, -) -from clients.ctm_api_client.models.agents_sys_param_set_data import ( - AgentsSysParamSetData, -) +from clients.ctm_api_client.models.agent_thing_properties import AgentThingProperties +from clients.ctm_api_client.models.agent_ui_props import AgentUiProps +from clients.ctm_api_client.models.agentless_host_details import AgentlessHostDetails +from clients.ctm_api_client.models.agents_in_group_success_data import AgentsInGroupSuccessData +from clients.ctm_api_client.models.agents_sys_param_set_data import AgentsSysParamSetData from clients.ctm_api_client.models.ai_deploy_response import AiDeployResponse from clients.ctm_api_client.models.ai_error import AiError from clients.ctm_api_client.models.ai_jobtype import AiJobtype from clients.ctm_api_client.models.ai_jobtype_list import AiJobtypeList +from clients.ctm_api_client.models.alert_event_id import AlertEventId from clients.ctm_api_client.models.alert_param import AlertParam from clients.ctm_api_client.models.alert_status_param import AlertStatusParam -from clients.ctm_api_client.models.all_mft_data_settings import ( - AllMFTDataSettings, -) -from clients.ctm_api_client.models.allowed_job_actions import ( - AllowedJobActions, -) +from clients.ctm_api_client.models.alerts_stream_status import AlertsStreamStatus +from clients.ctm_api_client.models.alerts_stream_template import AlertsStreamTemplate +from clients.ctm_api_client.models.all_mft_data_settings import AllMFTDataSettings +from clients.ctm_api_client.models.allowed_job_actions import AllowedJobActions from clients.ctm_api_client.models.allowed_jobs import AllowedJobs from clients.ctm_api_client.models.annotation_details import AnnotationDetails from clients.ctm_api_client.models.api_gtw_session import ApiGtwSession from clients.ctm_api_client.models.api_throwable import ApiThrowable from clients.ctm_api_client.models.app import App -from clients.ctm_api_client.models.app_deploy_response import ( - AppDeployResponse, -) +from clients.ctm_api_client.models.app_deploy_response import AppDeployResponse from clients.ctm_api_client.models.app_deployed import AppDeployed from clients.ctm_api_client.models.app_details import AppDetails from clients.ctm_api_client.models.app_list import AppList -from clients.ctm_api_client.models.app_predeploy_response import ( - AppPredeployResponse, -) +from clients.ctm_api_client.models.app_predeploy_response import AppPredeployResponse from clients.ctm_api_client.models.archive_jobs_list import ArchiveJobsList from clients.ctm_api_client.models.archive_rule import ArchiveRule from clients.ctm_api_client.models.archive_rules_list import ArchiveRulesList from clients.ctm_api_client.models.as2_key_data import As2KeyData from clients.ctm_api_client.models.associate_data import AssociateData -from clients.ctm_api_client.models.authenticate_credentials import ( - AuthenticateCredentials, -) -from clients.ctm_api_client.models.authentication_data import ( - AuthenticationData, -) +from clients.ctm_api_client.models.authenticate_credentials import AuthenticateCredentials +from clients.ctm_api_client.models.authenticate_credentials_additional_attributes import AuthenticateCredentialsAdditionalAttributes +from clients.ctm_api_client.models.authentication_data import AuthenticationData +from clients.ctm_api_client.models.authorize_ssh_data import AuthorizeSSHData from clients.ctm_api_client.models.availability import Availability +from clients.ctm_api_client.models.aysnc_poll_deployment_file_results import AysncPollDeploymentFileResults +from clients.ctm_api_client.models.between_date import BetweenDate +from clients.ctm_api_client.models.between_date_time import BetweenDateTime +from clients.ctm_api_client.models.between_time import BetweenTime +from clients.ctm_api_client.models.between_week_day_time import BetweenWeekDayTime +from clients.ctm_api_client.models.bypass_option_attributes import BypassOptionAttributes from clients.ctm_api_client.models.cp_mng_auth import CPMngAuth +from clients.ctm_api_client.models.ctm_job_executed_counter import CTMJobExecutedCounter from clients.ctm_api_client.models.ctm_name_value_sw import CTMNameValueSW -from clients.ctm_api_client.models.certificate_signing_request_data import ( - CertificateSigningRequestData, -) -from clients.ctm_api_client.models.client_access_privilege_category import ( - ClientAccessPrivilegeCategory, -) +from clients.ctm_api_client.models.certificate_signing_request_data import CertificateSigningRequestData +from clients.ctm_api_client.models.client_access_privilege_category import ClientAccessPrivilegeCategory from clients.ctm_api_client.models.cluster import Cluster -from clients.ctm_api_client.models.cluster_authorization_data import ( - ClusterAuthorizationData, -) -from clients.ctm_api_client.models.communication_analysis_response_type import ( - CommunicationAnalysisResponseType, -) -from clients.ctm_api_client.models.component_key_with_status_type import ( - ComponentKeyWithStatusType, -) -from clients.ctm_api_client.models.component_meta_data_properties import ( - ComponentMetaDataProperties, -) -from clients.ctm_api_client.models.component_mft_key_type import ( - ComponentMftKeyType, -) -from clients.ctm_api_client.models.condition_properties import ( - ConditionProperties, -) -from clients.ctm_api_client.models.configuration_manager_privilege_category import ( - ConfigurationManagerPrivilegeCategory, -) -from clients.ctm_api_client.models.connection_profile_deployment_info import ( - ConnectionProfileDeploymentInfo, -) -from clients.ctm_api_client.models.connection_profile_status import ( - ConnectionProfileStatus, -) -from clients.ctm_api_client.models.connection_profiles_deployment_status_result import ( - ConnectionProfilesDeploymentStatusResult, -) -from clients.ctm_api_client.models.connection_profiles_status_result import ( - ConnectionProfilesStatusResult, -) -from clients.ctm_api_client.models.control_m_authentication_data import ( - ControlMAuthenticationData, -) +from clients.ctm_api_client.models.cluster_authorization_data import ClusterAuthorizationData +from clients.ctm_api_client.models.communication_analysis_response_type import CommunicationAnalysisResponseType +from clients.ctm_api_client.models.component_key_with_status_type import ComponentKeyWithStatusType +from clients.ctm_api_client.models.component_meta_data_properties import ComponentMetaDataProperties +from clients.ctm_api_client.models.component_mft_key_type import ComponentMftKeyType +from clients.ctm_api_client.models.condition_format_part import ConditionFormatPart +from clients.ctm_api_client.models.condition_properties import ConditionProperties +from clients.ctm_api_client.models.configuration_manager_privilege_category import ConfigurationManagerPrivilegeCategory +from clients.ctm_api_client.models.connection_profile_deployment_info import ConnectionProfileDeploymentInfo +from clients.ctm_api_client.models.connection_profile_status import ConnectionProfileStatus +from clients.ctm_api_client.models.connection_profiles_deployment_status_result import ConnectionProfilesDeploymentStatusResult +from clients.ctm_api_client.models.connection_profiles_status_result import ConnectionProfilesStatusResult +from clients.ctm_api_client.models.control_m_authentication_data import ControlMAuthenticationData +from clients.ctm_api_client.models.convert_lcp_to_ccp_results import ConvertLcpToCcpResults +from clients.ctm_api_client.models.ctl_request_params import CtlRequestParams +from clients.ctm_api_client.models.ctl_response import CtlResponse +from clients.ctm_api_client.models.ctm_addon_activation import CtmAddonActivation +from clients.ctm_api_client.models.ctm_advanced_details import CtmAdvancedDetails +from clients.ctm_api_client.models.ctm_ai_job_type_response import CtmAiJobTypeResponse from clients.ctm_api_client.models.ctm_details import CtmDetails -from clients.ctm_api_client.models.ctm_details_list import CtmDetailsList -from clients.ctm_api_client.models.ctmag_set_extract_service_status import ( - CtmagSetExtractServiceStatus, -) -from clients.ctm_api_client.models.ctmagent_basic_info_type import ( - CtmagentBasicInfoType, -) -from clients.ctm_api_client.models.ctmagent_ctm_test_type import ( - CtmagentCtmTestType, -) -from clients.ctm_api_client.models.ctmagent_state_changed_type import ( - CtmagentStateChangedType, -) -from clients.ctm_api_client.models.ctmvar_del_result_item import ( - CtmvarDelResultItem, -) +from clients.ctm_api_client.models.ctm_sec_active_sec_attr_type import CtmSecActiveSecAttrType +from clients.ctm_api_client.models.ctm_sec_entity_sec_attr_type import CtmSecEntitySecAttrType +from clients.ctm_api_client.models.ctm_sec_entity_sec_attrs_type import CtmSecEntitySecAttrsType +from clients.ctm_api_client.models.ctm_sec_group import CtmSecGroup +from clients.ctm_api_client.models.ctm_sec_group_data import CtmSecGroupData +from clients.ctm_api_client.models.ctm_sec_security_attributes import CtmSecSecurityAttributes +from clients.ctm_api_client.models.ctm_sec_security_entities import CtmSecSecurityEntities +from clients.ctm_api_client.models.ctm_sec_table_sec_attr_type import CtmSecTableSecAttrType +from clients.ctm_api_client.models.ctm_sec_user import CtmSecUser +from clients.ctm_api_client.models.ctm_sec_user_data import CtmSecUserData +from clients.ctm_api_client.models.ctm_server_component_status_info import CtmServerComponentStatusInfo +from clients.ctm_api_client.models.ctm_server_definition import CtmServerDefinition +from clients.ctm_api_client.models.ctm_server_details import CtmServerDetails +from clients.ctm_api_client.models.ctm_server_metadata import CtmServerMetadata +from clients.ctm_api_client.models.ctm_server_rename_params import CtmServerRenameParams +from clients.ctm_api_client.models.ctm_server_rename_report import CtmServerRenameReport +from clients.ctm_api_client.models.ctm_server_rename_warning import CtmServerRenameWarning +from clients.ctm_api_client.models.ctm_service import CtmService +from clients.ctm_api_client.models.ctmag_set_extract_service_status import CtmagSetExtractServiceStatus +from clients.ctm_api_client.models.ctmagent_basic_info_type import CtmagentBasicInfoType +from clients.ctm_api_client.models.ctmagent_ctm_test_type import CtmagentCtmTestType +from clients.ctm_api_client.models.ctmagent_state_changed_type import CtmagentStateChangedType +from clients.ctm_api_client.models.ctmudchk_jobs_results import CtmudchkJobsResults +from clients.ctm_api_client.models.ctmudchk_results import CtmudchkResults +from clients.ctm_api_client.models.ctmvar_del_result_item import CtmvarDelResultItem from clients.ctm_api_client.models.ctmvar_del_results import CtmvarDelResults from clients.ctm_api_client.models.ctmvar_error_info import CtmvarErrorInfo -from clients.ctm_api_client.models.ctmvar_get_result_item import ( - CtmvarGetResultItem, -) +from clients.ctm_api_client.models.ctmvar_get_result_item import CtmvarGetResultItem from clients.ctm_api_client.models.ctmvar_get_results import CtmvarGetResults from clients.ctm_api_client.models.ctmvar_result_item import CtmvarResultItem from clients.ctm_api_client.models.ctmvar_results import CtmvarResults -from clients.ctm_api_client.models.ctmvar_set_result_item import ( - CtmvarSetResultItem, -) +from clients.ctm_api_client.models.ctmvar_set_result_item import CtmvarSetResultItem from clients.ctm_api_client.models.ctmvar_set_results import CtmvarSetResults -from clients.ctm_api_client.models.deploy_jobtype_response import ( - DeployJobtypeResponse, -) -from clients.ctm_api_client.models.deployment_file_error import ( - DeploymentFileError, -) -from clients.ctm_api_client.models.deployment_file_results import ( - DeploymentFileResults, -) -from clients.ctm_api_client.models.diagnostics_data_collection_information import ( - DiagnosticsDataCollectionInformation, -) -from clients.ctm_api_client.models.diagnostics_data_collection_result import ( - DiagnosticsDataCollectionResult, -) -from clients.ctm_api_client.models.em_basic_active_request_parameters import ( - EMBasicActiveRequestParameters, -) -from clients.ctm_api_client.models.em_default_request_parameters import ( - EMDefaultRequestParameters, -) -from clients.ctm_api_client.models.em_system_parameter import ( - EMSystemParameter, -) +from clients.ctm_api_client.models.data_assurance_configration_data import DataAssuranceConfigrationData +from clients.ctm_api_client.models.data_assurance_gateway_data import DataAssuranceGatewayData +from clients.ctm_api_client.models.data_assurance_register_properties import DataAssuranceRegisterProperties +from clients.ctm_api_client.models.database_def import DatabaseDef +from clients.ctm_api_client.models.database_status_data import DatabaseStatusData +from clients.ctm_api_client.models.deploy_async_results import DeployAsyncResults +from clients.ctm_api_client.models.deploy_jobtype_response import DeployJobtypeResponse +from clients.ctm_api_client.models.deployment_file_error import DeploymentFileError +from clients.ctm_api_client.models.deployment_file_results import DeploymentFileResults +from clients.ctm_api_client.models.device_space import DeviceSpace +from clients.ctm_api_client.models.diagnostics_data_collection_information import DiagnosticsDataCollectionInformation +from clients.ctm_api_client.models.diagnostics_data_collection_result import DiagnosticsDataCollectionResult +from clients.ctm_api_client.models.discover_response import DiscoverResponse +from clients.ctm_api_client.models.em_basic_active_request_parameters import EMBasicActiveRequestParameters +from clients.ctm_api_client.models.em_default_request_parameters import EMDefaultRequestParameters +from clients.ctm_api_client.models.em_params import EMParams +from clients.ctm_api_client.models.em_server_summary import EMServerSummary +from clients.ctm_api_client.models.em_system_parameter import EMSystemParameter +from clients.ctm_api_client.models.em_component_def import EmComponentDef +from clients.ctm_api_client.models.em_component_desired_state import EmComponentDesiredState from clients.ctm_api_client.models.em_jobs_id import EmJobsId from clients.ctm_api_client.models.em_order_folder import EmOrderFolder -from clients.ctm_api_client.models.em_order_folder_parameters import ( - EmOrderFolderParameters, -) -from clients.ctm_api_client.models.encryption_metadata import ( - EncryptionMetadata, -) +from clients.ctm_api_client.models.em_order_folder_parameters import EmOrderFolderParameters +from clients.ctm_api_client.models.em_system_param import EmSystemParam +from clients.ctm_api_client.models.email_notification_action_data import EmailNotificationActionData +from clients.ctm_api_client.models.emdef_task_result import EmdefTaskResult +from clients.ctm_api_client.models.emdef_task_status import EmdefTaskStatus +from clients.ctm_api_client.models.encryption_metadata import EncryptionMetadata +from clients.ctm_api_client.models.environment_configuration import EnvironmentConfiguration from clients.ctm_api_client.models.error_data import ErrorData from clients.ctm_api_client.models.error_list import ErrorList from clients.ctm_api_client.models.event import Event from clients.ctm_api_client.models.event_param import EventParam -from clients.ctm_api_client.models.event_set import EventSet -from clients.ctm_api_client.models.external_provider_authentication_data import ( - ExternalProviderAuthenticationData, -) +from clients.ctm_api_client.models.exception_alert_data import ExceptionAlertData +from clients.ctm_api_client.models.exception_alert_user_note import ExceptionAlertUserNote +from clients.ctm_api_client.models.exception_alerts_data_list import ExceptionAlertsDataList +from clients.ctm_api_client.models.external_provider_authentication_data import ExternalProviderAuthenticationData from clients.ctm_api_client.models.external_user_data import ExternalUserData -from clients.ctm_api_client.models.extract_service_prop_params import ( - ExtractServicePropParams, -) -from clients.ctm_api_client.models.field_metadata_properties import ( - FieldMetadataProperties, -) +from clients.ctm_api_client.models.extract_service_prop_params import ExtractServicePropParams +from clients.ctm_api_client.models.field_metadata_properties import FieldMetadataProperties from clients.ctm_api_client.models.field_value import FieldValue from clients.ctm_api_client.models.field_values import FieldValues +from clients.ctm_api_client.models.file_name_pattern_condition_data import FileNamePatternConditionData +from clients.ctm_api_client.models.file_operation_action_data import FileOperationActionData +from clients.ctm_api_client.models.file_size_condition_data import FileSizeConditionData +from clients.ctm_api_client.models.fixed_sub_folder import FixedSubFolder from clients.ctm_api_client.models.folder_auth import FolderAuth +from clients.ctm_api_client.models.folder_forecast_timeline_result import FolderForecastTimelineResult from clients.ctm_api_client.models.folder_properties import FolderProperties -from clients.ctm_api_client.models.folder_properties_data import ( - FolderPropertiesData, -) -from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties import ( - FoldersUsersSettingsAndMetadataProperties, -) -from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties_from_b2_b import ( - FoldersUsersSettingsAndMetadataPropertiesFromB2B, -) -from clients.ctm_api_client.models.fts_authentication_details import ( - FtsAuthenticationDetails, -) +from clients.ctm_api_client.models.folder_properties_data import FolderPropertiesData +from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties import FoldersUsersSettingsAndMetadataProperties +from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties_from_b2_b import FoldersUsersSettingsAndMetadataPropertiesFromB2B +from clients.ctm_api_client.models.forecast_timeline_results import ForecastTimelineResults +from clients.ctm_api_client.models.forecast_timeline_when_result import ForecastTimelineWhenResult +from clients.ctm_api_client.models.forecast_timeline_year_result import ForecastTimelineYearResult +from clients.ctm_api_client.models.fts_authentication_details import FtsAuthenticationDetails from clients.ctm_api_client.models.fts_ftp_settings import FtsFtpSettings -from clients.ctm_api_client.models.fts_general_settings import ( - FtsGeneralSettings, -) -from clients.ctm_api_client.models.fts_ldap_authentication_details import ( - FtsLdapAuthenticationDetails, -) -from clients.ctm_api_client.models.fts_pam_authentication_details import ( - FtsPamAuthenticationDetails, -) +from clients.ctm_api_client.models.fts_general_settings import FtsGeneralSettings +from clients.ctm_api_client.models.fts_ldap_authentication_details import FtsLdapAuthenticationDetails +from clients.ctm_api_client.models.fts_pam_authentication_details import FtsPamAuthenticationDetails from clients.ctm_api_client.models.fts_settings_data import FtsSettingsData from clients.ctm_api_client.models.fts_sftp_settings import FtsSftpSettings -from clients.ctm_api_client.models.fts_user_home_directory_data import ( - FtsUserHomeDirectoryData, -) +from clients.ctm_api_client.models.fts_user_home_directory_data import FtsUserHomeDirectoryData from clients.ctm_api_client.models.gateway_data import GatewayData +from clients.ctm_api_client.models.gateway_details import GatewayDetails from clients.ctm_api_client.models.get_alert_info import GetAlertInfo -from clients.ctm_api_client.models.get_manifest_params import ( - GetManifestParams, -) -from clients.ctm_api_client.models.get_manifest_params_result import ( - GetManifestParamsResult, -) -from clients.ctm_api_client.models.groups_allowed_folders_properties import ( - GroupsAllowedFoldersProperties, -) +from clients.ctm_api_client.models.get_manifest_params import GetManifestParams +from clients.ctm_api_client.models.groups_allowed_folders_properties import GroupsAllowedFoldersProperties +from clients.ctm_api_client.models.heart_beat_response import HeartBeatResponse +from clients.ctm_api_client.models.high_availability_progress_information import HighAvailabilityProgressInformation +from clients.ctm_api_client.models.high_availability_status import HighAvailabilityStatus +from clients.ctm_api_client.models.high_availability_step_data import HighAvailabilityStepData from clients.ctm_api_client.models.host_group_data import HostGroupData -from clients.ctm_api_client.models.host_groups_data_list import ( - HostGroupsDataList, -) from clients.ctm_api_client.models.host_properties import HostProperties -from clients.ctm_api_client.models.hostgroup_agent_participation import ( - HostgroupAgentParticipation, -) -from clients.ctm_api_client.models.hostgroup_properties import ( - HostgroupProperties, -) +from clients.ctm_api_client.models.host_restriction import HostRestriction +from clients.ctm_api_client.models.hostgroup_agent_participation import HostgroupAgentParticipation +from clients.ctm_api_client.models.hostgroup_properties import HostgroupProperties from clients.ctm_api_client.models.hostname_port_pair import HostnamePortPair from clients.ctm_api_client.models.hub_data import HubData from clients.ctm_api_client.models.hub_status import HubStatus +from clients.ctm_api_client.models.index_time import IndexTime +from clients.ctm_api_client.models.input_stream_resource import InputStreamResource +from clients.ctm_api_client.models.item_info import ItemInfo +from clients.ctm_api_client.models.item_info_list import ItemInfoList from clients.ctm_api_client.models.job import Job +from clients.ctm_api_client.models.job_forecast_timeline_result import JobForecastTimelineResult from clients.ctm_api_client.models.job_level_auth import JobLevelAuth +from clients.ctm_api_client.models.job_order_info import JobOrderInfo +from clients.ctm_api_client.models.job_related_services_data import JobRelatedServicesData from clients.ctm_api_client.models.job_run_status import JobRunStatus +from clients.ctm_api_client.models.job_scheduling_plan import JobSchedulingPlan from clients.ctm_api_client.models.job_status_result import JobStatusResult +from clients.ctm_api_client.models.job_view import JobView from clients.ctm_api_client.models.jobtype_agent import JobtypeAgent from clients.ctm_api_client.models.key_value import KeyValue -from clients.ctm_api_client.models.key_value_list_result import ( - KeyValueListResult, -) +from clients.ctm_api_client.models.key_value_list import KeyValueList +from clients.ctm_api_client.models.key_value_object import KeyValueObject +from clients.ctm_api_client.models.key_value_pair import KeyValuePair from clients.ctm_api_client.models.key_value_type import KeyValueType -from clients.ctm_api_client.models.key_value_type_list_result import ( - KeyValueTypeListResult, -) from clients.ctm_api_client.models.known_hosts import KnownHosts -from clients.ctm_api_client.models.ldap_domain_settings import ( - LdapDomainSettings, -) +from clients.ctm_api_client.models.ldap_domain_settings import LdapDomainSettings from clients.ctm_api_client.models.log import Log from clients.ctm_api_client.models.log_data_arguments import LogDataArguments from clients.ctm_api_client.models.log_job_parameters import LogJobParameters @@ -321,292 +279,242 @@ from clients.ctm_api_client.models.log_params import LogParams from clients.ctm_api_client.models.login_credentials import LoginCredentials from clients.ctm_api_client.models.login_result import LoginResult -from clients.ctm_api_client.models.mft_entities_list_names import ( - MFTEntitiesListNames, -) -from clients.ctm_api_client.models.mft_external_user_projection_data import ( - MFTExternalUserProjectionData, -) -from clients.ctm_api_client.models.mft_folder_projection_data import ( - MFTFolderProjectionData, -) -from clients.ctm_api_client.models.mft_folder_projection_properties import ( - MFTFolderProjectionProperties, -) -from clients.ctm_api_client.models.mft_user_group_projection_data import ( - MFTUserGroupProjectionData, -) -from clients.ctm_api_client.models.manifest_group_item_object import ( - ManifestGroupItemObject, -) -from clients.ctm_api_client.models.manifest_group_object import ( - ManifestGroupObject, -) -from clients.ctm_api_client.models.matching import Matching -from clients.ctm_api_client.models.mft_configuration_data import ( - MftConfigurationData, -) -from clients.ctm_api_client.models.monitoring_privilege_category import ( - MonitoringPrivilegeCategory, -) +from clients.ctm_api_client.models.mft_entities_list_names import MFTEntitiesListNames +from clients.ctm_api_client.models.mft_external_user_projection_data import MFTExternalUserProjectionData +from clients.ctm_api_client.models.mft_folder_projection_data import MFTFolderProjectionData +from clients.ctm_api_client.models.mft_folder_projection_properties import MFTFolderProjectionProperties +from clients.ctm_api_client.models.mft_user_group_projection_data import MFTUserGroupProjectionData +from clients.ctm_api_client.models.manifest_group_item_object import ManifestGroupItemObject +from clients.ctm_api_client.models.manifest_group_object import ManifestGroupObject +from clients.ctm_api_client.models.mft_configuration_data import MftConfigurationData +from clients.ctm_api_client.models.mfte_db_config import MfteDbConfig +from clients.ctm_api_client.models.monitoring_privilege_category import MonitoringPrivilegeCategory +from clients.ctm_api_client.models.month import Month from clients.ctm_api_client.models.msg_data_arguments import MsgDataArguments -from clients.ctm_api_client.models.name_value_attribute import ( - NameValueAttribute, -) +from clients.ctm_api_client.models.name_code_pair import NameCodePair +from clients.ctm_api_client.models.name_status import NameStatus +from clients.ctm_api_client.models.name_value_attribute import NameValueAttribute from clients.ctm_api_client.models.new_sample import NewSample from clients.ctm_api_client.models.node import Node from clients.ctm_api_client.models.optional_value import OptionalValue -from clients.ctm_api_client.models.order_folder_parameters import ( - OrderFolderParameters, -) -from clients.ctm_api_client.models.order_folder_result_item import ( - OrderFolderResultItem, -) -from clients.ctm_api_client.models.order_folder_results import ( - OrderFolderResults, -) +from clients.ctm_api_client.models.order_folder_parameters import OrderFolderParameters +from clients.ctm_api_client.models.order_folder_result_item import OrderFolderResultItem +from clients.ctm_api_client.models.order_folder_results import OrderFolderResults +from clients.ctm_api_client.models.order_info import OrderInfo from clients.ctm_api_client.models.order_parameters import OrderParameters from clients.ctm_api_client.models.ordered_item_item import OrderedItemItem +from clients.ctm_api_client.models.organization_group_export_data import OrganizationGroupExportData +from clients.ctm_api_client.models.organization_group_info import OrganizationGroupInfo +from clients.ctm_api_client.models.organization_group_name import OrganizationGroupName +from clients.ctm_api_client.models.organization_group_user_authorization_simulation_data import OrganizationGroupUserAuthorizationSimulationData from clients.ctm_api_client.models.output import Output from clients.ctm_api_client.models.output_params import OutputParams +from clients.ctm_api_client.models.participation_date import ParticipationDate +from clients.ctm_api_client.models.participation_date_time import ParticipationDateTime +from clients.ctm_api_client.models.participation_event import ParticipationEvent +from clients.ctm_api_client.models.participation_rule import ParticipationRule +from clients.ctm_api_client.models.participation_time import ParticipationTime from clients.ctm_api_client.models.passwords_object import PasswordsObject from clients.ctm_api_client.models.performance import Performance +from clients.ctm_api_client.models.pg_attributes import PgAttributes from clients.ctm_api_client.models.pgp_template_data import PgpTemplateData from clients.ctm_api_client.models.ping_agent_params import PingAgentParams -from clients.ctm_api_client.models.planning_privilege_category import ( - PlanningPrivilegeCategory, -) +from clients.ctm_api_client.models.planning_privilege_category import PlanningPrivilegeCategory from clients.ctm_api_client.models.plugin_data import PluginData from clients.ctm_api_client.models.plugin_mng_auth import PluginMngAuth -from clients.ctm_api_client.models.pool_variables_error_info import ( - PoolVariablesErrorInfo, -) -from clients.ctm_api_client.models.pool_variables_name import ( - PoolVariablesName, -) -from clients.ctm_api_client.models.pool_variables_name_value import ( - PoolVariablesNameValue, -) -from clients.ctm_api_client.models.possible_value_properties import ( - PossibleValueProperties, -) +from clients.ctm_api_client.models.poll_forecast_timeline_results import PollForecastTimelineResults +from clients.ctm_api_client.models.poll_id import PollID +from clients.ctm_api_client.models.pool_variables_error_info import PoolVariablesErrorInfo +from clients.ctm_api_client.models.pool_variables_name import PoolVariablesName +from clients.ctm_api_client.models.pool_variables_name_value import PoolVariablesNameValue +from clients.ctm_api_client.models.possible_value_properties import PossibleValueProperties +from clients.ctm_api_client.models.postgres_def import PostgresDef +from clients.ctm_api_client.models.privilege_controlm import PrivilegeControlm from clients.ctm_api_client.models.privilege_name import PrivilegeName -from clients.ctm_api_client.models.privilege_name_controlm import ( - PrivilegeNameControlm, -) +from clients.ctm_api_client.models.privilege_name_controlm import PrivilegeNameControlm from clients.ctm_api_client.models.privileges import Privileges -from clients.ctm_api_client.models.product_description import ( - ProductDescription, -) +from clients.ctm_api_client.models.product_description import ProductDescription from clients.ctm_api_client.models.product_sections import ProductSections -from clients.ctm_api_client.models.provision_advance_parameters import ( - ProvisionAdvanceParameters, -) +from clients.ctm_api_client.models.provision_advance_parameters import ProvisionAdvanceParameters +from clients.ctm_api_client.models.provision_repo import ProvisionRepo +from clients.ctm_api_client.models.provision_repos_results import ProvisionReposResults from clients.ctm_api_client.models.query import Query from clients.ctm_api_client.models.raw_cms_xml_request import RawCmsXmlRequest from clients.ctm_api_client.models.read_only_status import ReadOnlyStatus -from clients.ctm_api_client.models.report_date_time_settings import ( - ReportDateTimeSettings, -) +from clients.ctm_api_client.models.report_date_time_settings import ReportDateTimeSettings from clients.ctm_api_client.models.report_filter import ReportFilter -from clients.ctm_api_client.models.report_filters import ReportFilters from clients.ctm_api_client.models.report_result import ReportResult -from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_log_job_parameters import ( - RequestParametersWrapperEMDefaultRequestParametersLogJobParameters, -) -from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_why_job_parameter import ( - RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter, -) +from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_log_job_parameters import RequestParametersWrapperEMDefaultRequestParametersLogJobParameters +from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_why_job_parameter import RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter from clients.ctm_api_client.models.rerun_parameters import RerunParameters -from clients.ctm_api_client.models.rerun_zos_parameters import ( - RerunZosParameters, -) +from clients.ctm_api_client.models.rerun_zos_parameters import RerunZosParameters from clients.ctm_api_client.models.resource_max import ResourceMax from clients.ctm_api_client.models.resource_obj import ResourceObj from clients.ctm_api_client.models.resource_param import ResourceParam -from clients.ctm_api_client.models.resource_set import ResourceSet from clients.ctm_api_client.models.restart_step import RestartStep from clients.ctm_api_client.models.results_status import ResultsStatus from clients.ctm_api_client.models.role_data import RoleData from clients.ctm_api_client.models.role_data_full import RoleDataFull from clients.ctm_api_client.models.role_header import RoleHeader -from clients.ctm_api_client.models.role_header_list import RoleHeaderList from clients.ctm_api_client.models.role_properties import RoleProperties +from clients.ctm_api_client.models.rplan_result_item import RplanResultItem +from clients.ctm_api_client.models.rplan_results import RplanResults +from clients.ctm_api_client.models.rule_action_data import RuleActionData +from clients.ctm_api_client.models.rule_conditions import RuleConditions from clients.ctm_api_client.models.rule_criteria import RuleCriteria from clients.ctm_api_client.models.rule_projection import RuleProjection +from clients.ctm_api_client.models.rule_projection_data import RuleProjectionData +from clients.ctm_api_client.models.rule_properties_data import RulePropertiesData from clients.ctm_api_client.models.rule_statistics import RuleStatistics -from clients.ctm_api_client.models.rules_statistic_list import ( - RulesStatisticList, -) -from clients.ctm_api_client.models.rules_statistic_list_summary import ( - RulesStatisticListSummary, -) +from clients.ctm_api_client.models.rule_variable import RuleVariable +from clients.ctm_api_client.models.rules_statistic_list import RulesStatisticList +from clients.ctm_api_client.models.rules_statistic_list_summary import RulesStatisticListSummary +from clients.ctm_api_client.models.run_as_available_server import RunAsAvailableServer from clients.ctm_api_client.models.run_as_user_data import RunAsUserData -from clients.ctm_api_client.models.run_as_user_details_data import ( - RunAsUserDetailsData, -) -from clients.ctm_api_client.models.run_as_user_key_data import ( - RunAsUserKeyData, -) -from clients.ctm_api_client.models.run_as_users_list import RunAsUsersList +from clients.ctm_api_client.models.run_as_user_details_data import RunAsUserDetailsData +from clients.ctm_api_client.models.run_as_user_key_data import RunAsUserKeyData +from clients.ctm_api_client.models.run_command_action_data import RunCommandActionData +from clients.ctm_api_client.models.run_folder_job_action_data import RunFolderJobActionData from clients.ctm_api_client.models.run_report import RunReport from clients.ctm_api_client.models.run_report_info import RunReportInfo from clients.ctm_api_client.models.run_result import RunResult -from clients.ctm_api_client.models.runas_definition_auth import ( - RunasDefinitionAuth, -) +from clients.ctm_api_client.models.runas_definition_auth import RunasDefinitionAuth from clients.ctm_api_client.models.runas_user_auth import RunasUserAuth from clients.ctm_api_client.models.sla_service import SLAService -from clients.ctm_api_client.models.sla_service_status_by_jobs import ( - SLAServiceStatusByJobs, -) -from clients.ctm_api_client.models.saml2_identity_provider import ( - Saml2IdentityProvider, -) +from clients.ctm_api_client.models.sla_service_status_by_jobs import SLAServiceStatusByJobs +from clients.ctm_api_client.models.ssh_key import SSHKey +from clients.ctm_api_client.models.ssh_key_data import SSHKeyData +from clients.ctm_api_client.models.ssh_key_secret_data import SSHKeySecretData +from clients.ctm_api_client.models.ssh_public_key import SShPublicKey +from clients.ctm_api_client.models.saml2_identity_provider import Saml2IdentityProvider from clients.ctm_api_client.models.saml_status import SamlStatus from clients.ctm_api_client.models.sample import Sample +from clients.ctm_api_client.models.scheduling_plan_response import SchedulingPlanResponse from clients.ctm_api_client.models.search_params import SearchParams from clients.ctm_api_client.models.search_tag_tuple import SearchTagTuple +from clients.ctm_api_client.models.secret_descriptors import SecretDescriptors from clients.ctm_api_client.models.secret_key_value import SecretKeyValue from clients.ctm_api_client.models.secret_value import SecretValue -from clients.ctm_api_client.models.section_metadata_properties import ( - SectionMetadataProperties, -) +from clients.ctm_api_client.models.section_metadata_properties import SectionMetadataProperties +from clients.ctm_api_client.models.server_definition_params import ServerDefinitionParams +from clients.ctm_api_client.models.server_edit_params import ServerEditParams +from clients.ctm_api_client.models.server_supported_features_result import ServerSupportedFeaturesResult from clients.ctm_api_client.models.service_auth import ServiceAuth -from clients.ctm_api_client.models.service_auth_action import ( - ServiceAuthAction, -) -from clients.ctm_api_client.models.service_provider_information import ( - ServiceProviderInformation, -) +from clients.ctm_api_client.models.service_auth_action import ServiceAuthAction +from clients.ctm_api_client.models.service_data import ServiceData +from clients.ctm_api_client.models.service_provider_information import ServiceProviderInformation from clients.ctm_api_client.models.set_agent_params import SetAgentParams -from clients.ctm_api_client.models.set_agent_params_list import ( - SetAgentParamsList, -) -from clients.ctm_api_client.models.setting_key_properties import ( - SettingKeyProperties, -) +from clients.ctm_api_client.models.set_agent_params_list import SetAgentParamsList +from clients.ctm_api_client.models.setting_key_properties import SettingKeyProperties from clients.ctm_api_client.models.setting_properties import SettingProperties -from clients.ctm_api_client.models.setting_properties_object import ( - SettingPropertiesObject, -) -from clients.ctm_api_client.models.settings_metadata_properties import ( - SettingsMetadataProperties, -) -from clients.ctm_api_client.models.settings_update_object import ( - SettingsUpdateObject, -) +from clients.ctm_api_client.models.setting_properties_object import SettingPropertiesObject +from clients.ctm_api_client.models.settings_metadata_properties import SettingsMetadataProperties +from clients.ctm_api_client.models.settings_update_object import SettingsUpdateObject +from clients.ctm_api_client.models.shared_access import SharedAccess +from clients.ctm_api_client.models.shout_destination import ShoutDestination +from clients.ctm_api_client.models.shout_destination_address_list import ShoutDestinationAddressList +from clients.ctm_api_client.models.shout_destination_list import ShoutDestinationList +from clients.ctm_api_client.models.shout_destination_value import ShoutDestinationValue +from clients.ctm_api_client.models.shout_destinations_list_response import ShoutDestinationsListResponse +from clients.ctm_api_client.models.site_standard import SiteStandard +from clients.ctm_api_client.models.site_standard_business_parameter import SiteStandardBusinessParameter +from clients.ctm_api_client.models.site_standard_change_details import SiteStandardChangeDetails +from clients.ctm_api_client.models.site_standard_condition import SiteStandardCondition +from clients.ctm_api_client.models.site_standard_data import SiteStandardData +from clients.ctm_api_client.models.site_standard_details import SiteStandardDetails +from clients.ctm_api_client.models.site_standard_details_list import SiteStandardDetailsList +from clients.ctm_api_client.models.site_standard_field_rule import SiteStandardFieldRule +from clients.ctm_api_client.models.site_standard_internal_rule import SiteStandardInternalRule +from clients.ctm_api_client.models.site_standard_operator_value_options import SiteStandardOperatorValueOptions +from clients.ctm_api_client.models.site_standard_pattern_part import SiteStandardPatternPart +from clients.ctm_api_client.models.site_standard_policies_file_results import SiteStandardPoliciesFileResults +from clients.ctm_api_client.models.site_standard_policy_details import SiteStandardPolicyDetails +from clients.ctm_api_client.models.site_standard_policy_details_list import SiteStandardPolicyDetailsList +from clients.ctm_api_client.models.site_standard_possible_options import SiteStandardPossibleOptions +from clients.ctm_api_client.models.site_standard_possible_pattern import SiteStandardPossiblePattern +from clients.ctm_api_client.models.site_standard_possible_value import SiteStandardPossibleValue +from clients.ctm_api_client.models.site_standard_restriction import SiteStandardRestriction +from clients.ctm_api_client.models.site_standards_list import SiteStandardsList +from clients.ctm_api_client.models.sites_extended_data import SitesExtendedData from clients.ctm_api_client.models.ssh_key_properties import SshKeyProperties from clients.ctm_api_client.models.statistics import Statistics -from clients.ctm_api_client.models.statistics_average_info import ( - StatisticsAverageInfo, -) +from clients.ctm_api_client.models.statistics_average_info import StatisticsAverageInfo from clients.ctm_api_client.models.statistics_period import StatisticsPeriod -from clients.ctm_api_client.models.statistics_run_info import ( - StatisticsRunInfo, -) -from clients.ctm_api_client.models.statistics_single_run import ( - StatisticsSingleRun, -) -from clients.ctm_api_client.models.string_list_result import StringListResult +from clients.ctm_api_client.models.statistics_run_info import StatisticsRunInfo +from clients.ctm_api_client.models.statistics_single_run import StatisticsSingleRun +from clients.ctm_api_client.models.string_list import StringList from clients.ctm_api_client.models.success_data import SuccessData from clients.ctm_api_client.models.summary import Summary +from clients.ctm_api_client.models.support_feature_param import SupportFeatureParam +from clients.ctm_api_client.models.supported_shout_destinations import SupportedShoutDestinations +from clients.ctm_api_client.models.supported_shout_destinations_response import SupportedShoutDestinationsResponse +from clients.ctm_api_client.models.sys_admin_info import SysAdminInfo from clients.ctm_api_client.models.system_parameter import SystemParameter +from clients.ctm_api_client.models.system_parameters_list import SystemParametersList from clients.ctm_api_client.models.system_setting import SystemSetting -from clients.ctm_api_client.models.system_setting_annotation_property import ( - SystemSettingAnnotationProperty, -) -from clients.ctm_api_client.models.system_setting_key_value import ( - SystemSettingKeyValue, -) -from clients.ctm_api_client.models.system_setting_key_value_component import ( - SystemSettingKeyValueComponent, -) -from clients.ctm_api_client.models.system_setting_ldap import ( - SystemSettingLdap, -) -from clients.ctm_api_client.models.system_setting_property import ( - SystemSettingProperty, -) -from clients.ctm_api_client.models.term_group import TermGroup +from clients.ctm_api_client.models.system_setting_key_value import SystemSettingKeyValue +from clients.ctm_api_client.models.system_setting_key_value_component import SystemSettingKeyValueComponent +from clients.ctm_api_client.models.system_setting_ldap import SystemSettingLdap +from clients.ctm_api_client.models.system_setting_property import SystemSettingProperty +from clients.ctm_api_client.models.table_sec_attrs import TableSecAttrs +from clients.ctm_api_client.models.token_by_value_request import TokenByValueRequest from clients.ctm_api_client.models.token_data_request import TokenDataRequest -from clients.ctm_api_client.models.token_data_response import ( - TokenDataResponse, -) +from clients.ctm_api_client.models.token_data_response import TokenDataResponse from clients.ctm_api_client.models.token_list import TokenList -from clients.ctm_api_client.models.token_list_array import TokenListArray -from clients.ctm_api_client.models.tools_privilege_category import ( - ToolsPrivilegeCategory, -) +from clients.ctm_api_client.models.tools_privilege_category import ToolsPrivilegeCategory from clients.ctm_api_client.models.topology import Topology +from clients.ctm_api_client.models.trial_information import TrialInformation +from clients.ctm_api_client.models.ui_props import UiProps +from clients.ctm_api_client.models.un_ordered_jobs_list import UnOrderedJobsList +from clients.ctm_api_client.models.update_gateway_params import UpdateGatewayParams from clients.ctm_api_client.models.upgrade_agent_info import UpgradeAgentInfo -from clients.ctm_api_client.models.upgrade_agent_info_list import ( - UpgradeAgentInfoList, -) from clients.ctm_api_client.models.upgrade_info import UpgradeInfo -from clients.ctm_api_client.models.upgrade_notification import ( - UpgradeNotification, -) +from clients.ctm_api_client.models.upgrade_notification import UpgradeNotification from clients.ctm_api_client.models.upgrade_record import UpgradeRecord -from clients.ctm_api_client.models.upgrade_record_list import ( - UpgradeRecordList, -) +from clients.ctm_api_client.models.upgrade_record_list import UpgradeRecordList from clients.ctm_api_client.models.upgrade_request import UpgradeRequest from clients.ctm_api_client.models.upgrade_response import UpgradeResponse -from clients.ctm_api_client.models.user_additional_properties import ( - UserAdditionalProperties, -) -from clients.ctm_api_client.models.user_allowed_folders_properties import ( - UserAllowedFoldersProperties, -) +from clients.ctm_api_client.models.usage_per_ctm_result import UsagePerCtmResult +from clients.ctm_api_client.models.user_additional_properties import UserAdditionalProperties +from clients.ctm_api_client.models.user_allowed_folders_properties import UserAllowedFoldersProperties +from clients.ctm_api_client.models.user_condition_data import UserConditionData from clients.ctm_api_client.models.user_data import UserData -from clients.ctm_api_client.models.user_group_details_data import ( - UserGroupDetailsData, -) -from clients.ctm_api_client.models.user_group_properties_data import ( - UserGroupPropertiesData, -) +from clients.ctm_api_client.models.user_group_details_data import UserGroupDetailsData +from clients.ctm_api_client.models.user_group_properties_data import UserGroupPropertiesData from clients.ctm_api_client.models.user_header import UserHeader +from clients.ctm_api_client.models.user_or_group_extended import UserOrGroupExtended from clients.ctm_api_client.models.user_password import UserPassword from clients.ctm_api_client.models.user_preferences import UserPreferences -from clients.ctm_api_client.models.validation_properties import ( - ValidationProperties, -) +from clients.ctm_api_client.models.users_companies import UsersCompanies +from clients.ctm_api_client.models.validation_properties import ValidationProperties from clients.ctm_api_client.models.value import Value -from clients.ctm_api_client.models.values import Values -from clients.ctm_api_client.models.variable_name_value import ( - VariableNameValue, -) +from clients.ctm_api_client.models.value_list_item import ValueListItem +from clients.ctm_api_client.models.variable_name_value import VariableNameValue from clients.ctm_api_client.models.variable_names import VariableNames from clients.ctm_api_client.models.variables import Variables -from clients.ctm_api_client.models.viewpoint_manager_privilege_category import ( - ViewpointManagerPrivilegeCategory, -) +from clients.ctm_api_client.models.vault_param import VaultParam +from clients.ctm_api_client.models.viewpoint_manager_privilege_category import ViewpointManagerPrivilegeCategory +from clients.ctm_api_client.models.virtual_folder_condition_data import VirtualFolderConditionData +from clients.ctm_api_client.models.wda_agents_data_list import WDAAgentsDataList +from clients.ctm_api_client.models.wda_dataset_input import WDADatasetInput +from clients.ctm_api_client.models.wda_datasets_and_schemas import WDADatasetsAndSchemas from clients.ctm_api_client.models.warning_data import WarningData from clients.ctm_api_client.models.warning_list import WarningList -from clients.ctm_api_client.models.warnings_collection import ( - WarningsCollection, -) +from clients.ctm_api_client.models.warnings_collection import WarningsCollection from clients.ctm_api_client.models.why_job_parameters import WhyJobParameters from clients.ctm_api_client.models.why_job_result_item import WhyJobResultItem from clients.ctm_api_client.models.why_job_results import WhyJobResults -from clients.ctm_api_client.models.workflow_insights_status import ( - WorkflowInsightsStatus, -) -from clients.ctm_api_client.models.workload_policies_file_results import ( - WorkloadPoliciesFileResults, -) +from clients.ctm_api_client.models.workbench_import_result import WorkbenchImportResult +from clients.ctm_api_client.models.workflow_insights_data_export_status import WorkflowInsightsDataExportStatus +from clients.ctm_api_client.models.workflow_insights_status import WorkflowInsightsStatus +from clients.ctm_api_client.models.workload_policies_file_results import WorkloadPoliciesFileResults from clients.ctm_api_client.models.workload_policy import WorkloadPolicy -from clients.ctm_api_client.models.workload_policy_list import ( - WorkloadPolicyList, -) -from clients.ctm_api_client.models.workload_policy_state import ( - WorkloadPolicyState, -) -from clients.ctm_api_client.models.workload_policy_state_list import ( - WorkloadPolicyStateList, -) +from clients.ctm_api_client.models.workload_policy_list import WorkloadPolicyList +from clients.ctm_api_client.models.workload_policy_state import WorkloadPolicyState +from clients.ctm_api_client.models.workload_policy_state_list import WorkloadPolicyStateList from clients.ctm_api_client.models.workspace_folder import WorkspaceFolder from clients.ctm_api_client.models.workspace_folders import WorkspaceFolders +from clients.ctm_api_client.models.year import Year from clients.ctm_api_client.models.zoo_keeper import ZooKeeper from clients.ctm_api_client.models.zos_template_data import ZosTemplateData + diff --git a/src/clients/ctm_api_client/api/__init__.py b/src/clients/ctm_api_client/api/__init__.py index 254db28..0a46d3b 100644 --- a/src/clients/ctm_api_client/api/__init__.py +++ b/src/clients/ctm_api_client/api/__init__.py @@ -4,6 +4,7 @@ # import apis into api package from clients.ctm_api_client.api.archive_api import ArchiveApi +from clients.ctm_api_client.api.authentication_api import AuthenticationApi from clients.ctm_api_client.api.build_api import BuildApi from clients.ctm_api_client.api.config_api import ConfigApi from clients.ctm_api_client.api.deploy_api import DeployApi @@ -11,3 +12,5 @@ from clients.ctm_api_client.api.reporting_api import ReportingApi from clients.ctm_api_client.api.run_api import RunApi from clients.ctm_api_client.api.session_api import SessionApi +from clients.ctm_api_client.api.status_api import StatusApi +from clients.ctm_api_client.api.usage_api import UsageApi diff --git a/src/clients/ctm_api_client/api/archive_api.py b/src/clients/ctm_api_client/api/archive_api.py index 43bfeaa..1b6c198 100644 --- a/src/clients/ctm_api_client/api/archive_api.py +++ b/src/clients/ctm_api_client/api/archive_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class ArchiveApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -39,117 +43,153 @@ def get_archive_job_log(self, job_id, run_no, **kwargs): # noqa: E501 Get job log by unique job key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_archive_job_log(job_id, run_no, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param int run_no: The execution number in case of multiple executions (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param run_no: The execution number in case of multiple executions (required) + :type run_no: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_archive_job_log_with_http_info( - job_id, run_no, **kwargs - ) # noqa: E501 - else: - (data) = self.get_archive_job_log_with_http_info( - job_id, run_no, **kwargs - ) # noqa: E501 - return data - - def get_archive_job_log_with_http_info( - self, job_id, run_no, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.get_archive_job_log_with_http_info(job_id, run_no, **kwargs) # noqa: E501 + + def get_archive_job_log_with_http_info(self, job_id, run_no, **kwargs): # noqa: E501 """Get job log # noqa: E501 Get job log by unique job key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_archive_job_log_with_http_info(job_id, run_no, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param int run_no: The execution number in case of multiple executions (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param run_no: The execution number in case of multiple executions (required) + :type run_no: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id", "run_no"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id', + 'run_no' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_archive_job_log" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_archive_job_log`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_archive_job_log`") # noqa: E501 # verify the required parameter 'run_no' is set - if self.api_client.client_side_validation and ( - "run_no" not in params or params["run_no"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `run_no` when calling `get_archive_job_log`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('run_no' not in local_var_params or # noqa: E501 + local_var_params['run_no'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_no` when calling `get_archive_job_log`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - if "run_no" in params: - query_params.append(("runNo", params["run_no"])) # noqa: E501 + if 'run_no' in local_var_params and local_var_params['run_no'] is not None: # noqa: E501 + query_params.append(('runNo', local_var_params['run_no'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/archive/{jobId}/log", - "GET", + '/archive/{jobId}/log', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_archive_job_output(self, job_id, run_no, **kwargs): # noqa: E501 """Get job output # noqa: E501 @@ -157,117 +197,153 @@ def get_archive_job_output(self, job_id, run_no, **kwargs): # noqa: E501 Get job output by unique job key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_archive_job_output(job_id, run_no, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param int run_no: The execution number in case of multiple executions (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param run_no: The execution number in case of multiple executions (required) + :type run_no: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_archive_job_output_with_http_info( - job_id, run_no, **kwargs - ) # noqa: E501 - else: - (data) = self.get_archive_job_output_with_http_info( - job_id, run_no, **kwargs - ) # noqa: E501 - return data - - def get_archive_job_output_with_http_info( - self, job_id, run_no, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.get_archive_job_output_with_http_info(job_id, run_no, **kwargs) # noqa: E501 + + def get_archive_job_output_with_http_info(self, job_id, run_no, **kwargs): # noqa: E501 """Get job output # noqa: E501 Get job output by unique job key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_archive_job_output_with_http_info(job_id, run_no, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param int run_no: The execution number in case of multiple executions (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param run_no: The execution number in case of multiple executions (required) + :type run_no: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id", "run_no"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id', + 'run_no' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_archive_job_output" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_archive_job_output`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_archive_job_output`") # noqa: E501 # verify the required parameter 'run_no' is set - if self.api_client.client_side_validation and ( - "run_no" not in params or params["run_no"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `run_no` when calling `get_archive_job_output`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('run_no' not in local_var_params or # noqa: E501 + local_var_params['run_no'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_no` when calling `get_archive_job_output`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - if "run_no" in params: - query_params.append(("runNo", params["run_no"])) # noqa: E501 + if 'run_no' in local_var_params and local_var_params['run_no'] is not None: # noqa: E501 + query_params.append(('runNo', local_var_params['run_no'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/archive/{jobId}/output", - "GET", + '/archive/{jobId}/output', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def search_jobs(self, **kwargs): # noqa: E501 """Search jobs in Archive # noqa: E501 @@ -275,43 +351,73 @@ def search_jobs(self, **kwargs): # noqa: E501 Get all the Control-M Archiving jobs that match the search criterias # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_jobs(async_req=True) >>> result = thread.get() - :param async_req bool - :param int limit: maximum jobs to fetch (default 500). - :param str jobname: The name of the job. - :param str jobid: - :param str ctm: The name of the Control-M server in which the job was ordered from. - :param str server: The name of the Control-M server in which the job was ordered from. - :param str folder: The name of the parent folder. - :param str from_time: Job execution start date. Date format - YYYY-MM-DD. - :param str to_time: Job execution end date. Date format - YYYY-MM-DD. - :param str log_contains: Job log must contain the given phrase. - :param str output_contains: Job output must contain the given phrase. - :param str application: The name of the application the jobs belong to. - :param str sub_application: The name of the sub-application the jobs belong to. - :param str library: The job's library name. - :param str mem_name: Member name. - :param str mem_library: Member's library. - :param str host: - :param str host_group: Job's host group. - :param str run_as: Runs as (username on agent machine). - :param str order_id: Job's order id. - :param str status: The job's end status. - :param str order_date_from: Indicating a date by which will look for jobs that their order date started afterwards. Date format - YYYY-MM-DD. - :param str order_date_to: Indicating a date by which will look for jobs that their order date ended before. Date format - YYYY-MM-DD. - :param int number_of_runs: - :return: ArchiveJobsList + :param limit: maximum jobs to fetch (default 500). + :type limit: int + :param jobname: The name of the job. + :type jobname: str + :param jobid: + :type jobid: str + :param ctm: The name of the Control-M server in which the job was ordered from. + :type ctm: str + :param server: The name of the Control-M server in which the job was ordered from. + :type server: str + :param folder: The name of the parent folder. + :type folder: str + :param from_time: Job execution start date. Date format - YYYY-MM-DD. + :type from_time: str + :param to_time: Job execution end date. Date format - YYYY-MM-DD. + :type to_time: str + :param log_contains: Job log must contain the given phrase. + :type log_contains: str + :param output_contains: Job output must contain the given phrase. + :type output_contains: str + :param application: The name of the application the jobs belong to. + :type application: str + :param sub_application: The name of the sub-application the jobs belong to. + :type sub_application: str + :param library: The job's library name. + :type library: str + :param mem_name: Member name. + :type mem_name: str + :param mem_library: Member's library. + :type mem_library: str + :param host: + :type host: str + :param host_group: Job's host group. + :type host_group: str + :param run_as: Runs as (username on agent machine). + :type run_as: str + :param order_id: Job's order id. + :type order_id: str + :param status: The job's end status. + :type status: str + :param order_date_from: Indicating a date by which will look for jobs that their order date started afterwards. Date format - YYYY-MM-DD. + :type order_date_from: str + :param order_date_to: Indicating a date by which will look for jobs that their order date ended before. Date format - YYYY-MM-DD. + :type order_date_to: str + :param number_of_runs: + :type number_of_runs: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: ArchiveJobsList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.search_jobs_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.search_jobs_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.search_jobs_with_http_info(**kwargs) # noqa: E501 def search_jobs_with_http_info(self, **kwargs): # noqa: E501 """Search jobs in Archive # noqa: E501 @@ -319,178 +425,219 @@ def search_jobs_with_http_info(self, **kwargs): # noqa: E501 Get all the Control-M Archiving jobs that match the search criterias # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_jobs_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param int limit: maximum jobs to fetch (default 500). - :param str jobname: The name of the job. - :param str jobid: - :param str ctm: The name of the Control-M server in which the job was ordered from. - :param str server: The name of the Control-M server in which the job was ordered from. - :param str folder: The name of the parent folder. - :param str from_time: Job execution start date. Date format - YYYY-MM-DD. - :param str to_time: Job execution end date. Date format - YYYY-MM-DD. - :param str log_contains: Job log must contain the given phrase. - :param str output_contains: Job output must contain the given phrase. - :param str application: The name of the application the jobs belong to. - :param str sub_application: The name of the sub-application the jobs belong to. - :param str library: The job's library name. - :param str mem_name: Member name. - :param str mem_library: Member's library. - :param str host: - :param str host_group: Job's host group. - :param str run_as: Runs as (username on agent machine). - :param str order_id: Job's order id. - :param str status: The job's end status. - :param str order_date_from: Indicating a date by which will look for jobs that their order date started afterwards. Date format - YYYY-MM-DD. - :param str order_date_to: Indicating a date by which will look for jobs that their order date ended before. Date format - YYYY-MM-DD. - :param int number_of_runs: - :return: ArchiveJobsList + :param limit: maximum jobs to fetch (default 500). + :type limit: int + :param jobname: The name of the job. + :type jobname: str + :param jobid: + :type jobid: str + :param ctm: The name of the Control-M server in which the job was ordered from. + :type ctm: str + :param server: The name of the Control-M server in which the job was ordered from. + :type server: str + :param folder: The name of the parent folder. + :type folder: str + :param from_time: Job execution start date. Date format - YYYY-MM-DD. + :type from_time: str + :param to_time: Job execution end date. Date format - YYYY-MM-DD. + :type to_time: str + :param log_contains: Job log must contain the given phrase. + :type log_contains: str + :param output_contains: Job output must contain the given phrase. + :type output_contains: str + :param application: The name of the application the jobs belong to. + :type application: str + :param sub_application: The name of the sub-application the jobs belong to. + :type sub_application: str + :param library: The job's library name. + :type library: str + :param mem_name: Member name. + :type mem_name: str + :param mem_library: Member's library. + :type mem_library: str + :param host: + :type host: str + :param host_group: Job's host group. + :type host_group: str + :param run_as: Runs as (username on agent machine). + :type run_as: str + :param order_id: Job's order id. + :type order_id: str + :param status: The job's end status. + :type status: str + :param order_date_from: Indicating a date by which will look for jobs that their order date started afterwards. Date format - YYYY-MM-DD. + :type order_date_from: str + :param order_date_to: Indicating a date by which will look for jobs that their order date ended before. Date format - YYYY-MM-DD. + :type order_date_to: str + :param number_of_runs: + :type number_of_runs: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(ArchiveJobsList, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "limit", - "jobname", - "jobid", - "ctm", - "server", - "folder", - "from_time", - "to_time", - "log_contains", - "output_contains", - "application", - "sub_application", - "library", - "mem_name", - "mem_library", - "host", - "host_group", - "run_as", - "order_id", - "status", - "order_date_from", - "order_date_to", - "number_of_runs", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): + 'limit', + 'jobname', + 'jobid', + 'ctm', + 'server', + 'folder', + 'from_time', + 'to_time', + 'log_contains', + 'output_contains', + 'application', + 'sub_application', + 'library', + 'mem_name', + 'mem_library', + 'host', + 'host_group', + 'run_as', + 'order_id', + 'status', + 'order_date_from', + 'order_date_to', + 'number_of_runs' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method search_jobs" % key ) - params[key] = val - del params["kwargs"] - - if self.api_client.client_side_validation and ( - "limit" in params and params["limit"] > 1000 - ): # noqa: E501 - raise ValueError( - "Invalid value for parameter `limit` when calling `search_jobs`, must be a value less than or equal to `1000`" - ) # noqa: E501 - if self.api_client.client_side_validation and ( - "limit" in params and params["limit"] < 1 - ): # noqa: E501 - raise ValueError( - "Invalid value for parameter `limit` when calling `search_jobs`, must be a value greater than or equal to `1`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 1000: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `search_jobs`, must be a value less than or equal to `1000`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `search_jobs`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if "limit" in params: - query_params.append(("limit", params["limit"])) # noqa: E501 - if "jobname" in params: - query_params.append(("jobname", params["jobname"])) # noqa: E501 - if "jobid" in params: - query_params.append(("jobid", params["jobid"])) # noqa: E501 - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "folder" in params: - query_params.append(("folder", params["folder"])) # noqa: E501 - if "from_time" in params: - query_params.append(("fromTime", params["from_time"])) # noqa: E501 - if "to_time" in params: - query_params.append(("toTime", params["to_time"])) # noqa: E501 - if "log_contains" in params: - query_params.append(("logContains", params["log_contains"])) # noqa: E501 - if "output_contains" in params: - query_params.append( - ("outputContains", params["output_contains"]) - ) # noqa: E501 - if "application" in params: - query_params.append(("application", params["application"])) # noqa: E501 - if "sub_application" in params: - query_params.append( - ("subApplication", params["sub_application"]) - ) # noqa: E501 - if "library" in params: - query_params.append(("library", params["library"])) # noqa: E501 - if "mem_name" in params: - query_params.append(("memName", params["mem_name"])) # noqa: E501 - if "mem_library" in params: - query_params.append(("memLibrary", params["mem_library"])) # noqa: E501 - if "host" in params: - query_params.append(("host", params["host"])) # noqa: E501 - if "host_group" in params: - query_params.append(("hostGroup", params["host_group"])) # noqa: E501 - if "run_as" in params: - query_params.append(("runAs", params["run_as"])) # noqa: E501 - if "order_id" in params: - query_params.append(("orderId", params["order_id"])) # noqa: E501 - if "status" in params: - query_params.append(("status", params["status"])) # noqa: E501 - if "order_date_from" in params: - query_params.append( - ("orderDateFrom", params["order_date_from"]) - ) # noqa: E501 - if "order_date_to" in params: - query_params.append(("orderDateTo", params["order_date_to"])) # noqa: E501 - if "number_of_runs" in params: - query_params.append( - ("numberOfRuns", params["number_of_runs"]) - ) # noqa: E501 - - header_params = {} + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'jobname' in local_var_params and local_var_params['jobname'] is not None: # noqa: E501 + query_params.append(('jobname', local_var_params['jobname'])) # noqa: E501 + if 'jobid' in local_var_params and local_var_params['jobid'] is not None: # noqa: E501 + query_params.append(('jobid', local_var_params['jobid'])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'folder' in local_var_params and local_var_params['folder'] is not None: # noqa: E501 + query_params.append(('folder', local_var_params['folder'])) # noqa: E501 + if 'from_time' in local_var_params and local_var_params['from_time'] is not None: # noqa: E501 + query_params.append(('fromTime', local_var_params['from_time'])) # noqa: E501 + if 'to_time' in local_var_params and local_var_params['to_time'] is not None: # noqa: E501 + query_params.append(('toTime', local_var_params['to_time'])) # noqa: E501 + if 'log_contains' in local_var_params and local_var_params['log_contains'] is not None: # noqa: E501 + query_params.append(('logContains', local_var_params['log_contains'])) # noqa: E501 + if 'output_contains' in local_var_params and local_var_params['output_contains'] is not None: # noqa: E501 + query_params.append(('outputContains', local_var_params['output_contains'])) # noqa: E501 + if 'application' in local_var_params and local_var_params['application'] is not None: # noqa: E501 + query_params.append(('application', local_var_params['application'])) # noqa: E501 + if 'sub_application' in local_var_params and local_var_params['sub_application'] is not None: # noqa: E501 + query_params.append(('subApplication', local_var_params['sub_application'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + if 'mem_name' in local_var_params and local_var_params['mem_name'] is not None: # noqa: E501 + query_params.append(('memName', local_var_params['mem_name'])) # noqa: E501 + if 'mem_library' in local_var_params and local_var_params['mem_library'] is not None: # noqa: E501 + query_params.append(('memLibrary', local_var_params['mem_library'])) # noqa: E501 + if 'host' in local_var_params and local_var_params['host'] is not None: # noqa: E501 + query_params.append(('host', local_var_params['host'])) # noqa: E501 + if 'host_group' in local_var_params and local_var_params['host_group'] is not None: # noqa: E501 + query_params.append(('hostGroup', local_var_params['host_group'])) # noqa: E501 + if 'run_as' in local_var_params and local_var_params['run_as'] is not None: # noqa: E501 + query_params.append(('runAs', local_var_params['run_as'])) # noqa: E501 + if 'order_id' in local_var_params and local_var_params['order_id'] is not None: # noqa: E501 + query_params.append(('orderId', local_var_params['order_id'])) # noqa: E501 + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'order_date_from' in local_var_params and local_var_params['order_date_from'] is not None: # noqa: E501 + query_params.append(('orderDateFrom', local_var_params['order_date_from'])) # noqa: E501 + if 'order_date_to' in local_var_params and local_var_params['order_date_to'] is not None: # noqa: E501 + query_params.append(('orderDateTo', local_var_params['order_date_to'])) # noqa: E501 + if 'number_of_runs' in local_var_params and local_var_params['number_of_runs'] is not None: # noqa: E501 + query_params.append(('numberOfRuns', local_var_params['number_of_runs'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ArchiveJobsList", + 206: "ArchiveJobsList", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/archive/search", - "GET", + '/archive/search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ArchiveJobsList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/build_api.py b/src/clients/ctm_api_client/api/build_api.py index b1662db..a831789 100644 --- a/src/clients/ctm_api_client/api/build_api.py +++ b/src/clients/ctm_api_client/api/build_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class BuildApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -39,26 +43,31 @@ def build_file(self, definitions_file, **kwargs): # noqa: E501 Compile the provided definition file (JSON or zip) to verify it is valid for Control-M. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.build_file(definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions to be compiled. Can be either a JSON definition file, or a zip file that contains multiple JSON definition files. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :return: list[DeploymentFileResults] + :param definitions_file: A file that contains definitions to be compiled. Can be either a JSON definition file, or a zip file that contains multiple JSON definition files. (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[DeploymentFileResults] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.build_file_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - else: - (data) = self.build_file_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.build_file_with_http_info(definitions_file, **kwargs) # noqa: E501 def build_file_with_http_info(self, definitions_file, **kwargs): # noqa: E501 """Compile definitions file to check its validity # noqa: E501 @@ -66,39 +75,68 @@ def build_file_with_http_info(self, definitions_file, **kwargs): # noqa: E501 Compile the provided definition file (JSON or zip) to verify it is valid for Control-M. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.build_file_with_http_info(definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions to be compiled. Can be either a JSON definition file, or a zip file that contains multiple JSON definition files. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :return: list[DeploymentFileResults] + :param definitions_file: A file that contains definitions to be compiled. Can be either a JSON definition file, or a zip file that contains multiple JSON definition files. (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[DeploymentFileResults], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["definitions_file", "deploy_descriptor_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'definitions_file', + 'deploy_descriptor_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method build_file" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'definitions_file' is set - if self.api_client.client_side_validation and ( - "definitions_file" not in params or params["definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `definitions_file` when calling `build_file`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('definitions_file' not in local_var_params or # noqa: E501 + local_var_params['definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `definitions_file` when calling `build_file`") # noqa: E501 collection_formats = {} @@ -106,49 +144,48 @@ def build_file_with_http_info(self, definitions_file, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "definitions_file" in params: - local_var_files["definitionsFile"] = params[ - "definitions_file" - ] # noqa: E501 - if "deploy_descriptor_file" in params: - local_var_files["deployDescriptorFile"] = params[ - "deploy_descriptor_file" - ] # noqa: E501 + if 'definitions_file' in local_var_params: + local_var_files['definitionsFile'] = local_var_params['definitions_file'] # noqa: E501 + if 'deploy_descriptor_file' in local_var_params: + local_var_files['deployDescriptorFile'] = local_var_params['deploy_descriptor_file'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[DeploymentFileResults]", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/build", - "POST", + '/build', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[DeploymentFileResults]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/config_api.py b/src/clients/ctm_api_client/api/config_api.py index 51eb5ec..1c01c8a 100644 --- a/src/clients/ctm_api_client/api/config_api.py +++ b/src/clients/ctm_api_client/api/config_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class ConfigApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -39,22 +43,31 @@ def add_agent(self, server, body, **kwargs): # noqa: E501 Add an agent to Server. This command does not install or configure the agent. It only defines the agent in the system. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_agent(server, body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is going to be added to. (required) - :param AddAgentParams body: (required) - :return: SuccessData + :param server: The Server the agent is going to be added to. (required) + :type server: str + :param body: (required) + :type body: AddAgentParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_agent_with_http_info(server, body, **kwargs) # noqa: E501 - else: - (data) = self.add_agent_with_http_info(server, body, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_agent_with_http_info(server, body, **kwargs) # noqa: E501 def add_agent_with_http_info(self, server, body, **kwargs): # noqa: E501 """add agent to Server # noqa: E501 @@ -62,260 +75,362 @@ def add_agent_with_http_info(self, server, body, **kwargs): # noqa: E501 Add an agent to Server. This command does not install or configure the agent. It only defines the agent in the system. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_agent_with_http_info(server, body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is going to be added to. (required) - :param AddAgentParams body: (required) - :return: SuccessData + :param server: The Server the agent is going to be added to. (required) + :type server: str + :param body: (required) + :type body: AddAgentParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "body"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_agent" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_agent`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_agent`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ( - "body" not in params or params["body"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `body` when calling `add_agent`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `add_agent`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "body" in params: - body_params = params["body"] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent", - "POST", + '/config/server/{server}/agent', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_archive_rule(self, archive_rule, **kwargs): # noqa: E501 - """Add Workload Archiving rule # noqa: E501 + def add_agentless_host(self, server, **kwargs): # noqa: E501 + """add agentless host to Server # noqa: E501 - Add a new Workload Archiving rule # noqa: E501 + Add an agentless host to Server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_archive_rule(archive_rule, async_req=True) + + >>> thread = api.add_agentless_host(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param ArchiveRule archive_rule: archive rule details to add (required) - :return: SuccessData + :param server: The Server the agentless host is going to be added to. (required) + :type server: str + :param data: The non default, advanced configuration data + :type data: AddRemoteHostParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_archive_rule_with_http_info( - archive_rule, **kwargs - ) # noqa: E501 - else: - (data) = self.add_archive_rule_with_http_info( - archive_rule, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_agentless_host_with_http_info(server, **kwargs) # noqa: E501 - def add_archive_rule_with_http_info(self, archive_rule, **kwargs): # noqa: E501 - """Add Workload Archiving rule # noqa: E501 + def add_agentless_host_with_http_info(self, server, **kwargs): # noqa: E501 + """add agentless host to Server # noqa: E501 - Add a new Workload Archiving rule # noqa: E501 + Add an agentless host to Server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_archive_rule_with_http_info(archive_rule, async_req=True) + + >>> thread = api.add_agentless_host_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param ArchiveRule archive_rule: archive rule details to add (required) - :return: SuccessData + :param server: The Server the agentless host is going to be added to. (required) + :type server: str + :param data: The non default, advanced configuration data + :type data: AddRemoteHostParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["archive_rule"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_archive_rule" % key + " to method add_agentless_host" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'archive_rule' is set - if self.api_client.client_side_validation and ( - "archive_rule" not in params or params["archive_rule"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `archive_rule` when calling `add_archive_rule`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_agentless_host`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "archive_rule" in params: - body_params = params["archive_rule"] + if 'data' in local_var_params: + body_params = local_var_params['data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 422: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/archive/rule", - "POST", + '/config/server/{server}/agentlesshost', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_external_user(self, external_user_data, **kwargs): # noqa: E501 - """Add and external user # noqa: E501 + def add_archive_rule(self, archive_rule, **kwargs): # noqa: E501 + """Add Workload Archiving rule # noqa: E501 - Add and external user for b2b # noqa: E501 + Add a new Workload Archiving rule # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_external_user(external_user_data, async_req=True) + + >>> thread = api.add_archive_rule(archive_rule, async_req=True) >>> result = thread.get() - :param async_req bool - :param ExternalUserData external_user_data: External user data (required) - :return: SuccessData + :param archive_rule: archive rule details to add (required) + :type archive_rule: ArchiveRule + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_external_user_with_http_info( - external_user_data, **kwargs - ) # noqa: E501 - else: - (data) = self.add_external_user_with_http_info( - external_user_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_archive_rule_with_http_info(archive_rule, **kwargs) # noqa: E501 - def add_external_user_with_http_info( - self, external_user_data, **kwargs - ): # noqa: E501 - """Add and external user # noqa: E501 + def add_archive_rule_with_http_info(self, archive_rule, **kwargs): # noqa: E501 + """Add Workload Archiving rule # noqa: E501 - Add and external user for b2b # noqa: E501 + Add a new Workload Archiving rule # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_external_user_with_http_info(external_user_data, async_req=True) + + >>> thread = api.add_archive_rule_with_http_info(archive_rule, async_req=True) >>> result = thread.get() - :param async_req bool - :param ExternalUserData external_user_data: External user data (required) - :return: SuccessData + :param archive_rule: archive rule details to add (required) + :type archive_rule: ArchiveRule + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["external_user_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'archive_rule' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_external_user" % key + " to method add_archive_rule" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'external_user_data' is set - if self.api_client.client_side_validation and ( - "external_user_data" not in params or params["external_user_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `external_user_data` when calling `add_external_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'archive_rule' is set + if self.api_client.client_side_validation and ('archive_rule' not in local_var_params or # noqa: E501 + local_var_params['archive_rule'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `archive_rule` when calling `add_archive_rule`") # noqa: E501 collection_formats = {} @@ -323,1025 +438,1362 @@ def add_external_user_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "external_user_data" in params: - body_params = params["external_user_data"] + if 'archive_rule' in local_var_params: + body_params = local_var_params['archive_rule'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/config/mft/externaluser", - "POST", + '/config/archive/rule', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_external_user_or_user_group_to_mft_folder( - self, folder_name, user_or_group, **kwargs - ): # noqa: E501 - """Add external user or user groups to virtual folder external users list. # noqa: E501 + def add_ctm_security_group(self, ctm_name, ctm_sec_group_data, **kwargs): # noqa: E501 + """Add CTM Security new group # noqa: E501 - Add external user user groups to virtual folder external users list. # noqa: E501 + Add CTM Security new group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_external_user_or_user_group_to_mft_folder(folder_name, user_or_group, async_req=True) + + >>> thread = api.add_ctm_security_group(ctm_name, ctm_sec_group_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :param str user_or_group: The user name or group name (required) - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param ctm_sec_group_data: (required) + :type ctm_sec_group_data: CtmSecGroupData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_external_user_or_user_group_to_mft_folder_with_http_info( - folder_name, user_or_group, **kwargs - ) # noqa: E501 - else: - (data) = self.add_external_user_or_user_group_to_mft_folder_with_http_info( - folder_name, user_or_group, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_ctm_security_group_with_http_info(ctm_name, ctm_sec_group_data, **kwargs) # noqa: E501 - def add_external_user_or_user_group_to_mft_folder_with_http_info( - self, folder_name, user_or_group, **kwargs - ): # noqa: E501 - """Add external user or user groups to virtual folder external users list. # noqa: E501 + def add_ctm_security_group_with_http_info(self, ctm_name, ctm_sec_group_data, **kwargs): # noqa: E501 + """Add CTM Security new group # noqa: E501 - Add external user user groups to virtual folder external users list. # noqa: E501 + Add CTM Security new group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_external_user_or_user_group_to_mft_folder_with_http_info(folder_name, user_or_group, async_req=True) + + >>> thread = api.add_ctm_security_group_with_http_info(ctm_name, ctm_sec_group_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :param str user_or_group: The user name or group name (required) - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param ctm_sec_group_data: (required) + :type ctm_sec_group_data: CtmSecGroupData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["folder_name", "user_or_group"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'ctm_sec_group_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_external_user_or_user_group_to_mft_folder" % key + " to method add_ctm_security_group" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'folder_name' is set - if self.api_client.client_side_validation and ( - "folder_name" not in params or params["folder_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_name` when calling `add_external_user_or_user_group_to_mft_folder`" - ) # noqa: E501 - # verify the required parameter 'user_or_group' is set - if self.api_client.client_side_validation and ( - "user_or_group" not in params or params["user_or_group"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user_or_group` when calling `add_external_user_or_user_group_to_mft_folder`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `add_ctm_security_group`") # noqa: E501 + # verify the required parameter 'ctm_sec_group_data' is set + if self.api_client.client_side_validation and ('ctm_sec_group_data' not in local_var_params or # noqa: E501 + local_var_params['ctm_sec_group_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_sec_group_data` when calling `add_ctm_security_group`") # noqa: E501 collection_formats = {} path_params = {} - if "folder_name" in params: - path_params["folderName"] = params["folder_name"] # noqa: E501 - if "user_or_group" in params: - path_params["userOrGroup"] = params["user_or_group"] # noqa: E501 + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'ctm_sec_group_data' in local_var_params: + body_params = local_var_params['ctm_sec_group_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/virtualfolder/{folderName}/user/{userOrGroup}", - "POST", + '/config/server/{ctmName}/security/group', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_gateway(self, gateway_data, **kwargs): # noqa: E501 - """add gateway. # noqa: E501 + def add_ctm_security_user(self, ctm_name, ctm_sec_user_data, **kwargs): # noqa: E501 + """Add CTM Security user # noqa: E501 - add gateway. # noqa: E501 + Add CTM Security user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_gateway(gateway_data, async_req=True) + + >>> thread = api.add_ctm_security_user(ctm_name, ctm_sec_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param GatewayData gateway_data: gateway data (required) - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param ctm_sec_user_data: (required) + :type ctm_sec_user_data: CtmSecUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_gateway_with_http_info(gateway_data, **kwargs) # noqa: E501 - else: - (data) = self.add_gateway_with_http_info( - gateway_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_ctm_security_user_with_http_info(ctm_name, ctm_sec_user_data, **kwargs) # noqa: E501 - def add_gateway_with_http_info(self, gateway_data, **kwargs): # noqa: E501 - """add gateway. # noqa: E501 + def add_ctm_security_user_with_http_info(self, ctm_name, ctm_sec_user_data, **kwargs): # noqa: E501 + """Add CTM Security user # noqa: E501 - add gateway. # noqa: E501 + Add CTM Security user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_gateway_with_http_info(gateway_data, async_req=True) + + >>> thread = api.add_ctm_security_user_with_http_info(ctm_name, ctm_sec_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param GatewayData gateway_data: gateway data (required) - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param ctm_sec_user_data: (required) + :type ctm_sec_user_data: CtmSecUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["gateway_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'ctm_sec_user_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_gateway" % key + " to method add_ctm_security_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'gateway_data' is set - if self.api_client.client_side_validation and ( - "gateway_data" not in params or params["gateway_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `gateway_data` when calling `add_gateway`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `add_ctm_security_user`") # noqa: E501 + # verify the required parameter 'ctm_sec_user_data' is set + if self.api_client.client_side_validation and ('ctm_sec_user_data' not in local_var_params or # noqa: E501 + local_var_params['ctm_sec_user_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_sec_user_data` when calling `add_ctm_security_user`") # noqa: E501 collection_formats = {} path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "gateway_data" in params: - body_params = params["gateway_data"] + if 'ctm_sec_user_data' in local_var_params: + body_params = local_var_params['ctm_sec_user_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/gateway", - "POST", + '/config/server/{ctmName}/security/user', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_host_to_hostgroup(self, server, hostgroup, agent, **kwargs): # noqa: E501 - """add agent to hostgroup # noqa: E501 + def add_em_component(self, body, **kwargs): # noqa: E501 + """Add a new EM component # noqa: E501 - Add an agent to hostgroup. Create the the hostgroup if it does not exist. # noqa: E501 + Add a new Control-M/Enterprise Manager component # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_host_to_hostgroup(server, hostgroup, agent, async_req=True) + + >>> thread = api.add_em_component(body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroup belongs to. (required) - :param str hostgroup: The hostgroup name (required) - :param AgentInHostgroup agent: The hostname of the new agent (required) - :return: AgentsInGroupSuccessData + :param body: (required) + :type body: EmComponentDef + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_host_to_hostgroup_with_http_info( - server, hostgroup, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.add_host_to_hostgroup_with_http_info( - server, hostgroup, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_em_component_with_http_info(body, **kwargs) # noqa: E501 - def add_host_to_hostgroup_with_http_info( - self, server, hostgroup, agent, **kwargs - ): # noqa: E501 - """add agent to hostgroup # noqa: E501 + def add_em_component_with_http_info(self, body, **kwargs): # noqa: E501 + """Add a new EM component # noqa: E501 - Add an agent to hostgroup. Create the the hostgroup if it does not exist. # noqa: E501 + Add a new Control-M/Enterprise Manager component # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_host_to_hostgroup_with_http_info(server, hostgroup, agent, async_req=True) + + >>> thread = api.add_em_component_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroup belongs to. (required) - :param str hostgroup: The hostgroup name (required) - :param AgentInHostgroup agent: The hostname of the new agent (required) - :return: AgentsInGroupSuccessData + :param body: (required) + :type body: EmComponentDef + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "hostgroup", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_host_to_hostgroup" % key + " to method add_em_component" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_host_to_hostgroup`" - ) # noqa: E501 - # verify the required parameter 'hostgroup' is set - if self.api_client.client_side_validation and ( - "hostgroup" not in params or params["hostgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostgroup` when calling `add_host_to_hostgroup`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `add_host_to_hostgroup`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `add_em_component`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "hostgroup" in params: - path_params["hostgroup"] = params["hostgroup"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "agent" in params: - body_params = params["agent"] + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/hostgroup/{hostgroup}/agent", - "POST", + '/config/em/component', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AgentsInGroupSuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_hub_to_cluster(self, agentname, **kwargs): # noqa: E501 - """add hub to cluster. # noqa: E501 + def add_external_user(self, external_user_data, **kwargs): # noqa: E501 + """Add and external user # noqa: E501 - add hub to cluster. # noqa: E501 + Add and external user for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_hub_to_cluster(agentname, async_req=True) + + >>> thread = api.add_external_user(external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str agentname: Agent name (required) - :return: SuccessData + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_hub_to_cluster_with_http_info( - agentname, **kwargs - ) # noqa: E501 - else: - (data) = self.add_hub_to_cluster_with_http_info( - agentname, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_external_user_with_http_info(external_user_data, **kwargs) # noqa: E501 - def add_hub_to_cluster_with_http_info(self, agentname, **kwargs): # noqa: E501 - """add hub to cluster. # noqa: E501 + def add_external_user_with_http_info(self, external_user_data, **kwargs): # noqa: E501 + """Add and external user # noqa: E501 - add hub to cluster. # noqa: E501 + Add and external user for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_hub_to_cluster_with_http_info(agentname, async_req=True) + + >>> thread = api.add_external_user_with_http_info(external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str agentname: Agent name (required) - :return: SuccessData + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["agentname"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'external_user_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_hub_to_cluster" % key + " to method add_external_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'agentname' is set - if self.api_client.client_side_validation and ( - "agentname" not in params or params["agentname"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agentname` when calling `add_hub_to_cluster`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'external_user_data' is set + if self.api_client.client_side_validation and ('external_user_data' not in local_var_params or # noqa: E501 + local_var_params['external_user_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `external_user_data` when calling `add_external_user`") # noqa: E501 collection_formats = {} path_params = {} - if "agentname" in params: - path_params["agentname"] = params["agentname"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'external_user_data' in local_var_params: + body_params = local_var_params['external_user_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/cluster/hub/{agentname}", - "POST", + '/config/mft/externaluser', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_mft_folder(self, folder_properties_data, **kwargs): # noqa: E501 - """Add virtual folder # noqa: E501 + def add_external_user_for_site(self, site_name, external_user_data, **kwargs): # noqa: E501 + """Add and external user for site # noqa: E501 - Add virtual folder # noqa: E501 + Add and external user for site for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_mft_folder(folder_properties_data, async_req=True) + + >>> thread = api.add_external_user_for_site(site_name, external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param FolderPropertiesData folder_properties_data: virtual folder data (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_mft_folder_with_http_info( - folder_properties_data, **kwargs - ) # noqa: E501 - else: - (data) = self.add_mft_folder_with_http_info( - folder_properties_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_external_user_for_site_with_http_info(site_name, external_user_data, **kwargs) # noqa: E501 - def add_mft_folder_with_http_info( - self, folder_properties_data, **kwargs - ): # noqa: E501 - """Add virtual folder # noqa: E501 + def add_external_user_for_site_with_http_info(self, site_name, external_user_data, **kwargs): # noqa: E501 + """Add and external user for site # noqa: E501 - Add virtual folder # noqa: E501 + Add and external user for site for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_mft_folder_with_http_info(folder_properties_data, async_req=True) + + >>> thread = api.add_external_user_for_site_with_http_info(site_name, external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param FolderPropertiesData folder_properties_data: virtual folder data (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["folder_properties_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'external_user_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_mft_folder" % key + " to method add_external_user_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'folder_properties_data' is set - if self.api_client.client_side_validation and ( - "folder_properties_data" not in params - or params["folder_properties_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_properties_data` when calling `add_mft_folder`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_external_user_for_site`") # noqa: E501 + # verify the required parameter 'external_user_data' is set + if self.api_client.client_side_validation and ('external_user_data' not in local_var_params or # noqa: E501 + local_var_params['external_user_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `external_user_data` when calling `add_external_user_for_site`") # noqa: E501 collection_formats = {} path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "folder_properties_data" in params: - body_params = params["folder_properties_data"] + if 'external_user_data' in local_var_params: + body_params = local_var_params['external_user_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/virtualfolder", - "POST", + '/config/mfte/site/{siteName}/externaluser', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_mft_user_group(self, user_group_properties_data, **kwargs): # noqa: E501 - """Add user group. # noqa: E501 + def add_external_user_or_user_group_to_mft_folder(self, folder_name, user_or_group, **kwargs): # noqa: E501 + """Add external user or user groups to virtual folder external users list. # noqa: E501 - Add user group. # noqa: E501 + Add external user user groups to virtual folder external users list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_mft_user_group(user_group_properties_data, async_req=True) + + >>> thread = api.add_external_user_or_user_group_to_mft_folder(folder_name, user_or_group, async_req=True) >>> result = thread.get() - :param async_req bool - :param UserGroupPropertiesData user_group_properties_data: User group object properites (required) - :return: SuccessData + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name or group name (required) + :type user_or_group: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_mft_user_group_with_http_info( - user_group_properties_data, **kwargs - ) # noqa: E501 - else: - (data) = self.add_mft_user_group_with_http_info( - user_group_properties_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_external_user_or_user_group_to_mft_folder_with_http_info(folder_name, user_or_group, **kwargs) # noqa: E501 - def add_mft_user_group_with_http_info( - self, user_group_properties_data, **kwargs - ): # noqa: E501 - """Add user group. # noqa: E501 + def add_external_user_or_user_group_to_mft_folder_with_http_info(self, folder_name, user_or_group, **kwargs): # noqa: E501 + """Add external user or user groups to virtual folder external users list. # noqa: E501 - Add user group. # noqa: E501 + Add external user user groups to virtual folder external users list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_mft_user_group_with_http_info(user_group_properties_data, async_req=True) + + >>> thread = api.add_external_user_or_user_group_to_mft_folder_with_http_info(folder_name, user_or_group, async_req=True) >>> result = thread.get() - :param async_req bool - :param UserGroupPropertiesData user_group_properties_data: User group object properites (required) - :return: SuccessData + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name or group name (required) + :type user_or_group: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user_group_properties_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'folder_name', + 'user_or_group' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_mft_user_group" % key + " to method add_external_user_or_user_group_to_mft_folder" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'user_group_properties_data' is set - if self.api_client.client_side_validation and ( - "user_group_properties_data" not in params - or params["user_group_properties_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user_group_properties_data` when calling `add_mft_user_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `add_external_user_or_user_group_to_mft_folder`") # noqa: E501 + # verify the required parameter 'user_or_group' is set + if self.api_client.client_side_validation and ('user_or_group' not in local_var_params or # noqa: E501 + local_var_params['user_or_group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_or_group` when calling `add_external_user_or_user_group_to_mft_folder`") # noqa: E501 collection_formats = {} path_params = {} + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 + if 'user_or_group' in local_var_params: + path_params['userOrGroup'] = local_var_params['user_or_group'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "user_group_properties_data" in params: - body_params = params["user_group_properties_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/usergroup", - "POST", + '/config/mft/virtualfolder/{folderName}/user/{userOrGroup}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_pgp_template( - self, server, agent, template_name, pgp_template_data, **kwargs - ): # noqa: E501 - """Add PGP Template # noqa: E501 + def add_external_user_or_user_group_to_mft_folder_for_site(self, site_name, folder_name, user_or_group, **kwargs): # noqa: E501 + """Add external user or user groups to virtual folder external users list for site. # noqa: E501 - Add PGP Template # noqa: E501 + Add external user user groups to virtual folder external users list for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_pgp_template(server, agent, template_name, pgp_template_data, async_req=True) + + >>> thread = api.add_external_user_or_user_group_to_mft_folder_for_site(site_name, folder_name, user_or_group, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The PGP Template Name (required) - :param PgpTemplateData pgp_template_data: PGP Template Data (required) - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name or group name (required) + :type user_or_group: str + :param access_level: Access level of user or group for specific folder + :type access_level: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_pgp_template_with_http_info( - server, agent, template_name, pgp_template_data, **kwargs - ) # noqa: E501 - else: - (data) = self.add_pgp_template_with_http_info( - server, agent, template_name, pgp_template_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_external_user_or_user_group_to_mft_folder_for_site_with_http_info(site_name, folder_name, user_or_group, **kwargs) # noqa: E501 - def add_pgp_template_with_http_info( - self, server, agent, template_name, pgp_template_data, **kwargs - ): # noqa: E501 - """Add PGP Template # noqa: E501 + def add_external_user_or_user_group_to_mft_folder_for_site_with_http_info(self, site_name, folder_name, user_or_group, **kwargs): # noqa: E501 + """Add external user or user groups to virtual folder external users list for site. # noqa: E501 - Add PGP Template # noqa: E501 + Add external user user groups to virtual folder external users list for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_pgp_template_with_http_info(server, agent, template_name, pgp_template_data, async_req=True) + + >>> thread = api.add_external_user_or_user_group_to_mft_folder_for_site_with_http_info(site_name, folder_name, user_or_group, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The PGP Template Name (required) - :param PgpTemplateData pgp_template_data: PGP Template Data (required) - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name or group name (required) + :type user_or_group: str + :param access_level: Access level of user or group for specific folder + :type access_level: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "template_name", - "pgp_template_data", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'site_name', + 'folder_name', + 'user_or_group', + 'access_level' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_pgp_template" % key + " to method add_external_user_or_user_group_to_mft_folder_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `add_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'template_name' is set - if self.api_client.client_side_validation and ( - "template_name" not in params or params["template_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `template_name` when calling `add_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'pgp_template_data' is set - if self.api_client.client_side_validation and ( - "pgp_template_data" not in params or params["pgp_template_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `pgp_template_data` when calling `add_pgp_template`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_external_user_or_user_group_to_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `add_external_user_or_user_group_to_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'user_or_group' is set + if self.api_client.client_side_validation and ('user_or_group' not in local_var_params or # noqa: E501 + local_var_params['user_or_group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_or_group` when calling `add_external_user_or_user_group_to_mft_folder_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "template_name" in params: - path_params["templateName"] = params["template_name"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 + if 'user_or_group' in local_var_params: + path_params['userOrGroup'] = local_var_params['user_or_group'] # noqa: E501 query_params = [] + if 'access_level' in local_var_params and local_var_params['access_level'] is not None: # noqa: E501 + query_params.append(('accessLevel', local_var_params['access_level'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "pgp_template_data" in params: - body_params = params["pgp_template_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName}", - "POST", + '/config/mfte/site/{siteName}/virtualfolder/{folderName}/user/{userOrGroup}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_remote_host(self, server, **kwargs): # noqa: E501 - """add remote host to Server # noqa: E501 + def add_external_user_to_mft_user_group_for_site(self, site_name, group_name, user_name, **kwargs): # noqa: E501 + """Add external user to user groups for site. # noqa: E501 - Add a remote host to Server. # noqa: E501 + Add external user to user groups for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_remote_host(server, async_req=True) + + >>> thread = api.add_external_user_to_mft_user_group_for_site(site_name, group_name, user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is going to be added to. (required) - :param AddRemoteHostParams data: The non default, advanced configuration data - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group (required) + :type group_name: str + :param user_name: The user name (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UserGroupPropertiesData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_remote_host_with_http_info(server, **kwargs) # noqa: E501 - else: - (data) = self.add_remote_host_with_http_info(server, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_external_user_to_mft_user_group_for_site_with_http_info(site_name, group_name, user_name, **kwargs) # noqa: E501 - def add_remote_host_with_http_info(self, server, **kwargs): # noqa: E501 - """add remote host to Server # noqa: E501 + def add_external_user_to_mft_user_group_for_site_with_http_info(self, site_name, group_name, user_name, **kwargs): # noqa: E501 + """Add external user to user groups for site. # noqa: E501 - Add a remote host to Server. # noqa: E501 + Add external user to user groups for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_remote_host_with_http_info(server, async_req=True) + + >>> thread = api.add_external_user_to_mft_user_group_for_site_with_http_info(site_name, group_name, user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is going to be added to. (required) - :param AddRemoteHostParams data: The non default, advanced configuration data - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group (required) + :type group_name: str + :param user_name: The user name (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UserGroupPropertiesData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'site_name', + 'group_name', + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_remote_host" % key + " to method add_external_user_to_mft_user_group_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_remote_host`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_external_user_to_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'group_name' is set + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_name` when calling `add_external_user_to_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `add_external_user_to_mft_user_group_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'group_name' in local_var_params: + path_params['groupName'] = local_var_params['group_name'] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "data" in params: - body_params = params["data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UserGroupPropertiesData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/remotehost", - "POST", + '/config/mfte/site/{siteName}/usergroup/{groupName}/user/{userName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_role(self, role_file, **kwargs): # noqa: E501 - """Add Authorization Role # noqa: E501 + def add_gateway(self, gateway_data, **kwargs): # noqa: E501 + """add gateway. # noqa: E501 - Add Authorization Role # noqa: E501 + add gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_role(role_file, async_req=True) + + >>> thread = api.add_gateway(gateway_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param file role_file: File with contenet of Role Data. (required) - :return: SuccessData + :param gateway_data: gateway data (required) + :type gateway_data: GatewayData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_role_with_http_info(role_file, **kwargs) # noqa: E501 - else: - (data) = self.add_role_with_http_info(role_file, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_gateway_with_http_info(gateway_data, **kwargs) # noqa: E501 - def add_role_with_http_info(self, role_file, **kwargs): # noqa: E501 - """Add Authorization Role # noqa: E501 + def add_gateway_with_http_info(self, gateway_data, **kwargs): # noqa: E501 + """add gateway. # noqa: E501 - Add Authorization Role # noqa: E501 + add gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_role_with_http_info(role_file, async_req=True) + + >>> thread = api.add_gateway_with_http_info(gateway_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param file role_file: File with contenet of Role Data. (required) - :return: SuccessData + :param gateway_data: gateway data (required) + :type gateway_data: GatewayData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["role_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'gateway_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_role" % key + " to method add_gateway" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'role_file' is set - if self.api_client.client_side_validation and ( - "role_file" not in params or params["role_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role_file` when calling `add_role`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'gateway_data' is set + if self.api_client.client_side_validation and ('gateway_data' not in local_var_params or # noqa: E501 + local_var_params['gateway_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gateway_data` when calling `add_gateway`") # noqa: E501 collection_formats = {} @@ -1349,10189 +1801,32503 @@ def add_role_with_http_info(self, role_file, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "role_file" in params: - local_var_files["roleFile"] = params["role_file"] # noqa: E501 body_params = None + if 'gateway_data' in local_var_params: + body_params = local_var_params['gateway_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/role", - "POST", + '/config/mft/gateway', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_role_to_ldap_group(self, ldapgroup, role, **kwargs): # noqa: E501 - """Add a role to LDAP group # noqa: E501 + def add_gateway_for_site(self, site_name, gateway_data, **kwargs): # noqa: E501 + """add gateway for site. # noqa: E501 - Add a role to LDAP group so any user belong to the LDAP group will get all permissions defined in the role # noqa: E501 + add gateway for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_role_to_ldap_group(ldapgroup, role, async_req=True) + + >>> thread = api.add_gateway_for_site(site_name, gateway_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ldapgroup: Name of LDAP group (required) - :param str role: Name of role (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param gateway_data: gateway data (required) + :type gateway_data: GatewayData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_role_to_ldap_group_with_http_info( - ldapgroup, role, **kwargs - ) # noqa: E501 - else: - (data) = self.add_role_to_ldap_group_with_http_info( - ldapgroup, role, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_gateway_for_site_with_http_info(site_name, gateway_data, **kwargs) # noqa: E501 - def add_role_to_ldap_group_with_http_info( - self, ldapgroup, role, **kwargs - ): # noqa: E501 - """Add a role to LDAP group # noqa: E501 + def add_gateway_for_site_with_http_info(self, site_name, gateway_data, **kwargs): # noqa: E501 + """add gateway for site. # noqa: E501 - Add a role to LDAP group so any user belong to the LDAP group will get all permissions defined in the role # noqa: E501 + add gateway for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_role_to_ldap_group_with_http_info(ldapgroup, role, async_req=True) + + >>> thread = api.add_gateway_for_site_with_http_info(site_name, gateway_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ldapgroup: Name of LDAP group (required) - :param str role: Name of role (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param gateway_data: gateway data (required) + :type gateway_data: GatewayData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["ldapgroup", "role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'gateway_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_role_to_ldap_group" % key + " to method add_gateway_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'ldapgroup' is set - if self.api_client.client_side_validation and ( - "ldapgroup" not in params or params["ldapgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `ldapgroup` when calling `add_role_to_ldap_group`" - ) # noqa: E501 - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `add_role_to_ldap_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_gateway_for_site`") # noqa: E501 + # verify the required parameter 'gateway_data' is set + if self.api_client.client_side_validation and ('gateway_data' not in local_var_params or # noqa: E501 + local_var_params['gateway_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gateway_data` when calling `add_gateway_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "ldapgroup" in params: - path_params["ldapgroup"] = params["ldapgroup"] # noqa: E501 - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'gateway_data' in local_var_params: + body_params = local_var_params['gateway_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/ldap/{ldapgroup}/role/{role}", - "POST", + '/config/mfte/site/{siteName}/gateway', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_role_to_user(self, user, role, **kwargs): # noqa: E501 - """Add a role to user # noqa: E501 + def add_host_restriction(self, ctm, **kwargs): # noqa: E501 + """Add new Host Restriction. # noqa: E501 + + Add new Host Restriction to the agent/s of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_host_restriction(ctm, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param host_restriction: The Host Restrictions to add on the Agent/s + :type host_restriction: HostRestriction + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_host_restriction_with_http_info(ctm, **kwargs) # noqa: E501 + + def add_host_restriction_with_http_info(self, ctm, **kwargs): # noqa: E501 + """Add new Host Restriction. # noqa: E501 + + Add new Host Restriction to the agent/s of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_host_restriction_with_http_info(ctm, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param host_restriction: The Host Restrictions to add on the Agent/s + :type host_restriction: HostRestriction + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm', + 'host_restriction' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_host_restriction" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `add_host_restriction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'host_restriction' in local_var_params: + body_params = local_var_params['host_restriction'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctm}/hostRestriction', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_host_to_hostgroup(self, server, hostgroup, agent, **kwargs): # noqa: E501 + """add agent to hostgroup # noqa: E501 + + Add an agent to hostgroup. Create the the hostgroup if it does not exist. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_host_to_hostgroup(server, hostgroup, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroup belongs to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param agent: The hostname of the new agent (required) + :type agent: AgentInHostgroup + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AgentsInGroupSuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_host_to_hostgroup_with_http_info(server, hostgroup, agent, **kwargs) # noqa: E501 + + def add_host_to_hostgroup_with_http_info(self, server, hostgroup, agent, **kwargs): # noqa: E501 + """add agent to hostgroup # noqa: E501 + + Add an agent to hostgroup. Create the the hostgroup if it does not exist. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_host_to_hostgroup_with_http_info(server, hostgroup, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroup belongs to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param agent: The hostname of the new agent (required) + :type agent: AgentInHostgroup + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AgentsInGroupSuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'hostgroup', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_host_to_hostgroup" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_host_to_hostgroup`") # noqa: E501 + # verify the required parameter 'hostgroup' is set + if self.api_client.client_side_validation and ('hostgroup' not in local_var_params or # noqa: E501 + local_var_params['hostgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostgroup` when calling `add_host_to_hostgroup`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `add_host_to_hostgroup`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'hostgroup' in local_var_params: + path_params['hostgroup'] = local_var_params['hostgroup'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'agent' in local_var_params: + body_params = local_var_params['agent'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AgentsInGroupSuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/hostgroup/{hostgroup}/agent', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_hub_to_cluster(self, agentname, **kwargs): # noqa: E501 + """add hub to cluster. # noqa: E501 + + add hub to cluster. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_hub_to_cluster(agentname, async_req=True) + >>> result = thread.get() + + :param agentname: Agent name (required) + :type agentname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_hub_to_cluster_with_http_info(agentname, **kwargs) # noqa: E501 + + def add_hub_to_cluster_with_http_info(self, agentname, **kwargs): # noqa: E501 + """add hub to cluster. # noqa: E501 + + add hub to cluster. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_hub_to_cluster_with_http_info(agentname, async_req=True) + >>> result = thread.get() + + :param agentname: Agent name (required) + :type agentname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'agentname' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_hub_to_cluster" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'agentname' is set + if self.api_client.client_side_validation and ('agentname' not in local_var_params or # noqa: E501 + local_var_params['agentname'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentname` when calling `add_hub_to_cluster`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'agentname' in local_var_params: + path_params['agentname'] = local_var_params['agentname'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/cluster/hub/{agentname}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_hub_to_cluster_for_site(self, site_name, agentname, **kwargs): # noqa: E501 + """add hub to cluster for site. # noqa: E501 + + add hub to cluster for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_hub_to_cluster_for_site(site_name, agentname, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param agentname: Agent name (required) + :type agentname: str + :param mfte_db_config: File with content of centralized database details. + :type mfte_db_config: MfteDbConfig + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_hub_to_cluster_for_site_with_http_info(site_name, agentname, **kwargs) # noqa: E501 + + def add_hub_to_cluster_for_site_with_http_info(self, site_name, agentname, **kwargs): # noqa: E501 + """add hub to cluster for site. # noqa: E501 + + add hub to cluster for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_hub_to_cluster_for_site_with_http_info(site_name, agentname, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param agentname: Agent name (required) + :type agentname: str + :param mfte_db_config: File with content of centralized database details. + :type mfte_db_config: MfteDbConfig + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'agentname', + 'mfte_db_config' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_hub_to_cluster_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_hub_to_cluster_for_site`") # noqa: E501 + # verify the required parameter 'agentname' is set + if self.api_client.client_side_validation and ('agentname' not in local_var_params or # noqa: E501 + local_var_params['agentname'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentname` when calling `add_hub_to_cluster_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'agentname' in local_var_params: + path_params['agentname'] = local_var_params['agentname'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'mfte_db_config' in local_var_params: + body_params = local_var_params['mfte_db_config'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/cluster/hub/{agentname}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_ldap_group_to_mft_user_group_for_site(self, site_name, group_name, ldap_group_name, **kwargs): # noqa: E501 + """Add LDAP group to group for site. # noqa: E501 + + Add LDAP group to group for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_ldap_group_to_mft_user_group_for_site(site_name, group_name, ldap_group_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group. (required) + :type group_name: str + :param ldap_group_name: The LDAP group name. (required) + :type ldap_group_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: UserGroupPropertiesData + """ + kwargs['_return_http_data_only'] = True + return self.add_ldap_group_to_mft_user_group_for_site_with_http_info(site_name, group_name, ldap_group_name, **kwargs) # noqa: E501 + + def add_ldap_group_to_mft_user_group_for_site_with_http_info(self, site_name, group_name, ldap_group_name, **kwargs): # noqa: E501 + """Add LDAP group to group for site. # noqa: E501 + + Add LDAP group to group for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_ldap_group_to_mft_user_group_for_site_with_http_info(site_name, group_name, ldap_group_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group. (required) + :type group_name: str + :param ldap_group_name: The LDAP group name. (required) + :type ldap_group_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(UserGroupPropertiesData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'group_name', + 'ldap_group_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_ldap_group_to_mft_user_group_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_ldap_group_to_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'group_name' is set + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_name` when calling `add_ldap_group_to_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'ldap_group_name' is set + if self.api_client.client_side_validation and ('ldap_group_name' not in local_var_params or # noqa: E501 + local_var_params['ldap_group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ldap_group_name` when calling `add_ldap_group_to_mft_user_group_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'group_name' in local_var_params: + path_params['groupName'] = local_var_params['group_name'] # noqa: E501 + if 'ldap_group_name' in local_var_params: + path_params['ldapGroupName'] = local_var_params['ldap_group_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UserGroupPropertiesData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/usergroup/{groupName}/ldapGroup/{ldapGroupName}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_mft_folder(self, folder_properties_data, **kwargs): # noqa: E501 + """Add virtual folder # noqa: E501 + + Add virtual folder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_folder(folder_properties_data, async_req=True) + >>> result = thread.get() + + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_mft_folder_with_http_info(folder_properties_data, **kwargs) # noqa: E501 + + def add_mft_folder_with_http_info(self, folder_properties_data, **kwargs): # noqa: E501 + """Add virtual folder # noqa: E501 + + Add virtual folder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_folder_with_http_info(folder_properties_data, async_req=True) + >>> result = thread.get() + + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'folder_properties_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_mft_folder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'folder_properties_data' is set + if self.api_client.client_side_validation and ('folder_properties_data' not in local_var_params or # noqa: E501 + local_var_params['folder_properties_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_properties_data` when calling `add_mft_folder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'folder_properties_data' in local_var_params: + body_params = local_var_params['folder_properties_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/virtualfolder', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_mft_folder_for_site(self, site_name, folder_properties_data, **kwargs): # noqa: E501 + """Add virtual folder for site # noqa: E501 + + Add virtual folder for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_folder_for_site(site_name, folder_properties_data, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_mft_folder_for_site_with_http_info(site_name, folder_properties_data, **kwargs) # noqa: E501 + + def add_mft_folder_for_site_with_http_info(self, site_name, folder_properties_data, **kwargs): # noqa: E501 + """Add virtual folder for site # noqa: E501 + + Add virtual folder for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_folder_for_site_with_http_info(site_name, folder_properties_data, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'folder_properties_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_mft_folder_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'folder_properties_data' is set + if self.api_client.client_side_validation and ('folder_properties_data' not in local_var_params or # noqa: E501 + local_var_params['folder_properties_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_properties_data` when calling `add_mft_folder_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'folder_properties_data' in local_var_params: + body_params = local_var_params['folder_properties_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/virtualfolder', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_mft_processing_rule_for_site(self, site_name, rule_properties_file, **kwargs): # noqa: E501 + """Add MFTE processing rule for site # noqa: E501 + + Add MFTE processing rule for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_processing_rule_for_site(site_name, rule_properties_file, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_properties_file: File with contenet of rule properties data. (required) + :type rule_properties_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_mft_processing_rule_for_site_with_http_info(site_name, rule_properties_file, **kwargs) # noqa: E501 + + def add_mft_processing_rule_for_site_with_http_info(self, site_name, rule_properties_file, **kwargs): # noqa: E501 + """Add MFTE processing rule for site # noqa: E501 + + Add MFTE processing rule for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_processing_rule_for_site_with_http_info(site_name, rule_properties_file, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_properties_file: File with contenet of rule properties data. (required) + :type rule_properties_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'rule_properties_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_mft_processing_rule_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_mft_processing_rule_for_site`") # noqa: E501 + # verify the required parameter 'rule_properties_file' is set + if self.api_client.client_side_validation and ('rule_properties_file' not in local_var_params or # noqa: E501 + local_var_params['rule_properties_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_properties_file` when calling `add_mft_processing_rule_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'rule_properties_file' in local_var_params: + local_var_files['rulePropertiesFile'] = local_var_params['rule_properties_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/processingRule', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_mft_user_group(self, user_group_properties_data, **kwargs): # noqa: E501 + """Add user group. # noqa: E501 + + Add user group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_user_group(user_group_properties_data, async_req=True) + >>> result = thread.get() + + :param user_group_properties_data: User group object properites (required) + :type user_group_properties_data: UserGroupPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_mft_user_group_with_http_info(user_group_properties_data, **kwargs) # noqa: E501 + + def add_mft_user_group_with_http_info(self, user_group_properties_data, **kwargs): # noqa: E501 + """Add user group. # noqa: E501 + + Add user group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_user_group_with_http_info(user_group_properties_data, async_req=True) + >>> result = thread.get() + + :param user_group_properties_data: User group object properites (required) + :type user_group_properties_data: UserGroupPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user_group_properties_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_mft_user_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_group_properties_data' is set + if self.api_client.client_side_validation and ('user_group_properties_data' not in local_var_params or # noqa: E501 + local_var_params['user_group_properties_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_group_properties_data` when calling `add_mft_user_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'user_group_properties_data' in local_var_params: + body_params = local_var_params['user_group_properties_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/usergroup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_mft_user_group_for_site(self, site_name, user_group_properties_data, **kwargs): # noqa: E501 + """Add user group for site. # noqa: E501 + + Add user group for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_user_group_for_site(site_name, user_group_properties_data, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param user_group_properties_data: User group object properites (required) + :type user_group_properties_data: UserGroupPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_mft_user_group_for_site_with_http_info(site_name, user_group_properties_data, **kwargs) # noqa: E501 + + def add_mft_user_group_for_site_with_http_info(self, site_name, user_group_properties_data, **kwargs): # noqa: E501 + """Add user group for site. # noqa: E501 + + Add user group for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_mft_user_group_for_site_with_http_info(site_name, user_group_properties_data, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param user_group_properties_data: User group object properites (required) + :type user_group_properties_data: UserGroupPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'user_group_properties_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_mft_user_group_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `add_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'user_group_properties_data' is set + if self.api_client.client_side_validation and ('user_group_properties_data' not in local_var_params or # noqa: E501 + local_var_params['user_group_properties_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_group_properties_data` when calling `add_mft_user_group_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'user_group_properties_data' in local_var_params: + body_params = local_var_params['user_group_properties_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/usergroup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_pgp_template(self, server, agent, template_name, pgp_template_data, **kwargs): # noqa: E501 + """Add PGP Template # noqa: E501 + + Add PGP Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_pgp_template(server, agent, template_name, pgp_template_data, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The PGP Template Name (required) + :type template_name: str + :param pgp_template_data: PGP Template Data (required) + :type pgp_template_data: PgpTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_pgp_template_with_http_info(server, agent, template_name, pgp_template_data, **kwargs) # noqa: E501 + + def add_pgp_template_with_http_info(self, server, agent, template_name, pgp_template_data, **kwargs): # noqa: E501 + """Add PGP Template # noqa: E501 + + Add PGP Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_pgp_template_with_http_info(server, agent, template_name, pgp_template_data, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The PGP Template Name (required) + :type template_name: str + :param pgp_template_data: PGP Template Data (required) + :type pgp_template_data: PgpTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'template_name', + 'pgp_template_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_pgp_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_pgp_template`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `add_pgp_template`") # noqa: E501 + # verify the required parameter 'template_name' is set + if self.api_client.client_side_validation and ('template_name' not in local_var_params or # noqa: E501 + local_var_params['template_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_name` when calling `add_pgp_template`") # noqa: E501 + # verify the required parameter 'pgp_template_data' is set + if self.api_client.client_side_validation and ('pgp_template_data' not in local_var_params or # noqa: E501 + local_var_params['pgp_template_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `pgp_template_data` when calling `add_pgp_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'template_name' in local_var_params: + path_params['templateName'] = local_var_params['template_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'pgp_template_data' in local_var_params: + body_params = local_var_params['pgp_template_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_remote_host(self, server, **kwargs): # noqa: E501 + """add remote host to Server # noqa: E501 + + Add a remote host to Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_remote_host(server, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is going to be added to. (required) + :type server: str + :param data: The non default, advanced configuration data + :type data: AddRemoteHostParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_remote_host_with_http_info(server, **kwargs) # noqa: E501 + + def add_remote_host_with_http_info(self, server, **kwargs): # noqa: E501 + """add remote host to Server # noqa: E501 + + Add a remote host to Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_remote_host_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is going to be added to. (required) + :type server: str + :param data: The non default, advanced configuration data + :type data: AddRemoteHostParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_remote_host" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_remote_host`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'data' in local_var_params: + body_params = local_var_params['data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/remotehost', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_role(self, role_file, **kwargs): # noqa: E501 + """Add Authorization Role # noqa: E501 + + Add Authorization Role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_role(role_file, async_req=True) + >>> result = thread.get() + + :param role_file: File with contenet of Role Data. (required) + :type role_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_role_with_http_info(role_file, **kwargs) # noqa: E501 + + def add_role_with_http_info(self, role_file, **kwargs): # noqa: E501 + """Add Authorization Role # noqa: E501 + + Add Authorization Role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_role_with_http_info(role_file, async_req=True) + >>> result = thread.get() + + :param role_file: File with contenet of Role Data. (required) + :type role_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'role_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_role" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'role_file' is set + if self.api_client.client_side_validation and ('role_file' not in local_var_params or # noqa: E501 + local_var_params['role_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role_file` when calling `add_role`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'role_file' in local_var_params: + local_var_files['roleFile'] = local_var_params['role_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/role', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_role_to_ldap_group(self, ldapgroup, role, **kwargs): # noqa: E501 + """Add a role to LDAP group # noqa: E501 + + Add a role to LDAP group so any user belong to the LDAP group will get all permissions defined in the role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_role_to_ldap_group(ldapgroup, role, async_req=True) + >>> result = thread.get() + + :param ldapgroup: Name of LDAP group (required) + :type ldapgroup: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_role_to_ldap_group_with_http_info(ldapgroup, role, **kwargs) # noqa: E501 + + def add_role_to_ldap_group_with_http_info(self, ldapgroup, role, **kwargs): # noqa: E501 + """Add a role to LDAP group # noqa: E501 + + Add a role to LDAP group so any user belong to the LDAP group will get all permissions defined in the role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_role_to_ldap_group_with_http_info(ldapgroup, role, async_req=True) + >>> result = thread.get() + + :param ldapgroup: Name of LDAP group (required) + :type ldapgroup: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ldapgroup', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_role_to_ldap_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ldapgroup' is set + if self.api_client.client_side_validation and ('ldapgroup' not in local_var_params or # noqa: E501 + local_var_params['ldapgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ldapgroup` when calling `add_role_to_ldap_group`") # noqa: E501 + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `add_role_to_ldap_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ldapgroup' in local_var_params: + path_params['ldapgroup'] = local_var_params['ldapgroup'] # noqa: E501 + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/ldap/{ldapgroup}/role/{role}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_role_to_user(self, user, role, **kwargs): # noqa: E501 + """Add a role to user # noqa: E501 + + Add a role to user so that user will inherit role authorization # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_role_to_user(user, role, async_req=True) + >>> result = thread.get() + + :param user: Name of user (required) + :type user: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_role_to_user_with_http_info(user, role, **kwargs) # noqa: E501 + + def add_role_to_user_with_http_info(self, user, role, **kwargs): # noqa: E501 + """Add a role to user # noqa: E501 Add a role to user so that user will inherit role authorization # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_role_to_user(user, role, async_req=True) + + >>> thread = api.add_role_to_user_with_http_info(user, role, async_req=True) + >>> result = thread.get() + + :param user: Name of user (required) + :type user: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_role_to_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `add_role_to_user`") # noqa: E501 + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `add_role_to_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/user/{user}/role/{role}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_secret(self, name_value, **kwargs): # noqa: E501 + """Add a new secret # noqa: E501 + + Add a new secret to the secrets vault. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_secret(name_value, async_req=True) + >>> result = thread.get() + + :param name_value: The new secret value (required) + :type name_value: SecretKeyValue + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_secret_with_http_info(name_value, **kwargs) # noqa: E501 + + def add_secret_with_http_info(self, name_value, **kwargs): # noqa: E501 + """Add a new secret # noqa: E501 + + Add a new secret to the secrets vault. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_secret_with_http_info(name_value, async_req=True) + >>> result = thread.get() + + :param name_value: The new secret value (required) + :type name_value: SecretKeyValue + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name_value' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_secret" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name_value' is set + if self.api_client.client_side_validation and ('name_value' not in local_var_params or # noqa: E501 + local_var_params['name_value'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name_value` when calling `add_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'name_value' in local_var_params: + body_params = local_var_params['name_value'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/secret', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_server(self, body, **kwargs): # noqa: E501 + """Discover and add server to the system # noqa: E501 + + Discover and add a Server. This command setting up new server in the system by automatic discover parameters # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_server(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: AddServerParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_server_with_http_info(body, **kwargs) # noqa: E501 + + def add_server_with_http_info(self, body, **kwargs): # noqa: E501 + """Discover and add server to the system # noqa: E501 + + Discover and add a Server. This command setting up new server in the system by automatic discover parameters # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_server_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: AddServerParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_server" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `add_server`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } + + return self.api_client.call_api( + '/config/server', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_ssh_key(self, ctm, ssh_key_data, **kwargs): # noqa: E501 + """Add an SSH key to the control-m server. # noqa: E501 + + Add an SSH key to the control-m server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_ssh_key(ctm, ssh_key_data, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param ssh_key_data: The parameters of the ssh key name password type format bits. (required) + :type ssh_key_data: SSHKeyData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_ssh_key_with_http_info(ctm, ssh_key_data, **kwargs) # noqa: E501 + + def add_ssh_key_with_http_info(self, ctm, ssh_key_data, **kwargs): # noqa: E501 + """Add an SSH key to the control-m server. # noqa: E501 + + Add an SSH key to the control-m server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_ssh_key_with_http_info(ctm, ssh_key_data, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param ssh_key_data: The parameters of the ssh key name password type format bits. (required) + :type ssh_key_data: SSHKeyData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm', + 'ssh_key_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_ssh_key" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `add_ssh_key`") # noqa: E501 + # verify the required parameter 'ssh_key_data' is set + if self.api_client.client_side_validation and ('ssh_key_data' not in local_var_params or # noqa: E501 + local_var_params['ssh_key_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ssh_key_data` when calling `add_ssh_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'ssh_key_data' in local_var_params: + body_params = local_var_params['ssh_key_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 422: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctm}/sshkey/add', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_user(self, user_file, **kwargs): # noqa: E501 + """Add user # noqa: E501 + + Add user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_user(user_file, async_req=True) + >>> result = thread.get() + + :param user_file: File with contenet of user data. (required) + :type user_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_user_with_http_info(user_file, **kwargs) # noqa: E501 + + def add_user_with_http_info(self, user_file, **kwargs): # noqa: E501 + """Add user # noqa: E501 + + Add user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_user_with_http_info(user_file, async_req=True) + >>> result = thread.get() + + :param user_file: File with contenet of user data. (required) + :type user_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_file' is set + if self.api_client.client_side_validation and ('user_file' not in local_var_params or # noqa: E501 + local_var_params['user_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_file` when calling `add_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'user_file' in local_var_params: + local_var_files['userFile'] = local_var_params['user_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/user', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_wda_gateway(self, server, agent, data_assurance_gateway_data, **kwargs): # noqa: E501 + """add DataAssurance gateway. # noqa: E501 + + add DataAssurance gateway. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_wda_gateway(server, agent, data_assurance_gateway_data, async_req=True) + >>> result = thread.get() + + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param data_assurance_gateway_data: DataAssurance Gateway Data (required) + :type data_assurance_gateway_data: DataAssuranceGatewayData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_wda_gateway_with_http_info(server, agent, data_assurance_gateway_data, **kwargs) # noqa: E501 + + def add_wda_gateway_with_http_info(self, server, agent, data_assurance_gateway_data, **kwargs): # noqa: E501 + """add DataAssurance gateway. # noqa: E501 + + add DataAssurance gateway. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_wda_gateway_with_http_info(server, agent, data_assurance_gateway_data, async_req=True) + >>> result = thread.get() + + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param data_assurance_gateway_data: DataAssurance Gateway Data (required) + :type data_assurance_gateway_data: DataAssuranceGatewayData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'data_assurance_gateway_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_wda_gateway" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_wda_gateway`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `add_wda_gateway`") # noqa: E501 + # verify the required parameter 'data_assurance_gateway_data' is set + if self.api_client.client_side_validation and ('data_assurance_gateway_data' not in local_var_params or # noqa: E501 + local_var_params['data_assurance_gateway_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `data_assurance_gateway_data` when calling `add_wda_gateway`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'data_assurance_gateway_data' in local_var_params: + body_params = local_var_params['data_assurance_gateway_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/dataAssurance/{server}/{agent}/gateway', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def add_zos_template(self, server, agent, template_name, zos_template_data, **kwargs): # noqa: E501 + """Add z/OS Template # noqa: E501 + + Add z/OS Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_zos_template(server, agent, template_name, zos_template_data, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The z/OS Template Name (required) + :type template_name: str + :param zos_template_data: z/OS Template Data (required) + :type zos_template_data: ZosTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.add_zos_template_with_http_info(server, agent, template_name, zos_template_data, **kwargs) # noqa: E501 + + def add_zos_template_with_http_info(self, server, agent, template_name, zos_template_data, **kwargs): # noqa: E501 + """Add z/OS Template # noqa: E501 + + Add z/OS Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_zos_template_with_http_info(server, agent, template_name, zos_template_data, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The z/OS Template Name (required) + :type template_name: str + :param zos_template_data: z/OS Template Data (required) + :type zos_template_data: ZosTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'template_name', + 'zos_template_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_zos_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_zos_template`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `add_zos_template`") # noqa: E501 + # verify the required parameter 'template_name' is set + if self.api_client.client_side_validation and ('template_name' not in local_var_params or # noqa: E501 + local_var_params['template_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_name` when calling `add_zos_template`") # noqa: E501 + # verify the required parameter 'zos_template_data' is set + if self.api_client.client_side_validation and ('zos_template_data' not in local_var_params or # noqa: E501 + local_var_params['zos_template_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `zos_template_data` when calling `add_zos_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'template_name' in local_var_params: + path_params['templateName'] = local_var_params['template_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'zos_template_data' in local_var_params: + body_params = local_var_params['zos_template_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/zostemplate/{templateName}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def authorize_mft_ssh_cluster(self, server, agent, cluster_name, hostname_port_list, **kwargs): # noqa: E501 + """Authorize SSH Cluster # noqa: E501 + + Authorize SSH Cluster # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_mft_ssh_cluster(server, agent, cluster_name, hostname_port_list, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param cluster_name: Ssh Cluster Name (required) + :type cluster_name: str + :param hostname_port_list: File with content of hostnames and ports (required) + :type hostname_port_list: ClusterAuthorizationData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.authorize_mft_ssh_cluster_with_http_info(server, agent, cluster_name, hostname_port_list, **kwargs) # noqa: E501 + + def authorize_mft_ssh_cluster_with_http_info(self, server, agent, cluster_name, hostname_port_list, **kwargs): # noqa: E501 + """Authorize SSH Cluster # noqa: E501 + + Authorize SSH Cluster # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_mft_ssh_cluster_with_http_info(server, agent, cluster_name, hostname_port_list, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param cluster_name: Ssh Cluster Name (required) + :type cluster_name: str + :param hostname_port_list: File with content of hostnames and ports (required) + :type hostname_port_list: ClusterAuthorizationData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'cluster_name', + 'hostname_port_list' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method authorize_mft_ssh_cluster" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `authorize_mft_ssh_cluster`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `authorize_mft_ssh_cluster`") # noqa: E501 + # verify the required parameter 'cluster_name' is set + if self.api_client.client_side_validation and ('cluster_name' not in local_var_params or # noqa: E501 + local_var_params['cluster_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `cluster_name` when calling `authorize_mft_ssh_cluster`") # noqa: E501 + # verify the required parameter 'hostname_port_list' is set + if self.api_client.client_side_validation and ('hostname_port_list' not in local_var_params or # noqa: E501 + local_var_params['hostname_port_list'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostname_port_list` when calling `authorize_mft_ssh_cluster`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'cluster_name' in local_var_params: + path_params['clusterName'] = local_var_params['cluster_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'hostname_port_list' in local_var_params: + body_params = local_var_params['hostname_port_list'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/ssh/cluster/{clusterName}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def authorize_mft_ssh_host(self, server, agent, hostname, **kwargs): # noqa: E501 + """Authorize SSH Host # noqa: E501 + + Authorize SSH Host for SFTP account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_mft_ssh_host(server, agent, hostname, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param hostname: Ssh Hostname (required) + :type hostname: str + :param port: Ssh port for the relevant host + :type port: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.authorize_mft_ssh_host_with_http_info(server, agent, hostname, **kwargs) # noqa: E501 + + def authorize_mft_ssh_host_with_http_info(self, server, agent, hostname, **kwargs): # noqa: E501 + """Authorize SSH Host # noqa: E501 + + Authorize SSH Host for SFTP account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_mft_ssh_host_with_http_info(server, agent, hostname, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param hostname: Ssh Hostname (required) + :type hostname: str + :param port: Ssh port for the relevant host + :type port: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'hostname', + 'port' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method authorize_mft_ssh_host" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `authorize_mft_ssh_host`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `authorize_mft_ssh_host`") # noqa: E501 + # verify the required parameter 'hostname' is set + if self.api_client.client_side_validation and ('hostname' not in local_var_params or # noqa: E501 + local_var_params['hostname'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostname` when calling `authorize_mft_ssh_host`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'hostname' in local_var_params: + path_params['hostname'] = local_var_params['hostname'] # noqa: E501 + + query_params = [] + if 'port' in local_var_params and local_var_params['port'] is not None: # noqa: E501 + query_params.append(('port', local_var_params['port'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/ssh/host/{hostname}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def authorize_ssh_known_agentlesshost(self, server, agentlesshost, **kwargs): # noqa: E501 + """Authorize # noqa: E501 + + Authorized known ssh agentless host. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_ssh_known_agentlesshost(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The name of the agentless host. (required) + :type agentlesshost: str + :param authorize_ssh_data: The data of the authorize ssh request + :type authorize_ssh_data: AuthorizeSSHData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.authorize_ssh_known_agentlesshost_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 + + def authorize_ssh_known_agentlesshost_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """Authorize # noqa: E501 + + Authorized known ssh agentless host. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_ssh_known_agentlesshost_with_http_info(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The name of the agentless host. (required) + :type agentlesshost: str + :param authorize_ssh_data: The data of the authorize ssh request + :type authorize_ssh_data: AuthorizeSSHData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agentlesshost', + 'authorize_ssh_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method authorize_ssh_known_agentlesshost" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `authorize_ssh_known_agentlesshost`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `authorize_ssh_known_agentlesshost`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'authorize_ssh_data' in local_var_params: + body_params = local_var_params['authorize_ssh_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agentlesshost/{agentlesshost}/authorize', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def authorize_ssh_known_remotehost(self, server, remotehost, **kwargs): # noqa: E501 + """Authorize # noqa: E501 + + Authorized known ssh remote host. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_ssh_known_remotehost(server, remotehost, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is connected to. (required) + :type server: str + :param remotehost: The name of the remote host. (required) + :type remotehost: str + :param associated_agent: Optionally case insensitive agent name of host or alias of the Agent. + :type associated_agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.authorize_ssh_known_remotehost_with_http_info(server, remotehost, **kwargs) # noqa: E501 + + def authorize_ssh_known_remotehost_with_http_info(self, server, remotehost, **kwargs): # noqa: E501 + """Authorize # noqa: E501 + + Authorized known ssh remote host. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.authorize_ssh_known_remotehost_with_http_info(server, remotehost, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is connected to. (required) + :type server: str + :param remotehost: The name of the remote host. (required) + :type remotehost: str + :param associated_agent: Optionally case insensitive agent name of host or alias of the Agent. + :type associated_agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'remotehost', + 'associated_agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method authorize_ssh_known_remotehost" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `authorize_ssh_known_remotehost`") # noqa: E501 + # verify the required parameter 'remotehost' is set + if self.api_client.client_side_validation and ('remotehost' not in local_var_params or # noqa: E501 + local_var_params['remotehost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `remotehost` when calling `authorize_ssh_known_remotehost`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'remotehost' in local_var_params: + path_params['remotehost'] = local_var_params['remotehost'] # noqa: E501 + + query_params = [] + if 'associated_agent' in local_var_params and local_var_params['associated_agent'] is not None: # noqa: E501 + query_params.append(('associatedAgent', local_var_params['associated_agent'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/remotehost/{remotehost}/authorize', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def change_user_password(self, user, **kwargs): # noqa: E501 + """Change user password # noqa: E501 + + Change user password # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.change_user_password(user, async_req=True) + >>> result = thread.get() + + :param user: user name (required) + :type user: str + :param password: The new password. + :type password: UserPassword + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.change_user_password_with_http_info(user, **kwargs) # noqa: E501 + + def change_user_password_with_http_info(self, user, **kwargs): # noqa: E501 + """Change user password # noqa: E501 + + Change user password # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.change_user_password_with_http_info(user, async_req=True) + >>> result = thread.get() + + :param user: user name (required) + :type user: str + :param password: The new password. + :type password: UserPassword + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user', + 'password' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method change_user_password" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `change_user_password`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'password' in local_var_params: + body_params = local_var_params['password'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/user/{user}/password/adminUpdate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_agent_certificate_signing_request(self, server, agent, csr_data, **kwargs): # noqa: E501 + """Create certificate signing request (CSR). # noqa: E501 + + Create certificate signing request (CSR) on SSL configured Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_agent_certificate_signing_request(server, agent, csr_data, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param csr_data: Certificate Signing Request (CSR) data (required) + :type csr_data: CertificateSigningRequestData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.create_agent_certificate_signing_request_with_http_info(server, agent, csr_data, **kwargs) # noqa: E501 + + def create_agent_certificate_signing_request_with_http_info(self, server, agent, csr_data, **kwargs): # noqa: E501 + """Create certificate signing request (CSR). # noqa: E501 + + Create certificate signing request (CSR) on SSL configured Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_agent_certificate_signing_request_with_http_info(server, agent, csr_data, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param csr_data: Certificate Signing Request (CSR) data (required) + :type csr_data: CertificateSigningRequestData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'csr_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_agent_certificate_signing_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `create_agent_certificate_signing_request`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `create_agent_certificate_signing_request`") # noqa: E501 + # verify the required parameter 'csr_data' is set + if self.api_client.client_side_validation and ('csr_data' not in local_var_params or # noqa: E501 + local_var_params['csr_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `csr_data` when calling `create_agent_certificate_signing_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'csr_data' in local_var_params: + body_params = local_var_params['csr_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/csr', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_gateway(self, **kwargs): # noqa: E501 + """Add gateway for server. # noqa: E501 + + Add gateway for server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_gateway(async_req=True) + >>> result = thread.get() + + :param add_gateway_params: Gateway parameters + :type add_gateway_params: AddGatewayParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.create_gateway_with_http_info(**kwargs) # noqa: E501 + + def create_gateway_with_http_info(self, **kwargs): # noqa: E501 + """Add gateway for server. # noqa: E501 + + Add gateway for server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_gateway_with_http_info(async_req=True) + >>> result = thread.get() + + :param add_gateway_params: Gateway parameters + :type add_gateway_params: AddGatewayParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'add_gateway_params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_gateway" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'add_gateway_params' in local_var_params: + body_params = local_var_params['add_gateway_params'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/gateway', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_run_as_user(self, server, run_as_user_data, **kwargs): # noqa: E501 + """Add a new Run-as user # noqa: E501 + + Add a new Run-as user to server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_run_as_user(server, run_as_user_data, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param run_as_user_data: Run as user data (required) + :type run_as_user_data: RunAsUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.create_run_as_user_with_http_info(server, run_as_user_data, **kwargs) # noqa: E501 + + def create_run_as_user_with_http_info(self, server, run_as_user_data, **kwargs): # noqa: E501 + """Add a new Run-as user # noqa: E501 + + Add a new Run-as user to server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_run_as_user_with_http_info(server, run_as_user_data, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param run_as_user_data: Run as user data (required) + :type run_as_user_data: RunAsUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'run_as_user_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_run_as_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `create_run_as_user`") # noqa: E501 + # verify the required parameter 'run_as_user_data' is set + if self.api_client.client_side_validation and ('run_as_user_data' not in local_var_params or # noqa: E501 + local_var_params['run_as_user_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_as_user_data` when calling `create_run_as_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'run_as_user_data' in local_var_params: + body_params = local_var_params['run_as_user_data'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/runasuser', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def ctm_pause(self, server, **kwargs): # noqa: E501 + """Pause the CTM server. # noqa: E501 + + When server is paused, the server is still up and running but do not execute new jobs. Any jobs that are already executing will continue to be. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ctm_pause(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.ctm_pause_with_http_info(server, **kwargs) # noqa: E501 + + def ctm_pause_with_http_info(self, server, **kwargs): # noqa: E501 + """Pause the CTM server. # noqa: E501 + + When server is paused, the server is still up and running but do not execute new jobs. Any jobs that are already executing will continue to be. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ctm_pause_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method ctm_pause" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `ctm_pause`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: None, + 403: None, + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/pause', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def ctm_server_rename(self, ctm_name, ctm_server_rename_params, **kwargs): # noqa: E501 + """CTM Server Rename. # noqa: E501 + + CTM Server Rename request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ctm_server_rename(ctm_name, ctm_server_rename_params, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param ctm_server_rename_params: CTM Server Rename parameters (required) + :type ctm_server_rename_params: CtmServerRenameParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.ctm_server_rename_with_http_info(ctm_name, ctm_server_rename_params, **kwargs) # noqa: E501 + + def ctm_server_rename_with_http_info(self, ctm_name, ctm_server_rename_params, **kwargs): # noqa: E501 + """CTM Server Rename. # noqa: E501 + + CTM Server Rename request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ctm_server_rename_with_http_info(ctm_name, ctm_server_rename_params, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param ctm_server_rename_params: CTM Server Rename parameters (required) + :type ctm_server_rename_params: CtmServerRenameParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'ctm_server_rename_params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method ctm_server_rename" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `ctm_server_rename`") # noqa: E501 + # verify the required parameter 'ctm_server_rename_params' is set + if self.api_client.client_side_validation and ('ctm_server_rename_params' not in local_var_params or # noqa: E501 + local_var_params['ctm_server_rename_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_server_rename_params` when calling `ctm_server_rename`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'ctm_server_rename_params' in local_var_params: + body_params = local_var_params['ctm_server_rename_params'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctmName}/rename', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def ctm_server_rename_preview(self, ctm_name, ctm_server_rename_params, **kwargs): # noqa: E501 + """CTM Server Rename Preview. # noqa: E501 + + CTM Server Rename Preview for generate Warnings report. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ctm_server_rename_preview(ctm_name, ctm_server_rename_params, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param ctm_server_rename_params: CTM Server Rename Preview parameters (required) + :type ctm_server_rename_params: CtmServerRenameParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CtmServerRenameReport + """ + kwargs['_return_http_data_only'] = True + return self.ctm_server_rename_preview_with_http_info(ctm_name, ctm_server_rename_params, **kwargs) # noqa: E501 + + def ctm_server_rename_preview_with_http_info(self, ctm_name, ctm_server_rename_params, **kwargs): # noqa: E501 + """CTM Server Rename Preview. # noqa: E501 + + CTM Server Rename Preview for generate Warnings report. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.ctm_server_rename_preview_with_http_info(ctm_name, ctm_server_rename_params, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param ctm_server_rename_params: CTM Server Rename Preview parameters (required) + :type ctm_server_rename_params: CtmServerRenameParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CtmServerRenameReport, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'ctm_server_rename_params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method ctm_server_rename_preview" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `ctm_server_rename_preview`") # noqa: E501 + # verify the required parameter 'ctm_server_rename_params' is set + if self.api_client.client_side_validation and ('ctm_server_rename_params' not in local_var_params or # noqa: E501 + local_var_params['ctm_server_rename_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_server_rename_params` when calling `ctm_server_rename_preview`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'ctm_server_rename_params' in local_var_params: + body_params = local_var_params['ctm_server_rename_params'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtmServerRenameReport", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctmName}/rename/preview', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def database_to_sync_mode(self, server, **kwargs): # noqa: E501 + """Perform Control-M/Server Trigger DB sync mode # noqa: E501 + + Perform Control-M/Server Trigger DB sync mode on a specified Server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.database_to_sync_mode(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.database_to_sync_mode_with_http_info(server, **kwargs) # noqa: E501 + + def database_to_sync_mode_with_http_info(self, server, **kwargs): # noqa: E501 + """Perform Control-M/Server Trigger DB sync mode # noqa: E501 + + Perform Control-M/Server Trigger DB sync mode on a specified Server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.database_to_sync_mode_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method database_to_sync_mode" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `database_to_sync_mode`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/database/sync', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def define_server(self, params, **kwargs): # noqa: E501 + """add server definition to the system # noqa: E501 + + Define a Server. This command setting up new server in the system # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.define_server(params, async_req=True) + >>> result = thread.get() + + :param params: (required) + :type params: ServerDefinitionParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.define_server_with_http_info(params, **kwargs) # noqa: E501 + + def define_server_with_http_info(self, params, **kwargs): # noqa: E501 + """add server definition to the system # noqa: E501 + + Define a Server. This command setting up new server in the system # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.define_server_with_http_info(params, async_req=True) + >>> result = thread.get() + + :param params: (required) + :type params: ServerDefinitionParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method define_server" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'params' is set + if self.api_client.client_side_validation and ('params' not in local_var_params or # noqa: E501 + local_var_params['params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `params` when calling `define_server`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'params' in local_var_params: + body_params = local_var_params['params'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/define', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_agent(self, server, agent, **kwargs): # noqa: E501 + """delete an agent from Server # noqa: E501 + + Delete an agent from a Server. This will not shut the agent down. It only disconnects and removes it from the list. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_agent(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to delete. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_agent_with_http_info(server, agent, **kwargs) # noqa: E501 + + def delete_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """delete an agent from Server # noqa: E501 + + Delete an agent from a Server. This will not shut the agent down. It only disconnects and removes it from the list. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_agent_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to delete. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_agent" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_agent`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `delete_agent`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_agentless_host(self, server, agentlesshost, **kwargs): # noqa: E501 + """delete an agentless host from Server # noqa: E501 + + Delete an agentless host from a Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_agentless_host(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The name of the agentless host to delete. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_agentless_host_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 + + def delete_agentless_host_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """delete an agentless host from Server # noqa: E501 + + Delete an agentless host from a Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_agentless_host_with_http_info(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The name of the agentless host to delete. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agentlesshost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_agentless_host" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_agentless_host`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `delete_agentless_host`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agentlesshost/{agentlesshost}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_archive_rule(self, rule_name, delete_rule_data_flag, **kwargs): # noqa: E501 + """Delete Workload Archiving rule # noqa: E501 + + Deletes Workload Archiving rule by name. It is required to send deleteRuleData flag to specify if rule need to be deleted with all the collected data or deleteRuleWithoutData otherwise. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_archive_rule(rule_name, delete_rule_data_flag, async_req=True) + >>> result = thread.get() + + :param rule_name: Rule name to delete (required) + :type rule_name: str + :param delete_rule_data_flag: Remove rule with collected data or without. REQUIRED. (required) + :type delete_rule_data_flag: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_archive_rule_with_http_info(rule_name, delete_rule_data_flag, **kwargs) # noqa: E501 + + def delete_archive_rule_with_http_info(self, rule_name, delete_rule_data_flag, **kwargs): # noqa: E501 + """Delete Workload Archiving rule # noqa: E501 + + Deletes Workload Archiving rule by name. It is required to send deleteRuleData flag to specify if rule need to be deleted with all the collected data or deleteRuleWithoutData otherwise. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_archive_rule_with_http_info(rule_name, delete_rule_data_flag, async_req=True) + >>> result = thread.get() + + :param rule_name: Rule name to delete (required) + :type rule_name: str + :param delete_rule_data_flag: Remove rule with collected data or without. REQUIRED. (required) + :type delete_rule_data_flag: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'rule_name', + 'delete_rule_data_flag' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_archive_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'rule_name' is set + if self.api_client.client_side_validation and ('rule_name' not in local_var_params or # noqa: E501 + local_var_params['rule_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_name` when calling `delete_archive_rule`") # noqa: E501 + # verify the required parameter 'delete_rule_data_flag' is set + if self.api_client.client_side_validation and ('delete_rule_data_flag' not in local_var_params or # noqa: E501 + local_var_params['delete_rule_data_flag'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `delete_rule_data_flag` when calling `delete_archive_rule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'rule_name' in local_var_params: + path_params['ruleName'] = local_var_params['rule_name'] # noqa: E501 + + query_params = [] + if 'delete_rule_data_flag' in local_var_params and local_var_params['delete_rule_data_flag'] is not None: # noqa: E501 + query_params.append(('deleteRuleDataFlag', local_var_params['delete_rule_data_flag'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } + + return self.api_client.call_api( + '/config/archive/rule/{ruleName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_authorization_role(self, role, **kwargs): # noqa: E501 + """Delete Authorization Role # noqa: E501 + + Delete Authorization Role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_authorization_role(role, async_req=True) + >>> result = thread.get() + + :param role: The Role name. (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_authorization_role_with_http_info(role, **kwargs) # noqa: E501 + + def delete_authorization_role_with_http_info(self, role, **kwargs): # noqa: E501 + """Delete Authorization Role # noqa: E501 + + Delete Authorization Role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_authorization_role_with_http_info(role, async_req=True) + >>> result = thread.get() + + :param role: The Role name. (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_authorization_role" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `delete_authorization_role`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/role/{role}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_ctm_security_group(self, ctm_name, group_name, **kwargs): # noqa: E501 + """Delete CTM Security group # noqa: E501 + + Delete CTM Security group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ctm_security_group(ctm_name, group_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param group_name: (required) + :type group_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_ctm_security_group_with_http_info(ctm_name, group_name, **kwargs) # noqa: E501 + + def delete_ctm_security_group_with_http_info(self, ctm_name, group_name, **kwargs): # noqa: E501 + """Delete CTM Security group # noqa: E501 + + Delete CTM Security group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ctm_security_group_with_http_info(ctm_name, group_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param group_name: (required) + :type group_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'group_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_ctm_security_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `delete_ctm_security_group`") # noqa: E501 + # verify the required parameter 'group_name' is set + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_name` when calling `delete_ctm_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + if 'group_name' in local_var_params: + path_params['groupName'] = local_var_params['group_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctmName}/security/group/{groupName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_ctm_security_user(self, ctm_name, user_name, **kwargs): # noqa: E501 + """Delete CTM Security user # noqa: E501 + + Delete CTM Security user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ctm_security_user(ctm_name, user_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param user_name: (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_ctm_security_user_with_http_info(ctm_name, user_name, **kwargs) # noqa: E501 + + def delete_ctm_security_user_with_http_info(self, ctm_name, user_name, **kwargs): # noqa: E501 + """Delete CTM Security user # noqa: E501 + + Delete CTM Security user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ctm_security_user_with_http_info(ctm_name, user_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param user_name: (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_ctm_security_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `delete_ctm_security_user`") # noqa: E501 + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `delete_ctm_security_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctmName}/security/user/{userName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_em_component(self, host, type, name, **kwargs): # noqa: E501 + """Delete a specific EM component # noqa: E501 + + Delete the specified Control-M/Enterprise Manager component # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_em_component(host, type, name, async_req=True) + >>> result = thread.get() + + :param host: The hostname of the server where the EM component is running. (required) + :type host: str + :param type: The type of the EM component. (required) + :type type: str + :param name: The logical name of the EM component. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_em_component_with_http_info(host, type, name, **kwargs) # noqa: E501 + + def delete_em_component_with_http_info(self, host, type, name, **kwargs): # noqa: E501 + """Delete a specific EM component # noqa: E501 + + Delete the specified Control-M/Enterprise Manager component # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_em_component_with_http_info(host, type, name, async_req=True) + >>> result = thread.get() + + :param host: The hostname of the server where the EM component is running. (required) + :type host: str + :param type: The type of the EM component. (required) + :type type: str + :param name: The logical name of the EM component. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'host', + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_em_component" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'host' is set + if self.api_client.client_side_validation and ('host' not in local_var_params or # noqa: E501 + local_var_params['host'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `host` when calling `delete_em_component`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `delete_em_component`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_em_component`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'host' in local_var_params: + path_params['host'] = local_var_params['host'] # noqa: E501 + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/em/component/{host}/{type}/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_external_user(self, username, **kwargs): # noqa: E501 + """Delete an external user # noqa: E501 + + Delete an existing external user in MFT # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user(username, async_req=True) + >>> result = thread.get() + + :param username: The name of the external user to delete (required) + :type username: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_external_user_with_http_info(username, **kwargs) # noqa: E501 + + def delete_external_user_with_http_info(self, username, **kwargs): # noqa: E501 + """Delete an external user # noqa: E501 + + Delete an existing external user in MFT # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param username: The name of the external user to delete (required) + :type username: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'username' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_external_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `username` when calling `delete_external_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/externaluser/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_external_user_for_site(self, site_name, username, **kwargs): # noqa: E501 + """Delete an external user from site # noqa: E501 + + Delete an existing external user from site in MFT # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_for_site(site_name, username, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param username: The name of the external user to delete (required) + :type username: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_external_user_for_site_with_http_info(site_name, username, **kwargs) # noqa: E501 + + def delete_external_user_for_site_with_http_info(self, site_name, username, **kwargs): # noqa: E501 + """Delete an external user from site # noqa: E501 + + Delete an existing external user from site in MFT # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_for_site_with_http_info(site_name, username, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param username: The name of the external user to delete (required) + :type username: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'username' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_external_user_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_external_user_for_site`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `username` when calling `delete_external_user_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/externaluser/{username}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_external_user_from_mft_user_group_for_site(self, site_name, group_name, user_name, **kwargs): # noqa: E501 + """Remove an external user from group in MFT for site. # noqa: E501 + + Remove an external user from group in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_from_mft_user_group_for_site(site_name, group_name, user_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group. (required) + :type group_name: str + :param user_name: The user name. (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_external_user_from_mft_user_group_for_site_with_http_info(site_name, group_name, user_name, **kwargs) # noqa: E501 + + def delete_external_user_from_mft_user_group_for_site_with_http_info(self, site_name, group_name, user_name, **kwargs): # noqa: E501 + """Remove an external user from group in MFT for site. # noqa: E501 + + Remove an external user from group in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_from_mft_user_group_for_site_with_http_info(site_name, group_name, user_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group. (required) + :type group_name: str + :param user_name: The user name. (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'group_name', + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_external_user_from_mft_user_group_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_external_user_from_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'group_name' is set + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_name` when calling `delete_external_user_from_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `delete_external_user_from_mft_user_group_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'group_name' in local_var_params: + path_params['groupName'] = local_var_params['group_name'] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/usergroup/{groupName}/user/{userName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_external_user_or_user_group_from_mft_folder(self, folder_name, user_or_group, **kwargs): # noqa: E501 + """Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + + Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_or_user_group_from_mft_folder(folder_name, user_or_group, async_req=True) + >>> result = thread.get() + + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name (required) + :type user_or_group: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_external_user_or_user_group_from_mft_folder_with_http_info(folder_name, user_or_group, **kwargs) # noqa: E501 + + def delete_external_user_or_user_group_from_mft_folder_with_http_info(self, folder_name, user_or_group, **kwargs): # noqa: E501 + """Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + + Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_or_user_group_from_mft_folder_with_http_info(folder_name, user_or_group, async_req=True) + >>> result = thread.get() + + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name (required) + :type user_or_group: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'folder_name', + 'user_or_group' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_external_user_or_user_group_from_mft_folder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `delete_external_user_or_user_group_from_mft_folder`") # noqa: E501 + # verify the required parameter 'user_or_group' is set + if self.api_client.client_side_validation and ('user_or_group' not in local_var_params or # noqa: E501 + local_var_params['user_or_group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_or_group` when calling `delete_external_user_or_user_group_from_mft_folder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 + if 'user_or_group' in local_var_params: + path_params['userOrGroup'] = local_var_params['user_or_group'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/virtualfolder/{folderName}/user/{userOrGroup}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_external_user_or_user_group_from_mft_folder_for_site(self, site_name, folder_name, user_or_group, **kwargs): # noqa: E501 + """Remove an external user or user group from an existing virtual folder in MFT for site. # noqa: E501 + + Remove an external user or user group from an existing virtual folder in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_or_user_group_from_mft_folder_for_site(site_name, folder_name, user_or_group, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name (required) + :type user_or_group: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_external_user_or_user_group_from_mft_folder_for_site_with_http_info(site_name, folder_name, user_or_group, **kwargs) # noqa: E501 + + def delete_external_user_or_user_group_from_mft_folder_for_site_with_http_info(self, site_name, folder_name, user_or_group, **kwargs): # noqa: E501 + """Remove an external user or user group from an existing virtual folder in MFT for site. # noqa: E501 + + Remove an external user or user group from an existing virtual folder in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_external_user_or_user_group_from_mft_folder_for_site_with_http_info(site_name, folder_name, user_or_group, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param user_or_group: The user name (required) + :type user_or_group: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'folder_name', + 'user_or_group' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_external_user_or_user_group_from_mft_folder_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_external_user_or_user_group_from_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `delete_external_user_or_user_group_from_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'user_or_group' is set + if self.api_client.client_side_validation and ('user_or_group' not in local_var_params or # noqa: E501 + local_var_params['user_or_group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_or_group` when calling `delete_external_user_or_user_group_from_mft_folder_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 + if 'user_or_group' in local_var_params: + path_params['userOrGroup'] = local_var_params['user_or_group'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/virtualfolder/{folderName}/user/{userOrGroup}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_host_from_group(self, server, hostgroup, host, **kwargs): # noqa: E501 + """delete an agent from a hostgroup # noqa: E501 + + Delete an agent from the specified hostgroup. If the group is empty it will also be deleted. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_host_from_group(server, hostgroup, host, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroup belongs to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param host: The agent to be deleted (required) + :type host: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AgentsInGroupSuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_host_from_group_with_http_info(server, hostgroup, host, **kwargs) # noqa: E501 + + def delete_host_from_group_with_http_info(self, server, hostgroup, host, **kwargs): # noqa: E501 + """delete an agent from a hostgroup # noqa: E501 + + Delete an agent from the specified hostgroup. If the group is empty it will also be deleted. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_host_from_group_with_http_info(server, hostgroup, host, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroup belongs to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param host: The agent to be deleted (required) + :type host: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AgentsInGroupSuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'hostgroup', + 'host' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_host_from_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_host_from_group`") # noqa: E501 + # verify the required parameter 'hostgroup' is set + if self.api_client.client_side_validation and ('hostgroup' not in local_var_params or # noqa: E501 + local_var_params['hostgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostgroup` when calling `delete_host_from_group`") # noqa: E501 + # verify the required parameter 'host' is set + if self.api_client.client_side_validation and ('host' not in local_var_params or # noqa: E501 + local_var_params['host'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `host` when calling `delete_host_from_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'hostgroup' in local_var_params: + path_params['hostgroup'] = local_var_params['hostgroup'] # noqa: E501 + if 'host' in local_var_params: + path_params['host'] = local_var_params['host'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AgentsInGroupSuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/hostgroup/{hostgroup}/agent/{host}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_host_group(self, server, hostgroup, **kwargs): # noqa: E501 + """delete host group # noqa: E501 + + delete host group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_host_group(server, hostgroup, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_host_group_with_http_info(server, hostgroup, **kwargs) # noqa: E501 + + def delete_host_group_with_http_info(self, server, hostgroup, **kwargs): # noqa: E501 + """delete host group # noqa: E501 + + delete host group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_host_group_with_http_info(server, hostgroup, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'hostgroup' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_host_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_host_group`") # noqa: E501 + # verify the required parameter 'hostgroup' is set + if self.api_client.client_side_validation and ('hostgroup' not in local_var_params or # noqa: E501 + local_var_params['hostgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostgroup` when calling `delete_host_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'hostgroup' in local_var_params: + path_params['hostgroup'] = local_var_params['hostgroup'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/hostgroup/{hostgroup}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_host_restrictions(self, ctm, node_prefix, **kwargs): # noqa: E501 + """Delete Host Restrictions. # noqa: E501 + + Delete Host Restrictions to the agent/s of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_host_restrictions(ctm, node_prefix, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param node_prefix: The nodePrefix query parameter accepts comma-separated values of node prefixes. It removes all host restrictions matching the submitted nodePrefixes in the API request. (required) + :type node_prefix: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_host_restrictions_with_http_info(ctm, node_prefix, **kwargs) # noqa: E501 + + def delete_host_restrictions_with_http_info(self, ctm, node_prefix, **kwargs): # noqa: E501 + """Delete Host Restrictions. # noqa: E501 + + Delete Host Restrictions to the agent/s of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_host_restrictions_with_http_info(ctm, node_prefix, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param node_prefix: The nodePrefix query parameter accepts comma-separated values of node prefixes. It removes all host restrictions matching the submitted nodePrefixes in the API request. (required) + :type node_prefix: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm', + 'node_prefix' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_host_restrictions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `delete_host_restrictions`") # noqa: E501 + # verify the required parameter 'node_prefix' is set + if self.api_client.client_side_validation and ('node_prefix' not in local_var_params or # noqa: E501 + local_var_params['node_prefix'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `node_prefix` when calling `delete_host_restrictions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 + + query_params = [] + if 'node_prefix' in local_var_params and local_var_params['node_prefix'] is not None: # noqa: E501 + query_params.append(('nodePrefix', local_var_params['node_prefix'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctm}/hostRestriction', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_ldap_group_from_mft_user_group_for_site(self, site_name, group_name, ldap_group_name, **kwargs): # noqa: E501 + """Remove an LDAP group from group in MFT for site. # noqa: E501 + + Remove an LDAP group from group in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ldap_group_from_mft_user_group_for_site(site_name, group_name, ldap_group_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group. (required) + :type group_name: str + :param ldap_group_name: The LDAP group name. (required) + :type ldap_group_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_ldap_group_from_mft_user_group_for_site_with_http_info(site_name, group_name, ldap_group_name, **kwargs) # noqa: E501 + + def delete_ldap_group_from_mft_user_group_for_site_with_http_info(self, site_name, group_name, ldap_group_name, **kwargs): # noqa: E501 + """Remove an LDAP group from group in MFT for site. # noqa: E501 + + Remove an LDAP group from group in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ldap_group_from_mft_user_group_for_site_with_http_info(site_name, group_name, ldap_group_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param group_name: Name of Group. (required) + :type group_name: str + :param ldap_group_name: The LDAP group name. (required) + :type ldap_group_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'group_name', + 'ldap_group_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_ldap_group_from_mft_user_group_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_ldap_group_from_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'group_name' is set + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_name` when calling `delete_ldap_group_from_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'ldap_group_name' is set + if self.api_client.client_side_validation and ('ldap_group_name' not in local_var_params or # noqa: E501 + local_var_params['ldap_group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ldap_group_name` when calling `delete_ldap_group_from_mft_user_group_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'group_name' in local_var_params: + path_params['groupName'] = local_var_params['group_name'] # noqa: E501 + if 'ldap_group_name' in local_var_params: + path_params['ldapGroupName'] = local_var_params['ldap_group_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/usergroup/{groupName}/ldapGroup/{ldapGroupName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_mft_folder(self, folder_name, **kwargs): # noqa: E501 + """Delete a virtual folder. # noqa: E501 + + Delete an existing virtual folder in MFT. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_folder(folder_name, async_req=True) + >>> result = thread.get() + + :param folder_name: Name of folder (required) + :type folder_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_mft_folder_with_http_info(folder_name, **kwargs) # noqa: E501 + + def delete_mft_folder_with_http_info(self, folder_name, **kwargs): # noqa: E501 + """Delete a virtual folder. # noqa: E501 + + Delete an existing virtual folder in MFT. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_folder_with_http_info(folder_name, async_req=True) + >>> result = thread.get() + + :param folder_name: Name of folder (required) + :type folder_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'folder_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_mft_folder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `delete_mft_folder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/virtualfolder/{folderName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_mft_folder_for_site(self, site_name, folder_name, **kwargs): # noqa: E501 + """Delete a virtual folder for site. # noqa: E501 + + Delete an existing virtual folder in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_folder_for_site(site_name, folder_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_mft_folder_for_site_with_http_info(site_name, folder_name, **kwargs) # noqa: E501 + + def delete_mft_folder_for_site_with_http_info(self, site_name, folder_name, **kwargs): # noqa: E501 + """Delete a virtual folder for site. # noqa: E501 + + Delete an existing virtual folder in MFT for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_folder_for_site_with_http_info(site_name, folder_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'folder_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_mft_folder_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `delete_mft_folder_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/virtualfolder/{folderName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_mft_processing_rule_for_site(self, site_name, rule_name, **kwargs): # noqa: E501 + """Delete MFTE processing rule for site. # noqa: E501 + + Delete MFTE processing rule for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_processing_rule_for_site(site_name, rule_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_name: Name of rule (required) + :type rule_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_mft_processing_rule_for_site_with_http_info(site_name, rule_name, **kwargs) # noqa: E501 + + def delete_mft_processing_rule_for_site_with_http_info(self, site_name, rule_name, **kwargs): # noqa: E501 + """Delete MFTE processing rule for site. # noqa: E501 + + Delete MFTE processing rule for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_processing_rule_for_site_with_http_info(site_name, rule_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_name: Name of rule (required) + :type rule_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'rule_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_mft_processing_rule_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_mft_processing_rule_for_site`") # noqa: E501 + # verify the required parameter 'rule_name' is set + if self.api_client.client_side_validation and ('rule_name' not in local_var_params or # noqa: E501 + local_var_params['rule_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_name` when calling `delete_mft_processing_rule_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'rule_name' in local_var_params: + path_params['ruleName'] = local_var_params['rule_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/processingRule/{ruleName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_mft_user_group(self, name, **kwargs): # noqa: E501 + """Delete user group. # noqa: E501 + + Delete user group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_user_group(name, async_req=True) + >>> result = thread.get() + + :param name: User group name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_mft_user_group_with_http_info(name, **kwargs) # noqa: E501 + + def delete_mft_user_group_with_http_info(self, name, **kwargs): # noqa: E501 + """Delete user group. # noqa: E501 + + Delete user group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_user_group_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: User group name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_mft_user_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_mft_user_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/usergroup/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_mft_user_group_for_site(self, site_name, name, **kwargs): # noqa: E501 + """Delete user group for site. # noqa: E501 + + Delete user group for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_user_group_for_site(site_name, name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: User group name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_mft_user_group_for_site_with_http_info(site_name, name, **kwargs) # noqa: E501 + + def delete_mft_user_group_for_site_with_http_info(self, site_name, name, **kwargs): # noqa: E501 + """Delete user group for site. # noqa: E501 + + Delete user group for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_mft_user_group_for_site_with_http_info(site_name, name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: User group name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_mft_user_group_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `delete_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_mft_user_group_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/usergroup/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_pgp_template(self, server, agent, template_name, **kwargs): # noqa: E501 + """Delete PGP Template # noqa: E501 + + Delete PGP Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pgp_template(server, agent, template_name, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The PGP Template Name (required) + :type template_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_pgp_template_with_http_info(server, agent, template_name, **kwargs) # noqa: E501 + + def delete_pgp_template_with_http_info(self, server, agent, template_name, **kwargs): # noqa: E501 + """Delete PGP Template # noqa: E501 + + Delete PGP Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_pgp_template_with_http_info(server, agent, template_name, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The PGP Template Name (required) + :type template_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'template_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_pgp_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_pgp_template`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `delete_pgp_template`") # noqa: E501 + # verify the required parameter 'template_name' is set + if self.api_client.client_side_validation and ('template_name' not in local_var_params or # noqa: E501 + local_var_params['template_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_name` when calling `delete_pgp_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'template_name' in local_var_params: + path_params['templateName'] = local_var_params['template_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_remote_host(self, server, remotehost, **kwargs): # noqa: E501 + """delete a remote host from Server # noqa: E501 + + Delete a remote host from a Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_remote_host(server, remotehost, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is connected to. (required) + :type server: str + :param remotehost: The name of the remote host to delete. (required) + :type remotehost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_remote_host_with_http_info(server, remotehost, **kwargs) # noqa: E501 + + def delete_remote_host_with_http_info(self, server, remotehost, **kwargs): # noqa: E501 + """delete a remote host from Server # noqa: E501 + + Delete a remote host from a Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_remote_host_with_http_info(server, remotehost, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is connected to. (required) + :type server: str + :param remotehost: The name of the remote host to delete. (required) + :type remotehost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'remotehost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_remote_host" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_remote_host`") # noqa: E501 + # verify the required parameter 'remotehost' is set + if self.api_client.client_side_validation and ('remotehost' not in local_var_params or # noqa: E501 + local_var_params['remotehost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `remotehost` when calling `delete_remote_host`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'remotehost' in local_var_params: + path_params['remotehost'] = local_var_params['remotehost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/remotehost/{remotehost}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_role_from_ldap_group(self, ldapgroup, role, **kwargs): # noqa: E501 + """Delete a role from LDAP group # noqa: E501 + + Delete a role from LDAP group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_role_from_ldap_group(ldapgroup, role, async_req=True) + >>> result = thread.get() + + :param ldapgroup: Name of LDAP group (required) + :type ldapgroup: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_role_from_ldap_group_with_http_info(ldapgroup, role, **kwargs) # noqa: E501 + + def delete_role_from_ldap_group_with_http_info(self, ldapgroup, role, **kwargs): # noqa: E501 + """Delete a role from LDAP group # noqa: E501 + + Delete a role from LDAP group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_role_from_ldap_group_with_http_info(ldapgroup, role, async_req=True) + >>> result = thread.get() + + :param ldapgroup: Name of LDAP group (required) + :type ldapgroup: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ldapgroup', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_role_from_ldap_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ldapgroup' is set + if self.api_client.client_side_validation and ('ldapgroup' not in local_var_params or # noqa: E501 + local_var_params['ldapgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ldapgroup` when calling `delete_role_from_ldap_group`") # noqa: E501 + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `delete_role_from_ldap_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ldapgroup' in local_var_params: + path_params['ldapgroup'] = local_var_params['ldapgroup'] # noqa: E501 + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/ldap/{ldapgroup}/role/{role}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_run_as_user(self, server, agent, user, **kwargs): # noqa: E501 + """delete Run-as user # noqa: E501 + + Delete Run-as user from server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_run_as_user(server, agent, user, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_run_as_user_with_http_info(server, agent, user, **kwargs) # noqa: E501 + + def delete_run_as_user_with_http_info(self, server, agent, user, **kwargs): # noqa: E501 + """delete Run-as user # noqa: E501 + + Delete Run-as user from server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_run_as_user_with_http_info(server, agent, user, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_run_as_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_run_as_user`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `delete_run_as_user`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `delete_run_as_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/runasuser/{agent}/{user}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_secret(self, name, **kwargs): # noqa: E501 + """Delete an existing secret # noqa: E501 + + Delete an existing secret from the secrets vault. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_secret(name, async_req=True) + >>> result = thread.get() + + :param name: The name of the secret to update (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_secret_with_http_info(name, **kwargs) # noqa: E501 + + def delete_secret_with_http_info(self, name, **kwargs): # noqa: E501 + """Delete an existing secret # noqa: E501 + + Delete an existing secret from the secrets vault. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_secret_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: The name of the secret to update (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_secret" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_secret`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/secret/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_ssh_key(self, ctm, key_name, pass_phrase, **kwargs): # noqa: E501 + """delete an SSH key from the control-m server. # noqa: E501 + + delete an SSH key from the control-m server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ssh_key(ctm, key_name, pass_phrase, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param key_name: The name for the key . REQUIRED. (required) + :type key_name: str + :param pass_phrase: The password for the key file . REQUIRED. (required) + :type pass_phrase: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_ssh_key_with_http_info(ctm, key_name, pass_phrase, **kwargs) # noqa: E501 + + def delete_ssh_key_with_http_info(self, ctm, key_name, pass_phrase, **kwargs): # noqa: E501 + """delete an SSH key from the control-m server. # noqa: E501 + + delete an SSH key from the control-m server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ssh_key_with_http_info(ctm, key_name, pass_phrase, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param key_name: The name for the key . REQUIRED. (required) + :type key_name: str + :param pass_phrase: The password for the key file . REQUIRED. (required) + :type pass_phrase: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm', + 'key_name', + 'pass_phrase' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_ssh_key" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `delete_ssh_key`") # noqa: E501 + # verify the required parameter 'key_name' is set + if self.api_client.client_side_validation and ('key_name' not in local_var_params or # noqa: E501 + local_var_params['key_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `key_name` when calling `delete_ssh_key`") # noqa: E501 + # verify the required parameter 'pass_phrase' is set + if self.api_client.client_side_validation and ('pass_phrase' not in local_var_params or # noqa: E501 + local_var_params['pass_phrase'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `pass_phrase` when calling `delete_ssh_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 + if 'key_name' in local_var_params: + path_params['keyName'] = local_var_params['key_name'] # noqa: E501 + if 'pass_phrase' in local_var_params: + path_params['passPhrase'] = local_var_params['pass_phrase'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctm}/sshkey/{keyName}/{passPhrase}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_user(self, user, **kwargs): # noqa: E501 + """Delete user # noqa: E501 + + Delete user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user(user, async_req=True) + >>> result = thread.get() + + :param user: The user name. (required) + :type user: str + :param delete_user_tokens: Also delete tokens created by this user. + :type delete_user_tokens: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_user_with_http_info(user, **kwargs) # noqa: E501 + + def delete_user_with_http_info(self, user, **kwargs): # noqa: E501 + """Delete user # noqa: E501 + + Delete user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_user_with_http_info(user, async_req=True) + >>> result = thread.get() + + :param user: The user name. (required) + :type user: str + :param delete_user_tokens: Also delete tokens created by this user. + :type delete_user_tokens: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user', + 'delete_user_tokens' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `delete_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + if 'delete_user_tokens' in local_var_params and local_var_params['delete_user_tokens'] is not None: # noqa: E501 + query_params.append(('deleteUserTokens', local_var_params['delete_user_tokens'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/user/{user}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_zos_template(self, server, agent, template_name, **kwargs): # noqa: E501 + """Delete z/OS Template # noqa: E501 + + Delete z/OS Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_zos_template(server, agent, template_name, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The z/OS Template Name (required) + :type template_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_zos_template_with_http_info(server, agent, template_name, **kwargs) # noqa: E501 + + def delete_zos_template_with_http_info(self, server, agent, template_name, **kwargs): # noqa: E501 + """Delete z/OS Template # noqa: E501 + + Delete z/OS Template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_zos_template_with_http_info(server, agent, template_name, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The z/OS Template Name (required) + :type template_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'template_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_zos_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_zos_template`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `delete_zos_template`") # noqa: E501 + # verify the required parameter 'template_name' is set + if self.api_client.client_side_validation and ('template_name' not in local_var_params or # noqa: E501 + local_var_params['template_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_name` when calling `delete_zos_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'template_name' in local_var_params: + path_params['templateName'] = local_var_params['template_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/zostemplate/{templateName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def deploy_agent_certificate(self, server, agent, crt_file, ca_chain_file, **kwargs): # noqa: E501 + """Deploy certificate (CRT). # noqa: E501 + + Deploy certificate (CRT) on SSL configured Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_agent_certificate(server, agent, crt_file, ca_chain_file, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param crt_file: The CRT file path. (required) + :type crt_file: file + :param ca_chain_file: The CA Chain file path. (required) + :type ca_chain_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.deploy_agent_certificate_with_http_info(server, agent, crt_file, ca_chain_file, **kwargs) # noqa: E501 + + def deploy_agent_certificate_with_http_info(self, server, agent, crt_file, ca_chain_file, **kwargs): # noqa: E501 + """Deploy certificate (CRT). # noqa: E501 + + Deploy certificate (CRT) on SSL configured Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_agent_certificate_with_http_info(server, agent, crt_file, ca_chain_file, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param crt_file: The CRT file path. (required) + :type crt_file: file + :param ca_chain_file: The CA Chain file path. (required) + :type ca_chain_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'crt_file', + 'ca_chain_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method deploy_agent_certificate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `deploy_agent_certificate`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `deploy_agent_certificate`") # noqa: E501 + # verify the required parameter 'crt_file' is set + if self.api_client.client_side_validation and ('crt_file' not in local_var_params or # noqa: E501 + local_var_params['crt_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `crt_file` when calling `deploy_agent_certificate`") # noqa: E501 + # verify the required parameter 'ca_chain_file' is set + if self.api_client.client_side_validation and ('ca_chain_file' not in local_var_params or # noqa: E501 + local_var_params['ca_chain_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ca_chain_file` when calling `deploy_agent_certificate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'crt_file' in local_var_params: + local_var_files['crtFile'] = local_var_params['crt_file'] # noqa: E501 + if 'ca_chain_file' in local_var_params: + local_var_files['caChainFile'] = local_var_params['ca_chain_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/crt', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def disable_agent(self, server, agent, **kwargs): # noqa: E501 + """disable agent from the Server # noqa: E501 + + Disable an Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_agent(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected too. (required) + :type server: str + :param agent: The Agent to be disabled. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.disable_agent_with_http_info(server, agent, **kwargs) # noqa: E501 + + def disable_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """disable agent from the Server # noqa: E501 + + Disable an Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_agent_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected too. (required) + :type server: str + :param agent: The Agent to be disabled. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method disable_agent" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `disable_agent`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `disable_agent`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/disable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def disable_agentless_host(self, server, agentlesshost, **kwargs): # noqa: E501 + """disable agentless host from the Server # noqa: E501 + + disable an Agentless Host. This command does not install or configure the Agentless Host. It only disable existing Agentless Host in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_agentless_host(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected too. (required) + :type server: str + :param agentlesshost: The Agentless Host to be disabled. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.disable_agentless_host_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 + + def disable_agentless_host_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """disable agentless host from the Server # noqa: E501 + + disable an Agentless Host. This command does not install or configure the Agentless Host. It only disable existing Agentless Host in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_agentless_host_with_http_info(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected too. (required) + :type server: str + :param agentlesshost: The Agentless Host to be disabled. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agentlesshost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method disable_agentless_host" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `disable_agentless_host`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `disable_agentless_host`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agentlesshost/{agentlesshost}/disable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def disable_ctm_server(self, server, **kwargs): # noqa: E501 + """Set server to disabled state. # noqa: E501 + + Set server to disabled state. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_ctm_server(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.disable_ctm_server_with_http_info(server, **kwargs) # noqa: E501 + + def disable_ctm_server_with_http_info(self, server, **kwargs): # noqa: E501 + """Set server to disabled state. # noqa: E501 + + Set server to disabled state. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_ctm_server_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method disable_ctm_server" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `disable_ctm_server`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/disable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def disable_mft_processing_rule_for_site(self, site_name, rule_name, **kwargs): # noqa: E501 + """Disable MFTE processing rule for site # noqa: E501 + + Disable MFTE processing rule for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_mft_processing_rule_for_site(site_name, rule_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_name: Name of rule (required) + :type rule_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.disable_mft_processing_rule_for_site_with_http_info(site_name, rule_name, **kwargs) # noqa: E501 + + def disable_mft_processing_rule_for_site_with_http_info(self, site_name, rule_name, **kwargs): # noqa: E501 + """Disable MFTE processing rule for site # noqa: E501 + + Disable MFTE processing rule for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.disable_mft_processing_rule_for_site_with_http_info(site_name, rule_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_name: Name of rule (required) + :type rule_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'rule_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method disable_mft_processing_rule_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `disable_mft_processing_rule_for_site`") # noqa: E501 + # verify the required parameter 'rule_name' is set + if self.api_client.client_side_validation and ('rule_name' not in local_var_params or # noqa: E501 + local_var_params['rule_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_name` when calling `disable_mft_processing_rule_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'rule_name' in local_var_params: + path_params['ruleName'] = local_var_params['rule_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/processingRule/{ruleName}/disable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def em_db_check_space(self, **kwargs): # noqa: E501 + """Check available space of EM DB # noqa: E501 + + Check available space of EM DB # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.em_db_check_space(async_req=True) + >>> result = thread.get() + + :param body: + :type body: SysAdminInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[DeviceSpace] + """ + kwargs['_return_http_data_only'] = True + return self.em_db_check_space_with_http_info(**kwargs) # noqa: E501 + + def em_db_check_space_with_http_info(self, **kwargs): # noqa: E501 + """Check available space of EM DB # noqa: E501 + + Check available space of EM DB # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.em_db_check_space_with_http_info(async_req=True) + >>> result = thread.get() + + :param body: + :type body: SysAdminInfo + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[DeviceSpace], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method em_db_check_space" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[DeviceSpace]", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/em/db/space', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def em_db_get_details(self, **kwargs): # noqa: E501 + """Get EM DB Details # noqa: E501 + + Get EM DB Details # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.em_db_get_details(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: DatabaseDef + """ + kwargs['_return_http_data_only'] = True + return self.em_db_get_details_with_http_info(**kwargs) # noqa: E501 + + def em_db_get_details_with_http_info(self, **kwargs): # noqa: E501 + """Get EM DB Details # noqa: E501 + + Get EM DB Details # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.em_db_get_details_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DatabaseDef, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method em_db_get_details" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "DatabaseDef", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/em/db/details', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def enable_agent(self, server, agent, **kwargs): # noqa: E501 + """enable agent from the Server # noqa: E501 + + Enable an Agent. This command does not install or configure the agent. It only enable existing agent in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_agent(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected too. (required) + :type server: str + :param agent: The Agent to be enabled. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.enable_agent_with_http_info(server, agent, **kwargs) # noqa: E501 + + def enable_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """enable agent from the Server # noqa: E501 + + Enable an Agent. This command does not install or configure the agent. It only enable existing agent in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_agent_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected too. (required) + :type server: str + :param agent: The Agent to be enabled. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method enable_agent" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `enable_agent`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `enable_agent`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/enable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def enable_agentless_host(self, server, agentlesshost, **kwargs): # noqa: E501 + """enable agentless host from the Server # noqa: E501 + + Enable an Agentless Host. This command does not install or configure the Agentless Host. It only enable existing Agentless Host in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_agentless_host(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected too. (required) + :type server: str + :param agentlesshost: The Agentless Host to be enabled. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.enable_agentless_host_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 + + def enable_agentless_host_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """enable agentless host from the Server # noqa: E501 + + Enable an Agentless Host. This command does not install or configure the Agentless Host. It only enable existing Agentless Host in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_agentless_host_with_http_info(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected too. (required) + :type server: str + :param agentlesshost: The Agentless Host to be enabled. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agentlesshost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method enable_agentless_host" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `enable_agentless_host`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `enable_agentless_host`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agentlesshost/{agentlesshost}/enable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def enable_ctm_server(self, server, **kwargs): # noqa: E501 + """Set server to enabled state. # noqa: E501 + + Set server to enabled state. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_ctm_server(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.enable_ctm_server_with_http_info(server, **kwargs) # noqa: E501 + + def enable_ctm_server_with_http_info(self, server, **kwargs): # noqa: E501 + """Set server to enabled state. # noqa: E501 + + Set server to enabled state. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_ctm_server_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method enable_ctm_server" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `enable_ctm_server`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/enable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def enable_mft_processing_rule_for_site(self, site_name, rule_name, **kwargs): # noqa: E501 + """Enable MFTE processing rule for site # noqa: E501 + + Enable MFTE processing rule for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_mft_processing_rule_for_site(site_name, rule_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_name: Name of rule (required) + :type rule_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.enable_mft_processing_rule_for_site_with_http_info(site_name, rule_name, **kwargs) # noqa: E501 + + def enable_mft_processing_rule_for_site_with_http_info(self, site_name, rule_name, **kwargs): # noqa: E501 + """Enable MFTE processing rule for site # noqa: E501 + + Enable MFTE processing rule for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.enable_mft_processing_rule_for_site_with_http_info(site_name, rule_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param rule_name: Name of rule (required) + :type rule_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'rule_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method enable_mft_processing_rule_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `enable_mft_processing_rule_for_site`") # noqa: E501 + # verify the required parameter 'rule_name' is set + if self.api_client.client_side_validation and ('rule_name' not in local_var_params or # noqa: E501 + local_var_params['rule_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_name` when calling `enable_mft_processing_rule_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'rule_name' in local_var_params: + path_params['ruleName'] = local_var_params['rule_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/processingRule/{ruleName}/enable', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def failover(self, server, **kwargs): # noqa: E501 + """Perform Control-M/Server failover to the secondary Control-M/Server server. # noqa: E501 + + Perform Control-M/Server failover to the secondary Control-M/Server server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.failover(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param _async: Whether the call performs asynchronously, either true or false. The default is false (call performs synchronously). + :type _async: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.failover_with_http_info(server, **kwargs) # noqa: E501 + + def failover_with_http_info(self, server, **kwargs): # noqa: E501 + """Perform Control-M/Server failover to the secondary Control-M/Server server. # noqa: E501 + + Perform Control-M/Server failover to the secondary Control-M/Server server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.failover_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param _async: Whether the call performs asynchronously, either true or false. The default is false (call performs synchronously). + :type _async: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + '_async' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method failover" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `failover`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + if '_async' in local_var_params and local_var_params['_async'] is not None: # noqa: E501 + query_params.append(('async', local_var_params['_async'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/failover', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def fallback(self, server, **kwargs): # noqa: E501 + """Perform Control-M/Server fallback to the primary Control-M/Server server. # noqa: E501 + + Perform Control-M/Server fallback to the primary Control-M/Server server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fallback(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.fallback_with_http_info(server, **kwargs) # noqa: E501 + + def fallback_with_http_info(self, server, **kwargs): # noqa: E501 + """Perform Control-M/Server fallback to the primary Control-M/Server server. # noqa: E501 + + Perform Control-M/Server fallback to the primary Control-M/Server server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.fallback_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method fallback" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `fallback`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/fallback', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def generate_mft_rsa_ssh_key(self, server, agent, ssh_key_properties, **kwargs): # noqa: E501 + """Generate RSA SSH Key # noqa: E501 + + Generate RSA SSH Key pair for SFTP account authentication # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.generate_mft_rsa_ssh_key(server, agent, ssh_key_properties, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param ssh_key_properties: Ssh Key pair properites (required) + :type ssh_key_properties: SshKeyProperties + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.generate_mft_rsa_ssh_key_with_http_info(server, agent, ssh_key_properties, **kwargs) # noqa: E501 + + def generate_mft_rsa_ssh_key_with_http_info(self, server, agent, ssh_key_properties, **kwargs): # noqa: E501 + """Generate RSA SSH Key # noqa: E501 + + Generate RSA SSH Key pair for SFTP account authentication # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.generate_mft_rsa_ssh_key_with_http_info(server, agent, ssh_key_properties, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param ssh_key_properties: Ssh Key pair properites (required) + :type ssh_key_properties: SshKeyProperties + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'ssh_key_properties' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_mft_rsa_ssh_key" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `generate_mft_rsa_ssh_key`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `generate_mft_rsa_ssh_key`") # noqa: E501 + # verify the required parameter 'ssh_key_properties' is set + if self.api_client.client_side_validation and ('ssh_key_properties' not in local_var_params or # noqa: E501 + local_var_params['ssh_key_properties'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ssh_key_properties` when calling `generate_mft_rsa_ssh_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'ssh_key_properties' in local_var_params: + body_params = local_var_params['ssh_key_properties'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/ssh/key', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_agent_certificate_expiration_date(self, server, agent, **kwargs): # noqa: E501 + """Get certificate expiration date. # noqa: E501 + + Get the certificate expiration date of SSL configured Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agent_certificate_expiration_date(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AgentCertificateExpirationData + """ + kwargs['_return_http_data_only'] = True + return self.get_agent_certificate_expiration_date_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_agent_certificate_expiration_date_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get certificate expiration date. # noqa: E501 + + Get the certificate expiration date of SSL configured Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agent_certificate_expiration_date_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AgentCertificateExpirationData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_agent_certificate_expiration_date" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_agent_certificate_expiration_date`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_agent_certificate_expiration_date`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AgentCertificateExpirationData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/crt/expiration', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_agent_parameters(self, server, agent, **kwargs): # noqa: E501 + """get agent parameters # noqa: E501 + + Get all the parameters of the specified Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agent_parameters(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to query. (required) + :type agent: str + :param extended_data: True to return more agent parameters. HIDDEN + :type extended_data: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[KeyValue] + """ + kwargs['_return_http_data_only'] = True + return self.get_agent_parameters_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_agent_parameters_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """get agent parameters # noqa: E501 + + Get all the parameters of the specified Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agent_parameters_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to query. (required) + :type agent: str + :param extended_data: True to return more agent parameters. HIDDEN + :type extended_data: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[KeyValue], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'extended_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_agent_parameters" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_agent_parameters`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_agent_parameters`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + if 'extended_data' in local_var_params and local_var_params['extended_data'] is not None: # noqa: E501 + query_params.append(('extendedData', local_var_params['extended_data'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[KeyValue]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/params', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_agentless_host_properties(self, server, agentlesshost, **kwargs): # noqa: E501 + """get an agentless host configuration from Server # noqa: E501 + + Get the agentless host configuration properties from the Server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agentless_host_properties(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The name of the agentless host. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AddRemoteHostParams + """ + kwargs['_return_http_data_only'] = True + return self.get_agentless_host_properties_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 + + def get_agentless_host_properties_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """get an agentless host configuration from Server # noqa: E501 + + Get the agentless host configuration properties from the Server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agentless_host_properties_with_http_info(server, agentlesshost, async_req=True) + >>> result = thread.get() + + :param server: The Server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The name of the agentless host. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AddRemoteHostParams, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agentlesshost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_agentless_host_properties" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_agentless_host_properties`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `get_agentless_host_properties`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AddRemoteHostParams", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agentlesshost/{agentlesshost}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_agentless_hosts(self, server, **kwargs): # noqa: E501 + """get Server agentless hosts # noqa: E501 + + Get all the agentless hosts of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agentless_hosts(server, async_req=True) + >>> result = thread.get() + + :param server: The Server to query. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_agentless_hosts_with_http_info(server, **kwargs) # noqa: E501 + + def get_agentless_hosts_with_http_info(self, server, **kwargs): # noqa: E501 + """get Server agentless hosts # noqa: E501 + + Get all the agentless hosts of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agentless_hosts_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: The Server to query. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_agentless_hosts" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_agentless_hosts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agentlesshosts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_agents(self, server, **kwargs): # noqa: E501 + """get Server agents # noqa: E501 + + Get all the agents of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agents(server, async_req=True) + >>> result = thread.get() + + :param server: The Server to query. Optionally you can filter agent name of host or alias of the Agent (required) + :type server: str + :param agent: Optionally case insensitive agent name filter of host or alias of the Agent. `ctm server:agents::get Server AgentName` returns all agents which names start with `agentname` + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AgentDetailsList + """ + kwargs['_return_http_data_only'] = True + return self.get_agents_with_http_info(server, **kwargs) # noqa: E501 + + def get_agents_with_http_info(self, server, **kwargs): # noqa: E501 + """get Server agents # noqa: E501 + + Get all the agents of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agents_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: The Server to query. Optionally you can filter agent name of host or alias of the Agent (required) + :type server: str + :param agent: Optionally case insensitive agent name filter of host or alias of the Agent. `ctm server:agents::get Server AgentName` returns all agents which names start with `agentname` + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AgentDetailsList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_agents" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_agents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AgentDetailsList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_agents_log(self, **kwargs): # noqa: E501 + """Retrieve Configuration Agents Log # noqa: E501 + + Retrieves the logs of configuration Agents, providing detailed information useful for diagnostics and auditing purposes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agents_log(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[AgentLogEntry] + """ + kwargs['_return_http_data_only'] = True + return self.get_agents_log_with_http_info(**kwargs) # noqa: E501 + + def get_agents_log_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve Configuration Agents Log # noqa: E501 + + Retrieves the logs of configuration Agents, providing detailed information useful for diagnostics and auditing purposes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_agents_log_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[AgentLogEntry], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_agents_log" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[AgentLogEntry]", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/em/agentsLog', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_archive_rules(self, **kwargs): # noqa: E501 + """Get all Workload Archiving rules # noqa: E501 + + Get all the Archiving rules # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_archive_rules(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ArchiveRulesList + """ + kwargs['_return_http_data_only'] = True + return self.get_all_archive_rules_with_http_info(**kwargs) # noqa: E501 + + def get_all_archive_rules_with_http_info(self, **kwargs): # noqa: E501 + """Get all Workload Archiving rules # noqa: E501 + + Get all the Archiving rules # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_archive_rules_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ArchiveRulesList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_archive_rules" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ArchiveRulesList", + 401: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } + + return self.api_client.call_api( + '/config/archive/rules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_authorization_roles(self, **kwargs): # noqa: E501 + """Get Authorization Roles # noqa: E501 + + Get Authorization Roles # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_authorization_roles(async_req=True) + >>> result = thread.get() + + :param role: The Role name. + :type role: str + :param description: The Role description. + :type description: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[RoleHeader] + """ + kwargs['_return_http_data_only'] = True + return self.get_all_authorization_roles_with_http_info(**kwargs) # noqa: E501 + + def get_all_authorization_roles_with_http_info(self, **kwargs): # noqa: E501 + """Get Authorization Roles # noqa: E501 + + Get Authorization Roles # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_authorization_roles_with_http_info(async_req=True) + >>> result = thread.get() + + :param role: The Role name. + :type role: str + :param description: The Role description. + :type description: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[RoleHeader], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'role', + 'description' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_authorization_roles" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 + query_params.append(('role', local_var_params['role'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[RoleHeader]", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/roles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_organization_groups(self, **kwargs): # noqa: E501 + """Get All organization groups # noqa: E501 + + Get All organization groups # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_organization_groups(async_req=True) + >>> result = thread.get() + + :param organizationgroup: The organization group name. + :type organizationgroup: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_all_organization_groups_with_http_info(**kwargs) # noqa: E501 + + def get_all_organization_groups_with_http_info(self, **kwargs): # noqa: E501 + """Get All organization groups # noqa: E501 + + Get All organization groups # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_organization_groups_with_http_info(async_req=True) + >>> result = thread.get() + + :param organizationgroup: The organization group name. + :type organizationgroup: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'organizationgroup' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_organization_groups" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'organizationgroup' in local_var_params and local_var_params['organizationgroup'] is not None: # noqa: E501 + query_params.append(('organizationgroup', local_var_params['organizationgroup'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/organizationgroups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_organization_users(self, **kwargs): # noqa: E501 + """Get All organization users # noqa: E501 + + Get All organization users # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_organization_users(async_req=True) + >>> result = thread.get() + + :param organization_user: The user name. + :type organization_user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_all_organization_users_with_http_info(**kwargs) # noqa: E501 + + def get_all_organization_users_with_http_info(self, **kwargs): # noqa: E501 + """Get All organization users # noqa: E501 + + Get All organization users # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_organization_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param organization_user: The user name. + :type organization_user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'organization_user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_organization_users" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'organization_user' in local_var_params and local_var_params['organization_user'] is not None: # noqa: E501 + query_params.append(('organizationUser', local_var_params['organization_user'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/organizationusers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_roles_associated_with_organization_group(self, organizationgroup, **kwargs): # noqa: E501 + """Get Authorization Roles associated with an organization group # noqa: E501 + + Get Authorization Roles associated with an organization group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_roles_associated_with_organization_group(organizationgroup, async_req=True) + >>> result = thread.get() + + :param organizationgroup: Name of organization group (required) + :type organizationgroup: str + :param role: The Role name. + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_all_roles_associated_with_organization_group_with_http_info(organizationgroup, **kwargs) # noqa: E501 + + def get_all_roles_associated_with_organization_group_with_http_info(self, organizationgroup, **kwargs): # noqa: E501 + """Get Authorization Roles associated with an organization group # noqa: E501 + + Get Authorization Roles associated with an organization group # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_roles_associated_with_organization_group_with_http_info(organizationgroup, async_req=True) + >>> result = thread.get() + + :param organizationgroup: Name of organization group (required) + :type organizationgroup: str + :param role: The Role name. + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'organizationgroup', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_roles_associated_with_organization_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'organizationgroup' is set + if self.api_client.client_side_validation and ('organizationgroup' not in local_var_params or # noqa: E501 + local_var_params['organizationgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `organizationgroup` when calling `get_all_roles_associated_with_organization_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'organizationgroup' in local_var_params: + path_params['organizationgroup'] = local_var_params['organizationgroup'] # noqa: E501 + + query_params = [] + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 + query_params.append(('role', local_var_params['role'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/organizationgroup/{organizationgroup}/roles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_roles_associated_with_organization_user(self, user, **kwargs): # noqa: E501 + """Get Authorization Roles associated with an Organization user # noqa: E501 + + Get Authorization Roles associated with an Organization user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_roles_associated_with_organization_user(user, async_req=True) + >>> result = thread.get() + + :param user: Name of organization user (required) + :type user: str + :param role: The Role name. + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_all_roles_associated_with_organization_user_with_http_info(user, **kwargs) # noqa: E501 + + def get_all_roles_associated_with_organization_user_with_http_info(self, user, **kwargs): # noqa: E501 + """Get Authorization Roles associated with an Organization user # noqa: E501 + + Get Authorization Roles associated with an Organization user # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_roles_associated_with_organization_user_with_http_info(user, async_req=True) + >>> result = thread.get() + + :param user: Name of organization user (required) + :type user: str + :param role: The Role name. + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_roles_associated_with_organization_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_all_roles_associated_with_organization_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + if 'role' in local_var_params and local_var_params['role'] is not None: # noqa: E501 + query_params.append(('role', local_var_params['role'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/organizationuser/{user}/roles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_all_users(self, **kwargs): # noqa: E501 + """Get users # noqa: E501 + + Get users # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_users(async_req=True) + >>> result = thread.get() + + :param name: The user name. + :type name: str + :param full_name: The user full name. + :type full_name: str + :param description: The user description. + :type description: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[UserHeader] + """ + kwargs['_return_http_data_only'] = True + return self.get_all_users_with_http_info(**kwargs) # noqa: E501 + + def get_all_users_with_http_info(self, **kwargs): # noqa: E501 + """Get users # noqa: E501 + + Get users # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_all_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param name: The user name. + :type name: str + :param full_name: The user full name. + :type full_name: str + :param description: The user description. + :type description: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[UserHeader], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'full_name', + 'description' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_users" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'full_name' in local_var_params and local_var_params['full_name'] is not None: # noqa: E501 + query_params.append(('fullName', local_var_params['full_name'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[UserHeader]", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_archive_statistics(self, **kwargs): # noqa: E501 + """Get Workload Archiving statistics # noqa: E501 + + Get list of statistical information for each Archiving rule and total information about the number of jobs that have been archived, data size of all job logs and outputs that have been archived, size of the Workload Archiving database including all tables and indexes and percentage of disk space used on the Workload Archiving server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_archive_statistics(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: RulesStatisticListSummary + """ + kwargs['_return_http_data_only'] = True + return self.get_archive_statistics_with_http_info(**kwargs) # noqa: E501 + + def get_archive_statistics_with_http_info(self, **kwargs): # noqa: E501 + """Get Workload Archiving statistics # noqa: E501 + + Get list of statistical information for each Archiving rule and total information about the number of jobs that have been archived, data size of all job logs and outputs that have been archived, size of the Workload Archiving database including all tables and indexes and percentage of disk space used on the Workload Archiving server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_archive_statistics_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RulesStatisticListSummary, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_archive_statistics" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RulesStatisticListSummary", + 401: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } + + return self.api_client.call_api( + '/config/archive/statistics', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_communication_analysis_report_for_agent(self, server, agent, **kwargs): # noqa: E501 + """analyze communication between an Agent and its Server # noqa: E501 + + Analyze communication between specific Control-M Server and Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_communication_analysis_report_for_agent(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server to which the Agent is connected. (required) + :type server: str + :param agent: The Agent to analyze communication with. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CommunicationAnalysisResponseType + """ + kwargs['_return_http_data_only'] = True + return self.get_communication_analysis_report_for_agent_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_communication_analysis_report_for_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """analyze communication between an Agent and its Server # noqa: E501 + + Analyze communication between specific Control-M Server and Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_communication_analysis_report_for_agent_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server to which the Agent is connected. (required) + :type server: str + :param agent: The Agent to analyze communication with. (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CommunicationAnalysisResponseType, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_communication_analysis_report_for_agent" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_communication_analysis_report_for_agent`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_communication_analysis_report_for_agent`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CommunicationAnalysisResponseType", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/analysis', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_ctm_gate_ways(self, name, **kwargs): # noqa: E501 + """Get details of specific gateway component in the system. # noqa: E501 + + Get details of specific gateway component in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_gate_ways(name, async_req=True) + >>> result = thread.get() + + :param name: Server logical name (required) + :type name: str + :param host: Server host. + :type host: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[GatewayDetails] + """ + kwargs['_return_http_data_only'] = True + return self.get_ctm_gate_ways_with_http_info(name, **kwargs) # noqa: E501 + + def get_ctm_gate_ways_with_http_info(self, name, **kwargs): # noqa: E501 + """Get details of specific gateway component in the system. # noqa: E501 + + Get details of specific gateway component in the system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_gate_ways_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: Server logical name (required) + :type name: str + :param host: Server host. + :type host: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[GatewayDetails], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'host' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ctm_gate_ways" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_ctm_gate_ways`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if 'host' in local_var_params and local_var_params['host'] is not None: # noqa: E501 + query_params.append(('host', local_var_params['host'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[GatewayDetails]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{name}/gateways', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_ctm_high_availability_status(self, server, **kwargs): # noqa: E501 + """Get Control-M/Server High Availability status # noqa: E501 + + Get Control-M/Server High Availability status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_high_availability_status(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: HighAvailabilityStatus + """ + kwargs['_return_http_data_only'] = True + return self.get_ctm_high_availability_status_with_http_info(server, **kwargs) # noqa: E501 + + def get_ctm_high_availability_status_with_http_info(self, server, **kwargs): # noqa: E501 + """Get Control-M/Server High Availability status # noqa: E501 + + Get Control-M/Server High Availability status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_high_availability_status_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HighAvailabilityStatus, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ctm_high_availability_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_ctm_high_availability_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "HighAvailabilityStatus", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/highavailabilitystatus', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_ctm_security_attributes(self, ctm_name, entity_name, **kwargs): # noqa: E501 + """Get Security Attributes by User Or Group name # noqa: E501 + + Get Security Attributes by User Or Group name # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_security_attributes(ctm_name, entity_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param entity_name: (required) + :type entity_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CtmSecSecurityAttributes + """ + kwargs['_return_http_data_only'] = True + return self.get_ctm_security_attributes_with_http_info(ctm_name, entity_name, **kwargs) # noqa: E501 + + def get_ctm_security_attributes_with_http_info(self, ctm_name, entity_name, **kwargs): # noqa: E501 + """Get Security Attributes by User Or Group name # noqa: E501 + + Get Security Attributes by User Or Group name # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_security_attributes_with_http_info(ctm_name, entity_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param entity_name: (required) + :type entity_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CtmSecSecurityAttributes, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'entity_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ctm_security_attributes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `get_ctm_security_attributes`") # noqa: E501 + # verify the required parameter 'entity_name' is set + if self.api_client.client_side_validation and ('entity_name' not in local_var_params or # noqa: E501 + local_var_params['entity_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `entity_name` when calling `get_ctm_security_attributes`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + if 'entity_name' in local_var_params: + path_params['entityName'] = local_var_params['entity_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtmSecSecurityAttributes", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctmName}/security/attributes/{entityName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_ctm_security_entities(self, ctm_name, **kwargs): # noqa: E501 + """Get All Security Users and Groups (Entities) # noqa: E501 + + Get All Security Users and Groups (Entities) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_security_entities(ctm_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CtmSecSecurityEntities + """ + kwargs['_return_http_data_only'] = True + return self.get_ctm_security_entities_with_http_info(ctm_name, **kwargs) # noqa: E501 + + def get_ctm_security_entities_with_http_info(self, ctm_name, **kwargs): # noqa: E501 + """Get All Security Users and Groups (Entities) # noqa: E501 + + Get All Security Users and Groups (Entities) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_security_entities_with_http_info(ctm_name, async_req=True) + >>> result = thread.get() + + :param ctm_name: (required) + :type ctm_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CtmSecSecurityEntities, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ctm_security_entities" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `get_ctm_security_entities`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtmSecSecurityEntities", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctmName}/security/entities', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_data_assurance_configuration(self, server, agent, **kwargs): # noqa: E501 + """Get DataAssurance configuration. # noqa: E501 + + set DataAssurance configuration. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_data_assurance_configuration(server, agent, async_req=True) + >>> result = thread.get() + + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: DataAssuranceConfigrationData + """ + kwargs['_return_http_data_only'] = True + return self.get_data_assurance_configuration_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_data_assurance_configuration_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get DataAssurance configuration. # noqa: E501 + + set DataAssurance configuration. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_data_assurance_configuration_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DataAssuranceConfigrationData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_assurance_configuration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_data_assurance_configuration`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_data_assurance_configuration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "DataAssuranceConfigrationData", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/dataAssurance/configuration', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_em_component(self, host, type, name, **kwargs): # noqa: E501 + """Get details for a specific EM component # noqa: E501 + + Get the configuration details of a specific EM component # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_em_component(host, type, name, async_req=True) + >>> result = thread.get() + + :param host: The hostname of the server where the EM component is running. (required) + :type host: str + :param type: The type of the EM component (required) + :type type: str + :param name: The logical name of the EM component. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: EmComponentDef + """ + kwargs['_return_http_data_only'] = True + return self.get_em_component_with_http_info(host, type, name, **kwargs) # noqa: E501 + + def get_em_component_with_http_info(self, host, type, name, **kwargs): # noqa: E501 + """Get details for a specific EM component # noqa: E501 + + Get the configuration details of a specific EM component # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_em_component_with_http_info(host, type, name, async_req=True) + >>> result = thread.get() + + :param host: The hostname of the server where the EM component is running. (required) + :type host: str + :param type: The type of the EM component (required) + :type type: str + :param name: The logical name of the EM component. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(EmComponentDef, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'host', + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_em_component" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'host' is set + if self.api_client.client_side_validation and ('host' not in local_var_params or # noqa: E501 + local_var_params['host'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `host` when calling `get_em_component`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `get_em_component`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_em_component`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'host' in local_var_params: + path_params['host'] = local_var_params['host'] # noqa: E501 + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "EmComponentDef", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/em/component/{host}/{type}/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_em_high_availability_status(self, **kwargs): # noqa: E501 + """Get EM High Availability status # noqa: E501 + + Get EM High Availability status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_em_high_availability_status(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: HighAvailabilityStatus + """ + kwargs['_return_http_data_only'] = True + return self.get_em_high_availability_status_with_http_info(**kwargs) # noqa: E501 + + def get_em_high_availability_status_with_http_info(self, **kwargs): # noqa: E501 + """Get EM High Availability status # noqa: E501 + + Get EM High Availability status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_em_high_availability_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HighAvailabilityStatus, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_em_high_availability_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "HighAvailabilityStatus", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/em/highavailabilitystatus', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_external_user_authorized_folders(self, name, **kwargs): # noqa: E501 + """Get MFT external user authorized folders # noqa: E501 + + Get MFT external user authorized folders # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_user_authorized_folders(name, async_req=True) + >>> result = thread.get() + + :param name: The external user name. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_external_user_authorized_folders_with_http_info(name, **kwargs) # noqa: E501 + + def get_external_user_authorized_folders_with_http_info(self, name, **kwargs): # noqa: E501 + """Get MFT external user authorized folders # noqa: E501 + + Get MFT external user authorized folders # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_user_authorized_folders_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: The external user name. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_external_user_authorized_folders" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_external_user_authorized_folders`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/externaluser/{name}/virtualfolders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_external_user_authorized_folders_for_site(self, site_name, name, **kwargs): # noqa: E501 + """Get MFT external user authorized folders for site # noqa: E501 + + Get MFT external user authorized folders for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_user_authorized_folders_for_site(site_name, name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: The external user name. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_external_user_authorized_folders_for_site_with_http_info(site_name, name, **kwargs) # noqa: E501 + + def get_external_user_authorized_folders_for_site_with_http_info(self, site_name, name, **kwargs): # noqa: E501 + """Get MFT external user authorized folders for site # noqa: E501 + + Get MFT external user authorized folders for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_user_authorized_folders_for_site_with_http_info(site_name, name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: The external user name. (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_external_user_authorized_folders_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_external_user_authorized_folders_for_site`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_external_user_authorized_folders_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/externaluser/{name}/virtualfolders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_external_users(self, **kwargs): # noqa: E501 + """Get MFT external users that match the search criteria. # noqa: E501 + + Get MFT external users that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_users(async_req=True) + >>> result = thread.get() + + :param name: The user name. + :type name: str + :param email: The user email. + :type email: str + :param description: The user description. + :type description: str + :param company: The user company. + :type company: str + :param phone_number: The user phoneNumber. + :type phone_number: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[ExternalUserData] + """ + kwargs['_return_http_data_only'] = True + return self.get_external_users_with_http_info(**kwargs) # noqa: E501 + + def get_external_users_with_http_info(self, **kwargs): # noqa: E501 + """Get MFT external users that match the search criteria. # noqa: E501 + + Get MFT external users that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param name: The user name. + :type name: str + :param email: The user email. + :type email: str + :param description: The user description. + :type description: str + :param company: The user company. + :type company: str + :param phone_number: The user phoneNumber. + :type phone_number: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[ExternalUserData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'email', + 'description', + 'company', + 'phone_number' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_external_users" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'email' in local_var_params and local_var_params['email'] is not None: # noqa: E501 + query_params.append(('email', local_var_params['email'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'company' in local_var_params and local_var_params['company'] is not None: # noqa: E501 + query_params.append(('company', local_var_params['company'])) # noqa: E501 + if 'phone_number' in local_var_params and local_var_params['phone_number'] is not None: # noqa: E501 + query_params.append(('phoneNumber', local_var_params['phone_number'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[ExternalUserData]", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/externalusers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_external_users_for_site(self, site_name, **kwargs): # noqa: E501 + """Get MFT external users for site that match the search criteria. # noqa: E501 + + Get MFT external users for site that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_users_for_site(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param name: The user name. + :type name: str + :param email: The user email. + :type email: str + :param description: The user description. + :type description: str + :param company: The user company. + :type company: str + :param phone_number: The user phoneNumber. + :type phone_number: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[ExternalUserData] + """ + kwargs['_return_http_data_only'] = True + return self.get_external_users_for_site_with_http_info(site_name, **kwargs) # noqa: E501 + + def get_external_users_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Get MFT external users for site that match the search criteria. # noqa: E501 + + Get MFT external users for site that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_external_users_for_site_with_http_info(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param name: The user name. + :type name: str + :param email: The user email. + :type email: str + :param description: The user description. + :type description: str + :param company: The user company. + :type company: str + :param phone_number: The user phoneNumber. + :type phone_number: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[ExternalUserData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'name', + 'email', + 'description', + 'company', + 'phone_number' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_external_users_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_external_users_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'email' in local_var_params and local_var_params['email'] is not None: # noqa: E501 + query_params.append(('email', local_var_params['email'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'company' in local_var_params and local_var_params['company'] is not None: # noqa: E501 + query_params.append(('company', local_var_params['company'])) # noqa: E501 + if 'phone_number' in local_var_params and local_var_params['phone_number'] is not None: # noqa: E501 + query_params.append(('phoneNumber', local_var_params['phone_number'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[ExternalUserData]", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/externalusers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_fts_settings(self, server, agent, **kwargs): # noqa: E501 + """Get File Transfer Server (FTS) configuration data. # noqa: E501 + + Get File Transfer Server (FTS) configuration data. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_fts_settings(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: FtsSettingsData + """ + kwargs['_return_http_data_only'] = True + return self.get_fts_settings_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_fts_settings_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get File Transfer Server (FTS) configuration data. # noqa: E501 + + Get File Transfer Server (FTS) configuration data. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_fts_settings_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(FtsSettingsData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_fts_settings" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_fts_settings`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_fts_settings`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "FtsSettingsData", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/fts/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_host_restriction_list(self, ctm, **kwargs): # noqa: E501 + """Get all host restrictions. # noqa: E501 + + Get all host restrictions of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_host_restriction_list(ctm, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[HostRestriction] + """ + kwargs['_return_http_data_only'] = True + return self.get_host_restriction_list_with_http_info(ctm, **kwargs) # noqa: E501 + + def get_host_restriction_list_with_http_info(self, ctm, **kwargs): # noqa: E501 + """Get all host restrictions. # noqa: E501 + + Get all host restrictions of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_host_restriction_list_with_http_info(ctm, async_req=True) + >>> result = thread.get() + + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[HostRestriction], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_host_restriction_list" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `get_host_restriction_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[HostRestriction]", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{ctm}/hostRestrictions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_hostgroups(self, server, **kwargs): # noqa: E501 + """get Server hostgroups # noqa: E501 + + Get all the hostgroups of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hostgroups(server, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroups belong to. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_hostgroups_with_http_info(server, **kwargs) # noqa: E501 + + def get_hostgroups_with_http_info(self, server, **kwargs): # noqa: E501 + """get Server hostgroups # noqa: E501 + + Get all the hostgroups of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hostgroups_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroups belong to. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_hostgroups" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_hostgroups`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/hostgroups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_hostgroups_and_agents_with_tag(self, server, **kwargs): # noqa: E501 + """get Server host groups with their agents # noqa: E501 + + Get all the host groups with their agents of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hostgroups_and_agents_with_tag(server, async_req=True) + >>> result = thread.get() + + :param server: The Server the host groups belong to. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[HostGroupData] + """ + kwargs['_return_http_data_only'] = True + return self.get_hostgroups_and_agents_with_tag_with_http_info(server, **kwargs) # noqa: E501 + + def get_hostgroups_and_agents_with_tag_with_http_info(self, server, **kwargs): # noqa: E501 + """get Server host groups with their agents # noqa: E501 + + Get all the host groups with their agents of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hostgroups_and_agents_with_tag_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: The Server the host groups belong to. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[HostGroupData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_hostgroups_and_agents_with_tag" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_hostgroups_and_agents_with_tag`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[HostGroupData]", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/hostgroups/agents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_hosts_in_group(self, server, hostgroup, **kwargs): # noqa: E501 + """get hostgroup agents # noqa: E501 + + Get the agents that compose the specified hostgroup # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hosts_in_group(server, hostgroup, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroup belongs to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[AgentInGroupParams] + """ + kwargs['_return_http_data_only'] = True + return self.get_hosts_in_group_with_http_info(server, hostgroup, **kwargs) # noqa: E501 + + def get_hosts_in_group_with_http_info(self, server, hostgroup, **kwargs): # noqa: E501 + """get hostgroup agents # noqa: E501 + + Get the agents that compose the specified hostgroup # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hosts_in_group_with_http_info(server, hostgroup, async_req=True) + >>> result = thread.get() + + :param server: The Server the hostgroup belongs to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[AgentInGroupParams], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'hostgroup' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_hosts_in_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_hosts_in_group`") # noqa: E501 + # verify the required parameter 'hostgroup' is set + if self.api_client.client_side_validation and ('hostgroup' not in local_var_params or # noqa: E501 + local_var_params['hostgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostgroup` when calling `get_hosts_in_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'hostgroup' in local_var_params: + path_params['hostgroup'] = local_var_params['hostgroup'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[AgentInGroupParams]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/hostgroup/{hostgroup}/agents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_hub_status_details(self, node_id, **kwargs): # noqa: E501 + """Get hub status. # noqa: E501 + + Get hub status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hub_status_details(node_id, async_req=True) + >>> result = thread.get() + + :param node_id: Node ID of the hub (required) + :type node_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.get_hub_status_details_with_http_info(node_id, **kwargs) # noqa: E501 + + def get_hub_status_details_with_http_info(self, node_id, **kwargs): # noqa: E501 + """Get hub status. # noqa: E501 + + Get hub status. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hub_status_details_with_http_info(node_id, async_req=True) + >>> result = thread.get() + + :param node_id: Node ID of the hub (required) + :type node_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'node_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_hub_status_details" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'node_id' is set + if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 + local_var_params['node_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `node_id` when calling `get_hub_status_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'node_id' in local_var_params: + path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/hub/{nodeId}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_hub_status_details_for_site(self, site_name, node_id, **kwargs): # noqa: E501 + """Get hub status in site. # noqa: E501 + + Get hub status in site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hub_status_details_for_site(site_name, node_id, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param node_id: Node ID of the hub (required) + :type node_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.get_hub_status_details_for_site_with_http_info(site_name, node_id, **kwargs) # noqa: E501 + + def get_hub_status_details_for_site_with_http_info(self, site_name, node_id, **kwargs): # noqa: E501 + """Get hub status in site. # noqa: E501 + + Get hub status in site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_hub_status_details_for_site_with_http_info(site_name, node_id, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param node_id: Node ID of the hub (required) + :type node_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'node_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_hub_status_details_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_hub_status_details_for_site`") # noqa: E501 + # verify the required parameter 'node_id' is set + if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 + local_var_params['node_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `node_id` when calling `get_hub_status_details_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'node_id' in local_var_params: + path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/hub/{nodeId}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_identity_provider_metadata(self, **kwargs): # noqa: E501 + """Get identity Provider Metadata file # noqa: E501 + + Get identity Provider Metadata file # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_identity_provider_metadata(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.get_identity_provider_metadata_with_http_info(**kwargs) # noqa: E501 + + def get_identity_provider_metadata_with_http_info(self, **kwargs): # noqa: E501 + """Get identity Provider Metadata file # noqa: E501 + + Get identity Provider Metadata file # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_identity_provider_metadata_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_identity_provider_metadata" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/xml']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/systemsettings/saml2identityprovidermetadata', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_load_balancer_properties(self, server, load_balancer, **kwargs): # noqa: E501 + """Get loadBalancer parameters # noqa: E501 + + Get loadBalancer parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_load_balancer_properties(server, load_balancer, async_req=True) + >>> result = thread.get() + + :param server: The Server the loadBalancer is added to. (required) + :type server: str + :param load_balancer: The loadBalancer to be retrieved. (required) + :type load_balancer: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[KeyValueType] + """ + kwargs['_return_http_data_only'] = True + return self.get_load_balancer_properties_with_http_info(server, load_balancer, **kwargs) # noqa: E501 + + def get_load_balancer_properties_with_http_info(self, server, load_balancer, **kwargs): # noqa: E501 + """Get loadBalancer parameters # noqa: E501 + + Get loadBalancer parameters. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_load_balancer_properties_with_http_info(server, load_balancer, async_req=True) + >>> result = thread.get() + + :param server: The Server the loadBalancer is added to. (required) + :type server: str + :param load_balancer: The loadBalancer to be retrieved. (required) + :type load_balancer: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[KeyValueType], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'load_balancer' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_load_balancer_properties" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_load_balancer_properties`") # noqa: E501 + # verify the required parameter 'load_balancer' is set + if self.api_client.client_side_validation and ('load_balancer' not in local_var_params or # noqa: E501 + local_var_params['load_balancer'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `load_balancer` when calling `get_load_balancer_properties`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'load_balancer' in local_var_params: + path_params['loadBalancer'] = local_var_params['load_balancer'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[KeyValueType]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/loadbalancer/{loadBalancer}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_locked_external_users(self, **kwargs): # noqa: E501 + """Get MFT locked external users. # noqa: E501 + + Get MFT locked external users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_locked_external_users(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[ExternalUserData] + """ + kwargs['_return_http_data_only'] = True + return self.get_locked_external_users_with_http_info(**kwargs) # noqa: E501 + + def get_locked_external_users_with_http_info(self, **kwargs): # noqa: E501 + """Get MFT locked external users. # noqa: E501 + + Get MFT locked external users. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_locked_external_users_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[ExternalUserData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_locked_external_users" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[ExternalUserData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/externalusers/locked', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_locked_external_users_for_site(self, site_name, **kwargs): # noqa: E501 + """Get MFT locked external users for site. # noqa: E501 + + Get MFT locked external users for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_locked_external_users_for_site(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name (required) + :type site_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[ExternalUserData] + """ + kwargs['_return_http_data_only'] = True + return self.get_locked_external_users_for_site_with_http_info(site_name, **kwargs) # noqa: E501 + + def get_locked_external_users_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Get MFT locked external users for site. # noqa: E501 + + Get MFT locked external users for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_locked_external_users_for_site_with_http_info(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name (required) + :type site_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[ExternalUserData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_locked_external_users_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_locked_external_users_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[ExternalUserData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/externalusers/locked', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_configuration(self, server, agent, **kwargs): # noqa: E501 + """Get MFT Configuration # noqa: E501 + + Get MFT Configuration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_configuration(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: MftConfigurationData + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_configuration_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_mft_configuration_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get MFT Configuration # noqa: E501 + + Get MFT Configuration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_configuration_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MftConfigurationData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_configuration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_mft_configuration`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_mft_configuration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "MftConfigurationData", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/configuration', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_folders(self, **kwargs): # noqa: E501 + """Get MFT virtual folders that match the search criteria. # noqa: E501 + + Get MFT virtual folders that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_folders(async_req=True) + >>> result = thread.get() + + :param name: The virtual folder name. + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[FolderPropertiesData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_folders_with_http_info(**kwargs) # noqa: E501 + + def get_mft_folders_with_http_info(self, **kwargs): # noqa: E501 + """Get MFT virtual folders that match the search criteria. # noqa: E501 + + Get MFT virtual folders that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_folders_with_http_info(async_req=True) + >>> result = thread.get() + + :param name: The virtual folder name. + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[FolderPropertiesData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_folders" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[FolderPropertiesData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/virtualfolders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_folders_for_site(self, site_name, **kwargs): # noqa: E501 + """Get MFT virtual folders that match the search criteria for site. # noqa: E501 + + Get MFT virtual folders that match the search criteria for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_folders_for_site(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: The virtual folder name. + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[FolderPropertiesData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_folders_for_site_with_http_info(site_name, **kwargs) # noqa: E501 + + def get_mft_folders_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Get MFT virtual folders that match the search criteria for site. # noqa: E501 + + Get MFT virtual folders that match the search criteria for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_folders_for_site_with_http_info(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: The virtual folder name. + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[FolderPropertiesData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_folders_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_mft_folders_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[FolderPropertiesData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/virtualfolders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_gateways(self, **kwargs): # noqa: E501 + """Get MFT gateways # noqa: E501 + + Get MFT gateways # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_gateways(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[GatewayData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_gateways_with_http_info(**kwargs) # noqa: E501 + + def get_mft_gateways_with_http_info(self, **kwargs): # noqa: E501 + """Get MFT gateways # noqa: E501 + + Get MFT gateways # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_gateways_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[GatewayData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_gateways" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[GatewayData]", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/gateways', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_gateways_for_site(self, site_name, **kwargs): # noqa: E501 + """Get MFT gateways for site # noqa: E501 + + Get MFT gateways for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_gateways_for_site(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[GatewayData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_gateways_for_site_with_http_info(site_name, **kwargs) # noqa: E501 + + def get_mft_gateways_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Get MFT gateways for site # noqa: E501 + + Get MFT gateways for site # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_gateways_for_site_with_http_info(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[GatewayData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_gateways_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_mft_gateways_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[GatewayData]", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/gateways', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_processing_rules_for_site(self, site_name, **kwargs): # noqa: E501 + """Get MFTE processing rules that match the search criteria for site. # noqa: E501 + + Get MFTE processing rules that match the search criteria for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_processing_rules_for_site(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param name: The rule name. + :type name: str + :param description: The rule description. + :type description: str + :param priority: The rule priority. + :type priority: str + :param status: The rule status. + :type status: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[RulePropertiesData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_processing_rules_for_site_with_http_info(site_name, **kwargs) # noqa: E501 + + def get_mft_processing_rules_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Get MFTE processing rules that match the search criteria for site. # noqa: E501 + + Get MFTE processing rules that match the search criteria for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_processing_rules_for_site_with_http_info(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: site name (required) + :type site_name: str + :param name: The rule name. + :type name: str + :param description: The rule description. + :type description: str + :param priority: The rule priority. + :type priority: str + :param status: The rule status. + :type status: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[RulePropertiesData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'name', + 'description', + 'priority', + 'status' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_processing_rules_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_mft_processing_rules_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'priority' in local_var_params and local_var_params['priority'] is not None: # noqa: E501 + query_params.append(('priority', local_var_params['priority'])) # noqa: E501 + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[RulePropertiesData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/processingRules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_user_groups(self, **kwargs): # noqa: E501 + """Get all user groups that match the search criteria. # noqa: E501 + + Get all user groups that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_user_groups(async_req=True) + >>> result = thread.get() + + :param name: The user group name. + :type name: str + :param external_users: external users. + :type external_users: str + :param ldap_groups: ldap groups. + :type ldap_groups: str + :param ldap_users: ldap users. + :type ldap_users: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[UserGroupPropertiesData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_user_groups_with_http_info(**kwargs) # noqa: E501 + + def get_mft_user_groups_with_http_info(self, **kwargs): # noqa: E501 + """Get all user groups that match the search criteria. # noqa: E501 + + Get all user groups that match the search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_user_groups_with_http_info(async_req=True) + >>> result = thread.get() + + :param name: The user group name. + :type name: str + :param external_users: external users. + :type external_users: str + :param ldap_groups: ldap groups. + :type ldap_groups: str + :param ldap_users: ldap users. + :type ldap_users: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[UserGroupPropertiesData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'external_users', + 'ldap_groups', + 'ldap_users' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_user_groups" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'external_users' in local_var_params and local_var_params['external_users'] is not None: # noqa: E501 + query_params.append(('externalUsers', local_var_params['external_users'])) # noqa: E501 + if 'ldap_groups' in local_var_params and local_var_params['ldap_groups'] is not None: # noqa: E501 + query_params.append(('ldapGroups', local_var_params['ldap_groups'])) # noqa: E501 + if 'ldap_users' in local_var_params and local_var_params['ldap_users'] is not None: # noqa: E501 + query_params.append(('ldapUsers', local_var_params['ldap_users'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[UserGroupPropertiesData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mft/usergroups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_mft_user_groups_for_site(self, site_name, **kwargs): # noqa: E501 + """Get all user groups that match the search criteria for site. # noqa: E501 + + Get all user groups that match the search criteria for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_user_groups_for_site(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: The user group name. + :type name: str + :param external_users: external users. + :type external_users: str + :param ldap_groups: ldap groups. + :type ldap_groups: str + :param ldap_users: ldap users. + :type ldap_users: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[UserGroupPropertiesData] + """ + kwargs['_return_http_data_only'] = True + return self.get_mft_user_groups_for_site_with_http_info(site_name, **kwargs) # noqa: E501 + + def get_mft_user_groups_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Get all user groups that match the search criteria for site. # noqa: E501 + + Get all user groups that match the search criteria for site. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_mft_user_groups_for_site_with_http_info(site_name, async_req=True) + >>> result = thread.get() + + :param site_name: The site name. (required) + :type site_name: str + :param name: The user group name. + :type name: str + :param external_users: external users. + :type external_users: str + :param ldap_groups: ldap groups. + :type ldap_groups: str + :param ldap_users: ldap users. + :type ldap_users: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[UserGroupPropertiesData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_name', + 'name', + 'external_users', + 'ldap_groups', + 'ldap_users' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_mft_user_groups_for_site" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `get_mft_user_groups_for_site`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'external_users' in local_var_params and local_var_params['external_users'] is not None: # noqa: E501 + query_params.append(('externalUsers', local_var_params['external_users'])) # noqa: E501 + if 'ldap_groups' in local_var_params and local_var_params['ldap_groups'] is not None: # noqa: E501 + query_params.append(('ldapGroups', local_var_params['ldap_groups'])) # noqa: E501 + if 'ldap_users' in local_var_params and local_var_params['ldap_users'] is not None: # noqa: E501 + query_params.append(('ldapUsers', local_var_params['ldap_users'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[UserGroupPropertiesData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/mfte/site/{siteName}/usergroups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_organization_group_user_simulation(self, user, **kwargs): # noqa: E501 + """Get organization group user with authorization sumulation # noqa: E501 + + Get organization group user with authorization sumulation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_organization_group_user_simulation(user, async_req=True) + >>> result = thread.get() + + :param user: The user name. (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: OrganizationGroupUserAuthorizationSimulationData + """ + kwargs['_return_http_data_only'] = True + return self.get_organization_group_user_simulation_with_http_info(user, **kwargs) # noqa: E501 + + def get_organization_group_user_simulation_with_http_info(self, user, **kwargs): # noqa: E501 + """Get organization group user with authorization sumulation # noqa: E501 + + Get organization group user with authorization sumulation # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_organization_group_user_simulation_with_http_info(user, async_req=True) + >>> result = thread.get() + + :param user: The user name. (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(OrganizationGroupUserAuthorizationSimulationData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_organization_group_user_simulation" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_organization_group_user_simulation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "OrganizationGroupUserAuthorizationSimulationData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/organizationgroup/{user}/simulate', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_pgp_templates(self, server, agent, **kwargs): # noqa: E501 + """Get PGP Templates # noqa: E501 + + Get PGP Templates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pgp_templates(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param name: The PGP Template Name + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[PgpTemplateData] + """ + kwargs['_return_http_data_only'] = True + return self.get_pgp_templates_with_http_info(server, agent, **kwargs) # noqa: E501 + + def get_pgp_templates_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get PGP Templates # noqa: E501 + + Get PGP Templates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_pgp_templates_with_http_info(server, agent, async_req=True) + >>> result = thread.get() + + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param name: The PGP Template Name + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[PgpTemplateData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_pgp_templates" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_pgp_templates`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_pgp_templates`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[PgpTemplateData]", + 401: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/agent/{agent}/mft/pgptemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_remote_host_properties(self, server, remotehost, **kwargs): # noqa: E501 + """get a remote host configuration from Server # noqa: E501 + + Get the remote host configuration properties from the Server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_remote_host_properties(server, remotehost, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is connected to. (required) + :type server: str + :param remotehost: The name of the remote host. (required) + :type remotehost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AddRemoteHostParams + """ + kwargs['_return_http_data_only'] = True + return self.get_remote_host_properties_with_http_info(server, remotehost, **kwargs) # noqa: E501 + + def get_remote_host_properties_with_http_info(self, server, remotehost, **kwargs): # noqa: E501 + """get a remote host configuration from Server # noqa: E501 + + Get the remote host configuration properties from the Server # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_remote_host_properties_with_http_info(server, remotehost, async_req=True) + >>> result = thread.get() + + :param server: The Server the remote host is connected to. (required) + :type server: str + :param remotehost: The name of the remote host. (required) + :type remotehost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AddRemoteHostParams, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'remotehost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_remote_host_properties" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_remote_host_properties`") # noqa: E501 + # verify the required parameter 'remotehost' is set + if self.api_client.client_side_validation and ('remotehost' not in local_var_params or # noqa: E501 + local_var_params['remotehost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `remotehost` when calling `get_remote_host_properties`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'remotehost' in local_var_params: + path_params['remotehost'] = local_var_params['remotehost'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AddRemoteHostParams", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/remotehost/{remotehost}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_remote_hosts(self, server, **kwargs): # noqa: E501 + """get Server remote hosts # noqa: E501 + + Get all the remote hosts of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_remote_hosts(server, async_req=True) + >>> result = thread.get() + + :param server: The Server to query. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_remote_hosts_with_http_info(server, **kwargs) # noqa: E501 + + def get_remote_hosts_with_http_info(self, server, **kwargs): # noqa: E501 + """get Server remote hosts # noqa: E501 + + Get all the remote hosts of the specified Server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_remote_hosts_with_http_info(server, async_req=True) + >>> result = thread.get() + + :param server: The Server to query. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_remote_hosts" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_remote_hosts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/server/{server}/remotehosts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_role(self, role, **kwargs): # noqa: E501 + """Get Authorization Role # noqa: E501 + + Get Authorization Role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_role(role, async_req=True) + >>> result = thread.get() + + :param role: The Role name. (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: RoleData + """ + kwargs['_return_http_data_only'] = True + return self.get_role_with_http_info(role, **kwargs) # noqa: E501 + + def get_role_with_http_info(self, role, **kwargs): # noqa: E501 + """Get Authorization Role # noqa: E501 + + Get Authorization Role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_role_with_http_info(role, async_req=True) + >>> result = thread.get() + + :param role: The Role name. (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RoleData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_role" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `get_role`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RoleData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/role/{role}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_role_associates(self, role, **kwargs): # noqa: E501 + """Get all authorization entities associated with role # noqa: E501 + + Get all authorization entities associated with role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_role_associates(role, async_req=True) + >>> result = thread.get() + + :param role: role name. (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[AssociateData] + """ + kwargs['_return_http_data_only'] = True + return self.get_role_associates_with_http_info(role, **kwargs) # noqa: E501 + + def get_role_associates_with_http_info(self, role, **kwargs): # noqa: E501 + """Get all authorization entities associated with role # noqa: E501 + + Get all authorization entities associated with role # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_role_associates_with_http_info(role, async_req=True) + >>> result = thread.get() + + :param role: role name. (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[AssociateData], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_role_associates" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `get_role_associates`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[AssociateData]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/config/authorization/role/{role}/associates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_run_as_user(self, server, agent, user, **kwargs): # noqa: E501 + """Get Run-as user # noqa: E501 + + Get Run-as user details from server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_run_as_user(server, agent, user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: Name of user (required) - :param str role: Name of role (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunAsUserData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_role_to_user_with_http_info( - user, role, **kwargs - ) # noqa: E501 - else: - (data) = self.add_role_to_user_with_http_info( - user, role, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_run_as_user_with_http_info(server, agent, user, **kwargs) # noqa: E501 - def add_role_to_user_with_http_info(self, user, role, **kwargs): # noqa: E501 - """Add a role to user # noqa: E501 + def get_run_as_user_with_http_info(self, server, agent, user, **kwargs): # noqa: E501 + """Get Run-as user # noqa: E501 - Add a role to user so that user will inherit role authorization # noqa: E501 + Get Run-as user details from server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_role_to_user_with_http_info(user, role, async_req=True) + + >>> thread = api.get_run_as_user_with_http_info(server, agent, user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: Name of user (required) - :param str role: Name of role (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunAsUserData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user", "role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_role_to_user" % key + " to method get_run_as_user" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_run_as_user`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_run_as_user`") # noqa: E501 # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `add_role_to_user`" - ) # noqa: E501 - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `add_role_to_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_run_as_user`") # noqa: E501 collection_formats = {} path_params = {} - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunAsUserData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user/{user}/role/{role}", - "POST", + '/config/server/{server}/runasuser/{agent}/{user}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_secret(self, name_value, **kwargs): # noqa: E501 - """Add a new secret # noqa: E501 + def get_run_as_users_list(self, server, **kwargs): # noqa: E501 + """Get Run-as user list that match the requested search criteria. # noqa: E501 - Add a new secret to the secrets vault. # noqa: E501 + Get Run-as user list that match the requested search criteria from server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_secret(name_value, async_req=True) + + >>> thread = api.get_run_as_users_list(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param SecretKeyValue name_value: The new secret value (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param user: The Run-as user. + :type user: str + :param agent: The agent. + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[RunAsUserData] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_secret_with_http_info(name_value, **kwargs) # noqa: E501 - else: - (data) = self.add_secret_with_http_info(name_value, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_run_as_users_list_with_http_info(server, **kwargs) # noqa: E501 - def add_secret_with_http_info(self, name_value, **kwargs): # noqa: E501 - """Add a new secret # noqa: E501 + def get_run_as_users_list_with_http_info(self, server, **kwargs): # noqa: E501 + """Get Run-as user list that match the requested search criteria. # noqa: E501 - Add a new secret to the secrets vault. # noqa: E501 + Get Run-as user list that match the requested search criteria from server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_secret_with_http_info(name_value, async_req=True) + + >>> thread = api.get_run_as_users_list_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param SecretKeyValue name_value: The new secret value (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param user: The Run-as user. + :type user: str + :param agent: The agent. + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[RunAsUserData], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name_value"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'user', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_secret" % key + " to method get_run_as_users_list" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name_value' is set - if self.api_client.client_side_validation and ( - "name_value" not in params or params["name_value"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name_value` when calling `add_secret`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_run_as_users_list`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] + if 'user' in local_var_params and local_var_params['user'] is not None: # noqa: E501 + query_params.append(('user', local_var_params['user'])) # noqa: E501 + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "name_value" in params: - body_params = params["name_value"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[RunAsUserData]", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/secret", - "POST", + '/config/server/{server}/runasusers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_server(self, body, **kwargs): # noqa: E501 - """add server to the system # noqa: E501 + def get_server_definition(self, server, **kwargs): # noqa: E501 + """Get Control-M/Server definition. # noqa: E501 - Add a Server. This command setting up new server in the system # noqa: E501 + Get the definition for this specific server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_server(body, async_req=True) + + >>> thread = api.get_server_definition(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param AddServerParams body: (required) - :return: SuccessData + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CtmServerDefinition """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_server_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.add_server_with_http_info(body, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_server_definition_with_http_info(server, **kwargs) # noqa: E501 - def add_server_with_http_info(self, body, **kwargs): # noqa: E501 - """add server to the system # noqa: E501 + def get_server_definition_with_http_info(self, server, **kwargs): # noqa: E501 + """Get Control-M/Server definition. # noqa: E501 - Add a Server. This command setting up new server in the system # noqa: E501 + Get the definition for this specific server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_server_with_http_info(body, async_req=True) + + >>> thread = api.get_server_definition_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param AddServerParams body: (required) - :return: SuccessData + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CtmServerDefinition, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["body"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_server" % key + " to method get_server_definition" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ( - "body" not in params or params["body"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `body` when calling `add_server`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_server_definition`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "body" in params: - body_params = params["body"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtmServerDefinition", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server", - "POST", + '/config/server/{server}/definition', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_user(self, user_file, **kwargs): # noqa: E501 - """Add user # noqa: E501 + def get_server_system_setting(self, **kwargs): # noqa: E501 + """Get the Control-M server system settings # noqa: E501 - Add user # noqa: E501 + Get the Control-M server system settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_user(user_file, async_req=True) + + >>> thread = api.get_server_system_setting(async_req=True) >>> result = thread.get() - :param async_req bool - :param file user_file: File with contenet of user data. (required) - :return: SuccessData + :param server: Server to obtain the system settings from, not required in Helix + :type server: str + :param extended_data: True to return more agent parameters. HIDDEN + :type extended_data: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[KeyValue] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_user_with_http_info(user_file, **kwargs) # noqa: E501 - else: - (data) = self.add_user_with_http_info(user_file, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_server_system_setting_with_http_info(**kwargs) # noqa: E501 - def add_user_with_http_info(self, user_file, **kwargs): # noqa: E501 - """Add user # noqa: E501 + def get_server_system_setting_with_http_info(self, **kwargs): # noqa: E501 + """Get the Control-M server system settings # noqa: E501 - Add user # noqa: E501 + Get the Control-M server system settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_user_with_http_info(user_file, async_req=True) + + >>> thread = api.get_server_system_setting_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param file user_file: File with contenet of user data. (required) - :return: SuccessData + :param server: Server to obtain the system settings from, not required in Helix + :type server: str + :param extended_data: True to return more agent parameters. HIDDEN + :type extended_data: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[KeyValue], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'extended_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_user" % key + " to method get_server_system_setting" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'user_file' is set - if self.api_client.client_side_validation and ( - "user_file" not in params or params["user_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user_file` when calling `add_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'extended_data' in local_var_params and local_var_params['extended_data'] is not None: # noqa: E501 + query_params.append(('extendedData', local_var_params['extended_data'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "user_file" in params: - local_var_files["userFile"] = params["user_file"] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[KeyValue]", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user", - "POST", + '/config/systemsettings/server', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def add_zos_template( - self, server, agent, template_name, zos_template_data, **kwargs - ): # noqa: E501 - """Add z/OS Template # noqa: E501 + def get_servers(self, **kwargs): # noqa: E501 + """get all the Servers name and hostname in the system # noqa: E501 - Add z/OS Template # noqa: E501 + Get the names and hostnames of all Servers in the system. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_zos_template(server, agent, template_name, zos_template_data, async_req=True) + + >>> thread = api.get_servers(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The z/OS Template Name (required) - :param ZosTemplateData zos_template_data: z/OS Template Data (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[CtmDetails] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_zos_template_with_http_info( - server, agent, template_name, zos_template_data, **kwargs - ) # noqa: E501 - else: - (data) = self.add_zos_template_with_http_info( - server, agent, template_name, zos_template_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_servers_with_http_info(**kwargs) # noqa: E501 - def add_zos_template_with_http_info( - self, server, agent, template_name, zos_template_data, **kwargs - ): # noqa: E501 - """Add z/OS Template # noqa: E501 + def get_servers_with_http_info(self, **kwargs): # noqa: E501 + """get all the Servers name and hostname in the system # noqa: E501 - Add z/OS Template # noqa: E501 + Get the names and hostnames of all Servers in the system. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_zos_template_with_http_info(server, agent, template_name, zos_template_data, async_req=True) + + >>> thread = api.get_servers_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The z/OS Template Name (required) - :param ZosTemplateData zos_template_data: z/OS Template Data (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[CtmDetails], status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "template_name", - "zos_template_data", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method add_zos_template" % key + " to method get_servers" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_zos_template`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `add_zos_template`" - ) # noqa: E501 - # verify the required parameter 'template_name' is set - if self.api_client.client_side_validation and ( - "template_name" not in params or params["template_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `template_name` when calling `add_zos_template`" - ) # noqa: E501 - # verify the required parameter 'zos_template_data' is set - if self.api_client.client_side_validation and ( - "zos_template_data" not in params or params["zos_template_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `zos_template_data` when calling `add_zos_template`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "template_name" in params: - path_params["templateName"] = params["template_name"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "zos_template_data" in params: - body_params = params["zos_template_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[CtmDetails]", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/zostemplate/{templateName}", - "POST", + '/config/servers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def authorize_mft_ssh_cluster( - self, server, agent, cluster_name, hostname_port_list, **kwargs - ): # noqa: E501 - """Authorize SSH Cluster # noqa: E501 + def get_ssh_key(self, ctm, key_name, pass_phrase, **kwargs): # noqa: E501 + """Get public SSH key from the control-m server. # noqa: E501 - Authorize SSH Cluster # noqa: E501 + Save the public key locally on your computer the public key should be transferred to the Agentless host A ssh key will be returned as a string that represent the key . # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_mft_ssh_cluster(server, agent, cluster_name, hostname_port_list, async_req=True) + + >>> thread = api.get_ssh_key(ctm, key_name, pass_phrase, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str cluster_name: Ssh Cluster Name (required) - :param ClusterAuthorizationData hostname_port_list: File with content of hostnames and ports (required) - :return: SuccessData + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param key_name: The name for the key . REQUIRED. (required) + :type key_name: str + :param pass_phrase: The password for the key file . REQUIRED. (required) + :type pass_phrase: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SShPublicKey """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.authorize_mft_ssh_cluster_with_http_info( - server, agent, cluster_name, hostname_port_list, **kwargs - ) # noqa: E501 - else: - (data) = self.authorize_mft_ssh_cluster_with_http_info( - server, agent, cluster_name, hostname_port_list, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_ssh_key_with_http_info(ctm, key_name, pass_phrase, **kwargs) # noqa: E501 - def authorize_mft_ssh_cluster_with_http_info( - self, server, agent, cluster_name, hostname_port_list, **kwargs - ): # noqa: E501 - """Authorize SSH Cluster # noqa: E501 + def get_ssh_key_with_http_info(self, ctm, key_name, pass_phrase, **kwargs): # noqa: E501 + """Get public SSH key from the control-m server. # noqa: E501 - Authorize SSH Cluster # noqa: E501 + Save the public key locally on your computer the public key should be transferred to the Agentless host A ssh key will be returned as a string that represent the key . # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_mft_ssh_cluster_with_http_info(server, agent, cluster_name, hostname_port_list, async_req=True) + + >>> thread = api.get_ssh_key_with_http_info(ctm, key_name, pass_phrase, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str cluster_name: Ssh Cluster Name (required) - :param ClusterAuthorizationData hostname_port_list: File with content of hostnames and ports (required) - :return: SuccessData + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param key_name: The name for the key . REQUIRED. (required) + :type key_name: str + :param pass_phrase: The password for the key file . REQUIRED. (required) + :type pass_phrase: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SShPublicKey, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "cluster_name", - "hostname_port_list", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'ctm', + 'key_name', + 'pass_phrase' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method authorize_mft_ssh_cluster" % key + " to method get_ssh_key" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `authorize_mft_ssh_cluster`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `authorize_mft_ssh_cluster`" - ) # noqa: E501 - # verify the required parameter 'cluster_name' is set - if self.api_client.client_side_validation and ( - "cluster_name" not in params or params["cluster_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `cluster_name` when calling `authorize_mft_ssh_cluster`" - ) # noqa: E501 - # verify the required parameter 'hostname_port_list' is set - if self.api_client.client_side_validation and ( - "hostname_port_list" not in params or params["hostname_port_list"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostname_port_list` when calling `authorize_mft_ssh_cluster`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `get_ssh_key`") # noqa: E501 + # verify the required parameter 'key_name' is set + if self.api_client.client_side_validation and ('key_name' not in local_var_params or # noqa: E501 + local_var_params['key_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `key_name` when calling `get_ssh_key`") # noqa: E501 + # verify the required parameter 'pass_phrase' is set + if self.api_client.client_side_validation and ('pass_phrase' not in local_var_params or # noqa: E501 + local_var_params['pass_phrase'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `pass_phrase` when calling `get_ssh_key`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "cluster_name" in params: - path_params["clusterName"] = params["cluster_name"] # noqa: E501 + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 + if 'key_name' in local_var_params: + path_params['keyName'] = local_var_params['key_name'] # noqa: E501 + if 'pass_phrase' in local_var_params: + path_params['passPhrase'] = local_var_params['pass_phrase'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "hostname_port_list" in params: - body_params = params["hostname_port_list"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SShPublicKey", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/ssh/cluster/{clusterName}", - "POST", + '/config/server/{ctm}/sshkey/{keyName}/{passPhrase}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def authorize_mft_ssh_host(self, server, agent, hostname, **kwargs): # noqa: E501 - """Authorize SSH Host # noqa: E501 + def get_ssh_keys_list(self, ctm, **kwargs): # noqa: E501 + """Get all will return full ssh data for all objects. # noqa: E501 - Authorize SSH Host for SFTP account # noqa: E501 + Get all will return full ssh data for all objects. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_mft_ssh_host(server, agent, hostname, async_req=True) + + >>> thread = api.get_ssh_keys_list(ctm, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str hostname: Ssh Hostname (required) - :param str port: Ssh port for the relevant host - :return: SuccessData + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[SSHKey] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.authorize_mft_ssh_host_with_http_info( - server, agent, hostname, **kwargs - ) # noqa: E501 - else: - (data) = self.authorize_mft_ssh_host_with_http_info( - server, agent, hostname, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_ssh_keys_list_with_http_info(ctm, **kwargs) # noqa: E501 - def authorize_mft_ssh_host_with_http_info( - self, server, agent, hostname, **kwargs - ): # noqa: E501 - """Authorize SSH Host # noqa: E501 + def get_ssh_keys_list_with_http_info(self, ctm, **kwargs): # noqa: E501 + """Get all will return full ssh data for all objects. # noqa: E501 - Authorize SSH Host for SFTP account # noqa: E501 + Get all will return full ssh data for all objects. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_mft_ssh_host_with_http_info(server, agent, hostname, async_req=True) + + >>> thread = api.get_ssh_keys_list_with_http_info(ctm, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str hostname: Ssh Hostname (required) - :param str port: Ssh port for the relevant host - :return: SuccessData + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[SSHKey], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "hostname", "port"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'ctm' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method authorize_mft_ssh_host" % key + " to method get_ssh_keys_list" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `authorize_mft_ssh_host`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `authorize_mft_ssh_host`" - ) # noqa: E501 - # verify the required parameter 'hostname' is set - if self.api_client.client_side_validation and ( - "hostname" not in params or params["hostname"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostname` when calling `authorize_mft_ssh_host`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `get_ssh_keys_list`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "hostname" in params: - path_params["hostname"] = params["hostname"] # noqa: E501 + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 query_params = [] - if "port" in params: - query_params.append(("port", params["port"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[SSHKey]", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/ssh/host/{hostname}", - "POST", + '/config/server/{ctm}/sshKeysList', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def authorize_ssh_known_remotehost( - self, server, remotehost, **kwargs - ): # noqa: E501 - """Authorize # noqa: E501 + def get_system_setting(self, **kwargs): # noqa: E501 + """Get system setting for Control-M environment # noqa: E501 - Authorized known ssh remote host. # noqa: E501 + Get system setting for Control-M environment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_ssh_known_remotehost(server, remotehost, async_req=True) + + >>> thread = api.get_system_setting(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is connected to. (required) - :param str remotehost: The name of the remote host. (required) - :return: SuccessData + :param server: Server to which the system settings are applied + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SystemSetting """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.authorize_ssh_known_remotehost_with_http_info( - server, remotehost, **kwargs - ) # noqa: E501 - else: - (data) = self.authorize_ssh_known_remotehost_with_http_info( - server, remotehost, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_system_setting_with_http_info(**kwargs) # noqa: E501 - def authorize_ssh_known_remotehost_with_http_info( - self, server, remotehost, **kwargs - ): # noqa: E501 - """Authorize # noqa: E501 + def get_system_setting_with_http_info(self, **kwargs): # noqa: E501 + """Get system setting for Control-M environment # noqa: E501 - Authorized known ssh remote host. # noqa: E501 + Get system setting for Control-M environment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.authorize_ssh_known_remotehost_with_http_info(server, remotehost, async_req=True) + + >>> thread = api.get_system_setting_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is connected to. (required) - :param str remotehost: The name of the remote host. (required) - :return: SuccessData + :param server: Server to which the system settings are applied + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SystemSetting, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "remotehost"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method authorize_ssh_known_remotehost" % key + " to method get_system_setting" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `authorize_ssh_known_remotehost`" - ) # noqa: E501 - # verify the required parameter 'remotehost' is set - if self.api_client.client_side_validation and ( - "remotehost" not in params or params["remotehost"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `remotehost` when calling `authorize_ssh_known_remotehost`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "remotehost" in params: - path_params["remotehost"] = params["remotehost"] # noqa: E501 query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SystemSetting", + 206: "SystemSetting", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/remotehost/{remotehost}/authorize", - "POST", + '/config/systemsettings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def change_user_password(self, user, **kwargs): # noqa: E501 - """Change user password # noqa: E501 + def get_user(self, user, **kwargs): # noqa: E501 + """Get user # noqa: E501 - Change user password # noqa: E501 + Get user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_user_password(user, async_req=True) + + >>> thread = api.get_user(user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: user name (required) - :param UserPassword password: The new password. - :return: SuccessData + :param user: The user name. (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UserData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.change_user_password_with_http_info( - user, **kwargs - ) # noqa: E501 - else: - (data) = self.change_user_password_with_http_info( - user, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_user_with_http_info(user, **kwargs) # noqa: E501 - def change_user_password_with_http_info(self, user, **kwargs): # noqa: E501 - """Change user password # noqa: E501 + def get_user_with_http_info(self, user, **kwargs): # noqa: E501 + """Get user # noqa: E501 - Change user password # noqa: E501 + Get user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_user_password_with_http_info(user, async_req=True) + + >>> thread = api.get_user_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: user name (required) - :param UserPassword password: The new password. - :return: SuccessData + :param user: The user name. (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UserData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user", "password"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method change_user_password" % key + " to method get_user" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `change_user_password`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_user`") # noqa: E501 collection_formats = {} path_params = {} - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "password" in params: - body_params = params["password"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UserData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/user/{user}/password/adminUpdate", - "POST", + '/config/authorization/user/{user}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def create_agent_certificate_signing_request( - self, server, agent, csr_data, **kwargs - ): # noqa: E501 - """Create certificate signing request (CSR). # noqa: E501 + def get_user_effective_rights(self, **kwargs): # noqa: E501 + """Get user real effective authorizations # noqa: E501 - Create certificate signing request (CSR) on SSL configured Agent. # noqa: E501 + Get user real effective authorizations by all his roles # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_agent_certificate_signing_request(server, agent, csr_data, async_req=True) + + >>> thread = api.get_user_effective_rights(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :param CertificateSigningRequestData csr_data: Certificate Signing Request (CSR) data (required) - :return: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RoleData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.create_agent_certificate_signing_request_with_http_info( - server, agent, csr_data, **kwargs - ) # noqa: E501 - else: - (data) = self.create_agent_certificate_signing_request_with_http_info( - server, agent, csr_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_user_effective_rights_with_http_info(**kwargs) # noqa: E501 - def create_agent_certificate_signing_request_with_http_info( - self, server, agent, csr_data, **kwargs - ): # noqa: E501 - """Create certificate signing request (CSR). # noqa: E501 + def get_user_effective_rights_with_http_info(self, **kwargs): # noqa: E501 + """Get user real effective authorizations # noqa: E501 - Create certificate signing request (CSR) on SSL configured Agent. # noqa: E501 + Get user real effective authorizations by all his roles # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_agent_certificate_signing_request_with_http_info(server, agent, csr_data, async_req=True) + + >>> thread = api.get_user_effective_rights_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :param CertificateSigningRequestData csr_data: Certificate Signing Request (CSR) data (required) - :return: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RoleData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "csr_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_agent_certificate_signing_request" % key + " to method get_user_effective_rights" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `create_agent_certificate_signing_request`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `create_agent_certificate_signing_request`" - ) # noqa: E501 - # verify the required parameter 'csr_data' is set - if self.api_client.client_side_validation and ( - "csr_data" not in params or params["csr_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `csr_data` when calling `create_agent_certificate_signing_request`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "csr_data" in params: - body_params = params["csr_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RoleData", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/csr", - "POST", + '/config/authorization/user/effectiveRights', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def create_run_as_user(self, server, run_as_user_data, **kwargs): # noqa: E501 - """Add a new Run-as user # noqa: E501 + def get_user_simulation(self, user, **kwargs): # noqa: E501 + """Get user with authorization sumulation # noqa: E501 - Add a new Run-as user to server. # noqa: E501 + Get user with authorization sumulation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_run_as_user(server, run_as_user_data, async_req=True) + + >>> thread = api.get_user_simulation(user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param RunAsUserData run_as_user_data: Run as user data (required) - :return: SuccessData + :param user: The user name. (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UserData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.create_run_as_user_with_http_info( - server, run_as_user_data, **kwargs - ) # noqa: E501 - else: - (data) = self.create_run_as_user_with_http_info( - server, run_as_user_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_user_simulation_with_http_info(user, **kwargs) # noqa: E501 - def create_run_as_user_with_http_info( - self, server, run_as_user_data, **kwargs - ): # noqa: E501 - """Add a new Run-as user # noqa: E501 + def get_user_simulation_with_http_info(self, user, **kwargs): # noqa: E501 + """Get user with authorization sumulation # noqa: E501 - Add a new Run-as user to server. # noqa: E501 + Get user with authorization sumulation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_run_as_user_with_http_info(server, run_as_user_data, async_req=True) + + >>> thread = api.get_user_simulation_with_http_info(user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param RunAsUserData run_as_user_data: Run as user data (required) - :return: SuccessData + :param user: The user name. (required) + :type user: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UserData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "run_as_user_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_run_as_user" % key + " to method get_user_simulation" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `create_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'run_as_user_data' is set - if self.api_client.client_side_validation and ( - "run_as_user_data" not in params or params["run_as_user_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `run_as_user_data` when calling `create_run_as_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `get_user_simulation`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "run_as_user_data" in params: - body_params = params["run_as_user_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UserData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/runasuser", - "POST", + '/config/authorization/user/{user}/simulate', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_agent(self, server, agent, **kwargs): # noqa: E501 - """delete an agent from Server # noqa: E501 + def get_wda_gateways(self, server, agent, **kwargs): # noqa: E501 + """Get DataAssurance gateways # noqa: E501 - Delete an agent from a Server. This will not shut the agent down. It only disconnects and removes it from the list. # noqa: E501 + Get DataAssurance gateways # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_agent(server, agent, async_req=True) + + >>> thread = api.get_wda_gateways(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str agent: The name of the agent to delete. (required) - :return: SuccessData + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[DataAssuranceGatewayData] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_wda_gateways_with_http_info(server, agent, **kwargs) # noqa: E501 - def delete_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """delete an agent from Server # noqa: E501 + def get_wda_gateways_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get DataAssurance gateways # noqa: E501 - Delete an agent from a Server. This will not shut the agent down. It only disconnects and removes it from the list. # noqa: E501 + Get DataAssurance gateways # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_agent_with_http_info(server, agent, async_req=True) + + >>> thread = api.get_wda_gateways_with_http_info(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str agent: The name of the agent to delete. (required) - :return: SuccessData + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[DataAssuranceGatewayData], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_agent" % key + " to method get_wda_gateways" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_agent`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_wda_gateways`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `delete_agent`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_wda_gateways`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[DataAssuranceGatewayData]", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}", - "DELETE", + '/config/dataAssurance/{server}/{agent}/gateways', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_archive_rule( - self, rule_name, delete_rule_data_flag, **kwargs - ): # noqa: E501 - """Delete Workload Archiving rule # noqa: E501 + def get_workflow_insights_data_export_status(self, **kwargs): # noqa: E501 + """Get workflow data export status. # noqa: E501 - Deletes Workload Archiving rule by name. It is required to send deleteRuleData flag to specify if rule need to be deleted with all the collected data or deleteRuleWithoutData otherwise. # noqa: E501 + Get workflow data export status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_archive_rule(rule_name, delete_rule_data_flag, async_req=True) + + >>> thread = api.get_workflow_insights_data_export_status(async_req=True) >>> result = thread.get() - :param async_req bool - :param str rule_name: Rule name to delete (required) - :param str delete_rule_data_flag: Remove rule with collected data or without. REQUIRED. (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: WorkflowInsightsDataExportStatus """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_archive_rule_with_http_info( - rule_name, delete_rule_data_flag, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_archive_rule_with_http_info( - rule_name, delete_rule_data_flag, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_workflow_insights_data_export_status_with_http_info(**kwargs) # noqa: E501 - def delete_archive_rule_with_http_info( - self, rule_name, delete_rule_data_flag, **kwargs - ): # noqa: E501 - """Delete Workload Archiving rule # noqa: E501 + def get_workflow_insights_data_export_status_with_http_info(self, **kwargs): # noqa: E501 + """Get workflow data export status. # noqa: E501 - Deletes Workload Archiving rule by name. It is required to send deleteRuleData flag to specify if rule need to be deleted with all the collected data or deleteRuleWithoutData otherwise. # noqa: E501 + Get workflow data export status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_archive_rule_with_http_info(rule_name, delete_rule_data_flag, async_req=True) + + >>> thread = api.get_workflow_insights_data_export_status_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str rule_name: Rule name to delete (required) - :param str delete_rule_data_flag: Remove rule with collected data or without. REQUIRED. (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(WorkflowInsightsDataExportStatus, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["rule_name", "delete_rule_data_flag"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_archive_rule" % key + " to method get_workflow_insights_data_export_status" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'rule_name' is set - if self.api_client.client_side_validation and ( - "rule_name" not in params or params["rule_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `rule_name` when calling `delete_archive_rule`" - ) # noqa: E501 - # verify the required parameter 'delete_rule_data_flag' is set - if self.api_client.client_side_validation and ( - "delete_rule_data_flag" not in params - or params["delete_rule_data_flag"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `delete_rule_data_flag` when calling `delete_archive_rule`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "rule_name" in params: - path_params["ruleName"] = params["rule_name"] # noqa: E501 query_params = [] - if "delete_rule_data_flag" in params: - query_params.append( - ("deleteRuleDataFlag", params["delete_rule_data_flag"]) - ) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "WorkflowInsightsDataExportStatus", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/archive/rule/{ruleName}", - "DELETE", + '/config/workflowinsights/dataexport/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_authorization_role(self, role, **kwargs): # noqa: E501 - """Delete Authorization Role # noqa: E501 + def get_workflow_insights_data_export_system_params(self, **kwargs): # noqa: E501 + """Get workflow data export system parameters. # noqa: E501 - Delete Authorization Role # noqa: E501 + Get workflow data export system parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_authorization_role(role, async_req=True) + + >>> thread = api.get_workflow_insights_data_export_system_params(async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SystemParametersList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_authorization_role_with_http_info( - role, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_authorization_role_with_http_info( - role, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_workflow_insights_data_export_system_params_with_http_info(**kwargs) # noqa: E501 - def delete_authorization_role_with_http_info(self, role, **kwargs): # noqa: E501 - """Delete Authorization Role # noqa: E501 + def get_workflow_insights_data_export_system_params_with_http_info(self, **kwargs): # noqa: E501 + """Get workflow data export system parameters. # noqa: E501 - Delete Authorization Role # noqa: E501 + Get workflow data export system parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_authorization_role_with_http_info(role, async_req=True) + + >>> thread = api.get_workflow_insights_data_export_system_params_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SystemParametersList, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_authorization_role" % key + " to method get_workflow_insights_data_export_system_params" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `delete_authorization_role`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SystemParametersList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/role/{role}", - "DELETE", + '/config/workflowinsights/dataexport/parameters', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_external_user(self, username, **kwargs): # noqa: E501 - """Delete an external user # noqa: E501 + def get_workflow_insights_status(self, **kwargs): # noqa: E501 + """get Workflow Insights status # noqa: E501 - Delete an existing external user in MFT # noqa: E501 + get Workflow Insights status - topology and system parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_external_user(username, async_req=True) + + >>> thread = api.get_workflow_insights_status(async_req=True) >>> result = thread.get() - :param async_req bool - :param str username: The name of the external user to delete (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: WorkflowInsightsStatus """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_external_user_with_http_info( - username, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_external_user_with_http_info( - username, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_workflow_insights_status_with_http_info(**kwargs) # noqa: E501 - def delete_external_user_with_http_info(self, username, **kwargs): # noqa: E501 - """Delete an external user # noqa: E501 + def get_workflow_insights_status_with_http_info(self, **kwargs): # noqa: E501 + """get Workflow Insights status # noqa: E501 - Delete an existing external user in MFT # noqa: E501 + get Workflow Insights status - topology and system parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_external_user_with_http_info(username, async_req=True) + + >>> thread = api.get_workflow_insights_status_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str username: The name of the external user to delete (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(WorkflowInsightsStatus, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["username"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_external_user" % key + " to method get_workflow_insights_status" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'username' is set - if self.api_client.client_side_validation and ( - "username" not in params or params["username"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `username` when calling `delete_external_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "username" in params: - path_params["username"] = params["username"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "WorkflowInsightsStatus", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/externaluser/{username}", - "DELETE", + '/config/workflowinsights/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_external_user_or_user_group_from_mft_folder( - self, folder_name, user_or_group, **kwargs - ): # noqa: E501 - """Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + def get_zos_templates(self, server, agent, **kwargs): # noqa: E501 + """Get z/OS Templates # noqa: E501 - Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + Get z/OS Templates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_external_user_or_user_group_from_mft_folder(folder_name, user_or_group, async_req=True) + + >>> thread = api.get_zos_templates(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :param str user_or_group: The user name (required) - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param name: The z/OS Template Name + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[ZosTemplateData] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return ( - self.delete_external_user_or_user_group_from_mft_folder_with_http_info( - folder_name, user_or_group, **kwargs - ) - ) # noqa: E501 - else: - ( - data - ) = self.delete_external_user_or_user_group_from_mft_folder_with_http_info( - folder_name, user_or_group, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_zos_templates_with_http_info(server, agent, **kwargs) # noqa: E501 - def delete_external_user_or_user_group_from_mft_folder_with_http_info( - self, folder_name, user_or_group, **kwargs - ): # noqa: E501 - """Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + def get_zos_templates_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Get z/OS Templates # noqa: E501 - Remove an external user or user group from an existing virtual folder in MFT. # noqa: E501 + Get z/OS Templates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_external_user_or_user_group_from_mft_folder_with_http_info(folder_name, user_or_group, async_req=True) + + >>> thread = api.get_zos_templates_with_http_info(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :param str user_or_group: The user name (required) - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param name: The z/OS Template Name + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[ZosTemplateData], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["folder_name", "user_or_group"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_external_user_or_user_group_from_mft_folder" - % key + " to method get_zos_templates" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'folder_name' is set - if self.api_client.client_side_validation and ( - "folder_name" not in params or params["folder_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_name` when calling `delete_external_user_or_user_group_from_mft_folder`" - ) # noqa: E501 - # verify the required parameter 'user_or_group' is set - if self.api_client.client_side_validation and ( - "user_or_group" not in params or params["user_or_group"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user_or_group` when calling `delete_external_user_or_user_group_from_mft_folder`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `get_zos_templates`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_zos_templates`") # noqa: E501 collection_formats = {} path_params = {} - if "folder_name" in params: - path_params["folderName"] = params["folder_name"] # noqa: E501 - if "user_or_group" in params: - path_params["userOrGroup"] = params["user_or_group"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[ZosTemplateData]", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/virtualfolder/{folderName}/user/{userOrGroup}", - "DELETE", + '/config/server/{server}/agent/{agent}/mft/zostemplates', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_host_from_group(self, server, hostgroup, host, **kwargs): # noqa: E501 - """delete an agent from a hostgroup # noqa: E501 + def list_secrets(self, **kwargs): # noqa: E501 + """Get list of secret names # noqa: E501 - Delete an agent from the specified hostgroup. If the group is empty it will also be deleted. # noqa: E501 + Get the list of names of all the secrets in the vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_host_from_group(server, hostgroup, host, async_req=True) + + >>> thread = api.list_secrets(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroup belongs to. (required) - :param str hostgroup: The hostgroup name (required) - :param str host: The agent to be deleted (required) - :return: AgentsInGroupSuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[str] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_host_from_group_with_http_info( - server, hostgroup, host, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_host_from_group_with_http_info( - server, hostgroup, host, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.list_secrets_with_http_info(**kwargs) # noqa: E501 - def delete_host_from_group_with_http_info( - self, server, hostgroup, host, **kwargs - ): # noqa: E501 - """delete an agent from a hostgroup # noqa: E501 + def list_secrets_with_http_info(self, **kwargs): # noqa: E501 + """Get list of secret names # noqa: E501 - Delete an agent from the specified hostgroup. If the group is empty it will also be deleted. # noqa: E501 + Get the list of names of all the secrets in the vault # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_host_from_group_with_http_info(server, hostgroup, host, async_req=True) + + >>> thread = api.list_secrets_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroup belongs to. (required) - :param str hostgroup: The hostgroup name (required) - :param str host: The agent to be deleted (required) - :return: AgentsInGroupSuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "hostgroup", "host"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_host_from_group" % key + " to method list_secrets" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_host_from_group`" - ) # noqa: E501 - # verify the required parameter 'hostgroup' is set - if self.api_client.client_side_validation and ( - "hostgroup" not in params or params["hostgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostgroup` when calling `delete_host_from_group`" - ) # noqa: E501 - # verify the required parameter 'host' is set - if self.api_client.client_side_validation and ( - "host" not in params or params["host"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `host` when calling `delete_host_from_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "hostgroup" in params: - path_params["hostgroup"] = params["hostgroup"] # noqa: E501 - if "host" in params: - path_params["host"] = params["host"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/hostgroup/{hostgroup}/agent/{host}", - "DELETE", + '/config/secrets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AgentsInGroupSuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_host_group(self, server, hostgroup, **kwargs): # noqa: E501 - """delete host group # noqa: E501 + def lock_external_user(self, user_name, **kwargs): # noqa: E501 + """Lock external user # noqa: E501 - delete host group # noqa: E501 + Lock an existing external user in MFTE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_host_group(server, hostgroup, async_req=True) + + >>> thread = api.lock_external_user(user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str hostgroup: The hostgroup name (required) - :return: SuccessData + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_host_group_with_http_info( - server, hostgroup, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_host_group_with_http_info( - server, hostgroup, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.lock_external_user_with_http_info(user_name, **kwargs) # noqa: E501 - def delete_host_group_with_http_info( - self, server, hostgroup, **kwargs - ): # noqa: E501 - """delete host group # noqa: E501 + def lock_external_user_with_http_info(self, user_name, **kwargs): # noqa: E501 + """Lock external user # noqa: E501 - delete host group # noqa: E501 + Lock an existing external user in MFTE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_host_group_with_http_info(server, hostgroup, async_req=True) + + >>> thread = api.lock_external_user_with_http_info(user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str hostgroup: The hostgroup name (required) - :return: SuccessData + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "hostgroup"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_host_group" % key + " to method lock_external_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_host_group`" - ) # noqa: E501 - # verify the required parameter 'hostgroup' is set - if self.api_client.client_side_validation and ( - "hostgroup" not in params or params["hostgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostgroup` when calling `delete_host_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `lock_external_user`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "hostgroup" in params: - path_params["hostgroup"] = params["hostgroup"] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/hostgroup/{hostgroup}", - "DELETE", + '/config/mft/externaluser/{userName}/lock', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_mft_folder(self, folder_name, **kwargs): # noqa: E501 - """Delete a virtual folder. # noqa: E501 + def lock_external_user_for_site(self, site_name, user_name, **kwargs): # noqa: E501 + """Lock external user for site # noqa: E501 - Delete an existing virtual folder in MFT. # noqa: E501 + Lock an existing external user in MFTE for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_mft_folder(folder_name, async_req=True) + + >>> thread = api.lock_external_user_for_site(site_name, user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :return: SuccessData + :param site_name: The site name (required) + :type site_name: str + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_mft_folder_with_http_info( - folder_name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_mft_folder_with_http_info( - folder_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.lock_external_user_for_site_with_http_info(site_name, user_name, **kwargs) # noqa: E501 - def delete_mft_folder_with_http_info(self, folder_name, **kwargs): # noqa: E501 - """Delete a virtual folder. # noqa: E501 + def lock_external_user_for_site_with_http_info(self, site_name, user_name, **kwargs): # noqa: E501 + """Lock external user for site # noqa: E501 - Delete an existing virtual folder in MFT. # noqa: E501 + Lock an existing external user in MFTE for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_mft_folder_with_http_info(folder_name, async_req=True) + + >>> thread = api.lock_external_user_for_site_with_http_info(site_name, user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :return: SuccessData + :param site_name: The site name (required) + :type site_name: str + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["folder_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_mft_folder" % key + " to method lock_external_user_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'folder_name' is set - if self.api_client.client_side_validation and ( - "folder_name" not in params or params["folder_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_name` when calling `delete_mft_folder`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `lock_external_user_for_site`") # noqa: E501 + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `lock_external_user_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "folder_name" in params: - path_params["folderName"] = params["folder_name"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/virtualfolder/{folderName}", - "DELETE", + '/config/mfte/site/{siteName}/externaluser/{userName}/lock', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_mft_user_group(self, name, **kwargs): # noqa: E501 - """Delete user group. # noqa: E501 + def managed_ctm_server(self, server, host, port, **kwargs): # noqa: E501 + """Set server to managed state. # noqa: E501 - Delete user group. # noqa: E501 + Set server to managed state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_mft_user_group(name, async_req=True) + + >>> thread = api.managed_ctm_server(server, host, port, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: User group name (required) - :return: SuccessData + :param server: (required) + :type server: str + :param host: Server host. (required) + :type host: str + :param port: Server port. (required) + :type port: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_mft_user_group_with_http_info( - name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_mft_user_group_with_http_info( - name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.managed_ctm_server_with_http_info(server, host, port, **kwargs) # noqa: E501 - def delete_mft_user_group_with_http_info(self, name, **kwargs): # noqa: E501 - """Delete user group. # noqa: E501 + def managed_ctm_server_with_http_info(self, server, host, port, **kwargs): # noqa: E501 + """Set server to managed state. # noqa: E501 - Delete user group. # noqa: E501 + Set server to managed state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_mft_user_group_with_http_info(name, async_req=True) + + >>> thread = api.managed_ctm_server_with_http_info(server, host, port, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: User group name (required) - :return: SuccessData + :param server: (required) + :type server: str + :param host: Server host. (required) + :type host: str + :param port: Server port. (required) + :type port: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'host', + 'port' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_mft_user_group" % key + " to method managed_ctm_server" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_mft_user_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `managed_ctm_server`") # noqa: E501 + # verify the required parameter 'host' is set + if self.api_client.client_side_validation and ('host' not in local_var_params or # noqa: E501 + local_var_params['host'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `host` when calling `managed_ctm_server`") # noqa: E501 + # verify the required parameter 'port' is set + if self.api_client.client_side_validation and ('port' not in local_var_params or # noqa: E501 + local_var_params['port'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `port` when calling `managed_ctm_server`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] + if 'host' in local_var_params and local_var_params['host'] is not None: # noqa: E501 + query_params.append(('host', local_var_params['host'])) # noqa: E501 + if 'port' in local_var_params and local_var_params['port'] is not None: # noqa: E501 + query_params.append(('port', local_var_params['port'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 403: None, + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/usergroup/{name}", - "DELETE", + '/config/server/{server}/managed', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_pgp_template(self, server, agent, template_name, **kwargs): # noqa: E501 - """Delete PGP Template # noqa: E501 + def perform_em_failover(self, **kwargs): # noqa: E501 + """Perform EM failover to the secondary EM server # noqa: E501 - Delete PGP Template # noqa: E501 + Perform EM failover to the secondary EM server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_pgp_template(server, agent, template_name, async_req=True) + + >>> thread = api.perform_em_failover(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The PGP Template Name (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_pgp_template_with_http_info( - server, agent, template_name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_pgp_template_with_http_info( - server, agent, template_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.perform_em_failover_with_http_info(**kwargs) # noqa: E501 - def delete_pgp_template_with_http_info( - self, server, agent, template_name, **kwargs - ): # noqa: E501 - """Delete PGP Template # noqa: E501 + def perform_em_failover_with_http_info(self, **kwargs): # noqa: E501 + """Perform EM failover to the secondary EM server # noqa: E501 - Delete PGP Template # noqa: E501 + Perform EM failover to the secondary EM server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_pgp_template_with_http_info(server, agent, template_name, async_req=True) + + >>> thread = api.perform_em_failover_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The PGP Template Name (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "template_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_pgp_template" % key + " to method perform_em_failover" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `delete_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'template_name' is set - if self.api_client.client_side_validation and ( - "template_name" not in params or params["template_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `template_name` when calling `delete_pgp_template`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "template_name" in params: - path_params["templateName"] = params["template_name"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName}", - "DELETE", + '/config/em/failover', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_remote_host(self, server, remotehost, **kwargs): # noqa: E501 - """delete a remote host from Server # noqa: E501 + def perform_em_fallback(self, **kwargs): # noqa: E501 + """Perform EM fallback to the primary EM server # noqa: E501 - Delete a remote host from a Server. # noqa: E501 + Perform EM fallback to the primary EM server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_remote_host(server, remotehost, async_req=True) + + >>> thread = api.perform_em_fallback(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is connected to. (required) - :param str remotehost: The name of the remote host to delete. (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_remote_host_with_http_info( - server, remotehost, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_remote_host_with_http_info( - server, remotehost, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.perform_em_fallback_with_http_info(**kwargs) # noqa: E501 - def delete_remote_host_with_http_info( - self, server, remotehost, **kwargs - ): # noqa: E501 - """delete a remote host from Server # noqa: E501 + def perform_em_fallback_with_http_info(self, **kwargs): # noqa: E501 + """Perform EM fallback to the primary EM server # noqa: E501 - Delete a remote host from a Server. # noqa: E501 + Perform EM fallback to the primary EM server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_remote_host_with_http_info(server, remotehost, async_req=True) + + >>> thread = api.perform_em_fallback_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is connected to. (required) - :param str remotehost: The name of the remote host to delete. (required) - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "remotehost"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_remote_host" % key + " to method perform_em_fallback" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_remote_host`" - ) # noqa: E501 - # verify the required parameter 'remotehost' is set - if self.api_client.client_side_validation and ( - "remotehost" not in params or params["remotehost"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `remotehost` when calling `delete_remote_host`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "remotehost" in params: - path_params["remotehost"] = params["remotehost"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/remotehost/{remotehost}", - "DELETE", + '/config/em/fallback', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_role_from_ldap_group(self, ldapgroup, role, **kwargs): # noqa: E501 - """Delete a role from LDAP group # noqa: E501 + def ping_agent(self, server, agent, **kwargs): # noqa: E501 + """ping to the agent in the Server # noqa: E501 - Delete a role from LDAP group # noqa: E501 + Ping an Agent. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_role_from_ldap_group(ldapgroup, role, async_req=True) + + >>> thread = api.ping_agent(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ldapgroup: Name of LDAP group (required) - :param str role: Name of role (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param body: + :type body: PingAgentParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_role_from_ldap_group_with_http_info( - ldapgroup, role, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_role_from_ldap_group_with_http_info( - ldapgroup, role, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.ping_agent_with_http_info(server, agent, **kwargs) # noqa: E501 - def delete_role_from_ldap_group_with_http_info( - self, ldapgroup, role, **kwargs - ): # noqa: E501 - """Delete a role from LDAP group # noqa: E501 + def ping_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """ping to the agent in the Server # noqa: E501 - Delete a role from LDAP group # noqa: E501 + Ping an Agent. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_role_from_ldap_group_with_http_info(ldapgroup, role, async_req=True) + + >>> thread = api.ping_agent_with_http_info(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ldapgroup: Name of LDAP group (required) - :param str role: Name of role (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agent: The Agent. (required) + :type agent: str + :param body: + :type body: PingAgentParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["ldapgroup", "role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'agent', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_role_from_ldap_group" % key + " to method ping_agent" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'ldapgroup' is set - if self.api_client.client_side_validation and ( - "ldapgroup" not in params or params["ldapgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `ldapgroup` when calling `delete_role_from_ldap_group`" - ) # noqa: E501 - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `delete_role_from_ldap_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `ping_agent`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `ping_agent`") # noqa: E501 collection_formats = {} path_params = {} - if "ldapgroup" in params: - path_params["ldapgroup"] = params["ldapgroup"] # noqa: E501 - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/ldap/{ldapgroup}/role/{role}", - "DELETE", + '/config/server/{server}/agent/{agent}/ping', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_run_as_user(self, server, agent, user, **kwargs): # noqa: E501 - """delete Run-as user # noqa: E501 + def ping_agentless_host(self, server, agentlesshost, **kwargs): # noqa: E501 + """ping to the agentless host in the Server # noqa: E501 - Delete Run-as user from server # noqa: E501 + Ping an Agentless Host. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_run_as_user(server, agent, user, async_req=True) + + >>> thread = api.ping_agentless_host(server, agentlesshost, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agentlesshost: The Agentless Host. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_run_as_user_with_http_info( - server, agent, user, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_run_as_user_with_http_info( - server, agent, user, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.ping_agentless_host_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 - def delete_run_as_user_with_http_info( - self, server, agent, user, **kwargs - ): # noqa: E501 - """delete Run-as user # noqa: E501 + def ping_agentless_host_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """ping to the agentless host in the Server # noqa: E501 - Delete Run-as user from server # noqa: E501 + Ping an Agentless Host. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_run_as_user_with_http_info(server, agent, user, async_req=True) + + >>> thread = api.ping_agentless_host_with_http_info(server, agentlesshost, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agentlesshost: The Agentless Host. (required) + :type agentlesshost: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "user"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'agentlesshost' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_run_as_user" % key + " to method ping_agentless_host" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `delete_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `delete_run_as_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `ping_agentless_host`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `ping_agentless_host`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/runasuser/{agent}/{user}", - "DELETE", + '/config/server/{server}/agentlesshost/{agentlesshost}/ping', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_secret(self, name, **kwargs): # noqa: E501 - """Delete an existing secret # noqa: E501 + def poll_add_ssh_key_request_by_polling_id(self, polling_id, **kwargs): # noqa: E501 + """Polling request for async Add an SSH key to the control-m server. # noqa: E501 - Delete an existing secret from the secrets vault. # noqa: E501 + Polling request used to poll previous Add an SSH key to the control-m server requests by polling id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_secret(name, async_req=True) + + >>> thread = api.poll_add_ssh_key_request_by_polling_id(polling_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The name of the secret to update (required) - :return: SuccessData + :param polling_id: The request's returned polling ID valid for this session only. (required) + :type polling_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: AddSshKeyPollingResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_secret_with_http_info(name, **kwargs) # noqa: E501 - else: - (data) = self.delete_secret_with_http_info(name, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.poll_add_ssh_key_request_by_polling_id_with_http_info(polling_id, **kwargs) # noqa: E501 - def delete_secret_with_http_info(self, name, **kwargs): # noqa: E501 - """Delete an existing secret # noqa: E501 + def poll_add_ssh_key_request_by_polling_id_with_http_info(self, polling_id, **kwargs): # noqa: E501 + """Polling request for async Add an SSH key to the control-m server. # noqa: E501 - Delete an existing secret from the secrets vault. # noqa: E501 + Polling request used to poll previous Add an SSH key to the control-m server requests by polling id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_secret_with_http_info(name, async_req=True) + + >>> thread = api.poll_add_ssh_key_request_by_polling_id_with_http_info(polling_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The name of the secret to update (required) - :return: SuccessData + :param polling_id: The request's returned polling ID valid for this session only. (required) + :type polling_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(AddSshKeyPollingResult, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'polling_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_secret" % key + " to method poll_add_ssh_key_request_by_polling_id" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_secret`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'polling_id' is set + if self.api_client.client_side_validation and ('polling_id' not in local_var_params or # noqa: E501 + local_var_params['polling_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `polling_id` when calling `poll_add_ssh_key_request_by_polling_id`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'polling_id' in local_var_params: + path_params['pollingId'] = local_var_params['polling_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AddSshKeyPollingResult", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/secret/{name}", - "DELETE", + '/config/sshkey/add/polling/{pollingId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_user(self, user, **kwargs): # noqa: E501 - """Delete user # noqa: E501 + def recycle_item(self, id, **kwargs): # noqa: E501 + """recycle item # noqa: E501 - Delete user # noqa: E501 + Recycle an item # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_user(user, async_req=True) + + >>> thread = api.recycle_item(id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: The user name. (required) - :return: SuccessData + :param id: item data (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_user_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.delete_user_with_http_info(user, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.recycle_item_with_http_info(id, **kwargs) # noqa: E501 - def delete_user_with_http_info(self, user, **kwargs): # noqa: E501 - """Delete user # noqa: E501 + def recycle_item_with_http_info(self, id, **kwargs): # noqa: E501 + """recycle item # noqa: E501 - Delete user # noqa: E501 + Recycle an item # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_user_with_http_info(user, async_req=True) + + >>> thread = api.recycle_item_with_http_info(id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: The user name. (required) - :return: SuccessData + :param id: item data (required) + :type id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_user" % key + " to method recycle_item" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `delete_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `recycle_item`") # noqa: E501 collection_formats = {} path_params = {} - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user/{user}", - "DELETE", + '/config/item/{id}/recycle', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_zos_template(self, server, agent, template_name, **kwargs): # noqa: E501 - """Delete z/OS Template # noqa: E501 + def refresh_server_system_settings(self, server, **kwargs): # noqa: E501 + """Refresh the Control-M server system settings # noqa: E501 - Delete z/OS Template # noqa: E501 + Refresh the Control-M server system settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_zos_template(server, agent, template_name, async_req=True) + + >>> thread = api.refresh_server_system_settings(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The z/OS Template Name (required) - :return: SuccessData + :param server: The server for which system settings need to be refreshed (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_zos_template_with_http_info( - server, agent, template_name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_zos_template_with_http_info( - server, agent, template_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.refresh_server_system_settings_with_http_info(server, **kwargs) # noqa: E501 - def delete_zos_template_with_http_info( - self, server, agent, template_name, **kwargs - ): # noqa: E501 - """Delete z/OS Template # noqa: E501 + def refresh_server_system_settings_with_http_info(self, server, **kwargs): # noqa: E501 + """Refresh the Control-M server system settings # noqa: E501 - Delete z/OS Template # noqa: E501 + Refresh the Control-M server system settings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_zos_template_with_http_info(server, agent, template_name, async_req=True) + + >>> thread = api.refresh_server_system_settings_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The z/OS Template Name (required) - :return: SuccessData + :param server: The server for which system settings need to be refreshed (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "template_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_zos_template" % key + " to method refresh_server_system_settings" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_zos_template`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `delete_zos_template`" - ) # noqa: E501 - # verify the required parameter 'template_name' is set - if self.api_client.client_side_validation and ( - "template_name" not in params or params["template_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `template_name` when calling `delete_zos_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `refresh_server_system_settings`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "template_name" in params: - path_params["templateName"] = params["template_name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/zostemplate/{templateName}", - "DELETE", + '/config/systemsettings/server/{server}/refresh', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def deploy_agent_certificate( - self, server, agent, crt_file, ca_chain_file, **kwargs - ): # noqa: E501 - """Deploy certificate (CRT). # noqa: E501 + def remove_controlm_server(self, server, **kwargs): # noqa: E501 + """Delete Server # noqa: E501 - Deploy certificate (CRT) on SSL configured Agent. # noqa: E501 + Delete Server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.deploy_agent_certificate(server, agent, crt_file, ca_chain_file, async_req=True) + + >>> thread = api.remove_controlm_server(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :param file crt_file: The CRT file path. (required) - :param file ca_chain_file: The CA Chain file path. (required) - :return: SuccessData + :param server: Server host name. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.deploy_agent_certificate_with_http_info( - server, agent, crt_file, ca_chain_file, **kwargs - ) # noqa: E501 - else: - (data) = self.deploy_agent_certificate_with_http_info( - server, agent, crt_file, ca_chain_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_controlm_server_with_http_info(server, **kwargs) # noqa: E501 - def deploy_agent_certificate_with_http_info( - self, server, agent, crt_file, ca_chain_file, **kwargs - ): # noqa: E501 - """Deploy certificate (CRT). # noqa: E501 + def remove_controlm_server_with_http_info(self, server, **kwargs): # noqa: E501 + """Delete Server # noqa: E501 - Deploy certificate (CRT) on SSL configured Agent. # noqa: E501 + Delete Server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.deploy_agent_certificate_with_http_info(server, agent, crt_file, ca_chain_file, async_req=True) + + >>> thread = api.remove_controlm_server_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :param file crt_file: The CRT file path. (required) - :param file ca_chain_file: The CA Chain file path. (required) - :return: SuccessData + :param server: Server host name. (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "crt_file", "ca_chain_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method deploy_agent_certificate" % key + " to method remove_controlm_server" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `deploy_agent_certificate`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `deploy_agent_certificate`" - ) # noqa: E501 - # verify the required parameter 'crt_file' is set - if self.api_client.client_side_validation and ( - "crt_file" not in params or params["crt_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `crt_file` when calling `deploy_agent_certificate`" - ) # noqa: E501 - # verify the required parameter 'ca_chain_file' is set - if self.api_client.client_side_validation and ( - "ca_chain_file" not in params or params["ca_chain_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `ca_chain_file` when calling `deploy_agent_certificate`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `remove_controlm_server`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "crt_file" in params: - local_var_files["crtFile"] = params["crt_file"] # noqa: E501 - if "ca_chain_file" in params: - local_var_files["caChainFile"] = params["ca_chain_file"] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/crt", - "POST", + '/config/server/{server}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def disable_agent(self, server, agent, **kwargs): # noqa: E501 - """disable agent from the Server # noqa: E501 + def remove_ctm_gateway(self, server, gtw_host_name, **kwargs): # noqa: E501 + """Delete gateway # noqa: E501 - Disable an Agent. # noqa: E501 + Delete gateway # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.disable_agent(server, agent, async_req=True) + + >>> thread = api.remove_ctm_gateway(server, gtw_host_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected too. (required) - :param str agent: The Agent to be disabled. (required) - :return: SuccessData + :param server: Control-M/Server host (required) + :type server: str + :param gtw_host_name: Gateway name (required) + :type gtw_host_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.disable_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.disable_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_ctm_gateway_with_http_info(server, gtw_host_name, **kwargs) # noqa: E501 - def disable_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """disable agent from the Server # noqa: E501 + def remove_ctm_gateway_with_http_info(self, server, gtw_host_name, **kwargs): # noqa: E501 + """Delete gateway # noqa: E501 - Disable an Agent. # noqa: E501 + Delete gateway # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.disable_agent_with_http_info(server, agent, async_req=True) + + >>> thread = api.remove_ctm_gateway_with_http_info(server, gtw_host_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected too. (required) - :param str agent: The Agent to be disabled. (required) - :return: SuccessData + :param server: Control-M/Server host (required) + :type server: str + :param gtw_host_name: Gateway name (required) + :type gtw_host_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'gtw_host_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method disable_agent" % key + " to method remove_ctm_gateway" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `disable_agent`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `disable_agent`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `remove_ctm_gateway`") # noqa: E501 + # verify the required parameter 'gtw_host_name' is set + if self.api_client.client_side_validation and ('gtw_host_name' not in local_var_params or # noqa: E501 + local_var_params['gtw_host_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gtw_host_name` when calling `remove_ctm_gateway`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'gtw_host_name' in local_var_params: + path_params['gtwHostName'] = local_var_params['gtw_host_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/disable", - "POST", + '/config/server/{server}/gateway/{gtwHostName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def enable_agent(self, server, agent, **kwargs): # noqa: E501 - """enable agent from the Server # noqa: E501 + def remove_gateway(self, gateway_name, **kwargs): # noqa: E501 + """remove gateway. # noqa: E501 - Enable an Agent. This command does not install or configure the agent. It only enable existing agent in the system. # noqa: E501 + remove gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.enable_agent(server, agent, async_req=True) + + >>> thread = api.remove_gateway(gateway_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected too. (required) - :param str agent: The Agent to be enabled. (required) - :return: SuccessData + :param gateway_name: gateway name (required) + :type gateway_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.enable_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.enable_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_gateway_with_http_info(gateway_name, **kwargs) # noqa: E501 - def enable_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """enable agent from the Server # noqa: E501 + def remove_gateway_with_http_info(self, gateway_name, **kwargs): # noqa: E501 + """remove gateway. # noqa: E501 - Enable an Agent. This command does not install or configure the agent. It only enable existing agent in the system. # noqa: E501 + remove gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.enable_agent_with_http_info(server, agent, async_req=True) + + >>> thread = api.remove_gateway_with_http_info(gateway_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected too. (required) - :param str agent: The Agent to be enabled. (required) - :return: SuccessData + :param gateway_name: gateway name (required) + :type gateway_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'gateway_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method enable_agent" % key + " to method remove_gateway" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `enable_agent`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `enable_agent`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'gateway_name' is set + if self.api_client.client_side_validation and ('gateway_name' not in local_var_params or # noqa: E501 + local_var_params['gateway_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gateway_name` when calling `remove_gateway`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'gateway_name' in local_var_params: + path_params['gatewayName'] = local_var_params['gateway_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/enable", - "POST", + '/config/mft/gateway/{gatewayName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def failover(self, server, **kwargs): # noqa: E501 - """Perform Manual Failover on a specified Server # noqa: E501 + def remove_gateway_for_site(self, site_name, gateway_name, **kwargs): # noqa: E501 + """remove gateway for site. # noqa: E501 - Perform Manual Failover on a specified Server # noqa: E501 + remove gateway for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.failover(server, async_req=True) + + >>> thread = api.remove_gateway_for_site(site_name, gateway_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param gateway_name: gateway name (required) + :type gateway_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.failover_with_http_info(server, **kwargs) # noqa: E501 - else: - (data) = self.failover_with_http_info(server, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_gateway_for_site_with_http_info(site_name, gateway_name, **kwargs) # noqa: E501 - def failover_with_http_info(self, server, **kwargs): # noqa: E501 - """Perform Manual Failover on a specified Server # noqa: E501 + def remove_gateway_for_site_with_http_info(self, site_name, gateway_name, **kwargs): # noqa: E501 + """remove gateway for site. # noqa: E501 - Perform Manual Failover on a specified Server # noqa: E501 + remove gateway for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.failover_with_http_info(server, async_req=True) + + >>> thread = api.remove_gateway_for_site_with_http_info(site_name, gateway_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param gateway_name: gateway name (required) + :type gateway_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'site_name', + 'gateway_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method failover" % key + " to method remove_gateway_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `failover`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `remove_gateway_for_site`") # noqa: E501 + # verify the required parameter 'gateway_name' is set + if self.api_client.client_side_validation and ('gateway_name' not in local_var_params or # noqa: E501 + local_var_params['gateway_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gateway_name` when calling `remove_gateway_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'gateway_name' in local_var_params: + path_params['gatewayName'] = local_var_params['gateway_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/failover", - "PUT", + '/config/mfte/site/{siteName}/gateway/{gatewayName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def generate_mft_rsa_ssh_key( - self, server, agent, ssh_key_properties, **kwargs - ): # noqa: E501 - """Generate RSA SSH Key # noqa: E501 + def remove_hub_from_cluster(self, agentname, **kwargs): # noqa: E501 + """remove hub from cluster. # noqa: E501 - Generate RSA SSH Key pair for SFTP account authentication # noqa: E501 + remove hub from cluster. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.generate_mft_rsa_ssh_key(server, agent, ssh_key_properties, async_req=True) + + >>> thread = api.remove_hub_from_cluster(agentname, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param SshKeyProperties ssh_key_properties: Ssh Key pair properites (required) - :return: SuccessData + :param agentname: Agent name (required) + :type agentname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.generate_mft_rsa_ssh_key_with_http_info( - server, agent, ssh_key_properties, **kwargs - ) # noqa: E501 - else: - (data) = self.generate_mft_rsa_ssh_key_with_http_info( - server, agent, ssh_key_properties, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_hub_from_cluster_with_http_info(agentname, **kwargs) # noqa: E501 - def generate_mft_rsa_ssh_key_with_http_info( - self, server, agent, ssh_key_properties, **kwargs - ): # noqa: E501 - """Generate RSA SSH Key # noqa: E501 + def remove_hub_from_cluster_with_http_info(self, agentname, **kwargs): # noqa: E501 + """remove hub from cluster. # noqa: E501 - Generate RSA SSH Key pair for SFTP account authentication # noqa: E501 + remove hub from cluster. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.generate_mft_rsa_ssh_key_with_http_info(server, agent, ssh_key_properties, async_req=True) + + >>> thread = api.remove_hub_from_cluster_with_http_info(agentname, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param SshKeyProperties ssh_key_properties: Ssh Key pair properites (required) - :return: SuccessData + :param agentname: Agent name (required) + :type agentname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "ssh_key_properties"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'agentname' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method generate_mft_rsa_ssh_key" % key + " to method remove_hub_from_cluster" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `generate_mft_rsa_ssh_key`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `generate_mft_rsa_ssh_key`" - ) # noqa: E501 - # verify the required parameter 'ssh_key_properties' is set - if self.api_client.client_side_validation and ( - "ssh_key_properties" not in params or params["ssh_key_properties"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `ssh_key_properties` when calling `generate_mft_rsa_ssh_key`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'agentname' is set + if self.api_client.client_side_validation and ('agentname' not in local_var_params or # noqa: E501 + local_var_params['agentname'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentname` when calling `remove_hub_from_cluster`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'agentname' in local_var_params: + path_params['agentname'] = local_var_params['agentname'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "ssh_key_properties" in params: - body_params = params["ssh_key_properties"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/ssh/key", - "POST", + '/config/mft/cluster/hub/{agentname}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_agent_certificate_expiration_date( - self, server, agent, **kwargs - ): # noqa: E501 - """Get certificate expiration date. # noqa: E501 + def remove_hub_from_cluster_for_site(self, site_name, agentname, **kwargs): # noqa: E501 + """remove hub from cluster for site. # noqa: E501 - Get the certificate expiration date of SSL configured Agent. # noqa: E501 + remove hub from cluster for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_agent_certificate_expiration_date(server, agent, async_req=True) + + >>> thread = api.remove_hub_from_cluster_for_site(site_name, agentname, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :return: AgentCertificateExpirationData + :param site_name: site name (required) + :type site_name: str + :param agentname: Agent name (required) + :type agentname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_agent_certificate_expiration_date_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.get_agent_certificate_expiration_date_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_hub_from_cluster_for_site_with_http_info(site_name, agentname, **kwargs) # noqa: E501 - def get_agent_certificate_expiration_date_with_http_info( - self, server, agent, **kwargs - ): # noqa: E501 - """Get certificate expiration date. # noqa: E501 + def remove_hub_from_cluster_for_site_with_http_info(self, site_name, agentname, **kwargs): # noqa: E501 + """remove hub from cluster for site. # noqa: E501 - Get the certificate expiration date of SSL configured Agent. # noqa: E501 + remove hub from cluster for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_agent_certificate_expiration_date_with_http_info(server, agent, async_req=True) + + >>> thread = api.remove_hub_from_cluster_for_site_with_http_info(site_name, agentname, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :return: AgentCertificateExpirationData + :param site_name: site name (required) + :type site_name: str + :param agentname: Agent name (required) + :type agentname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'agentname' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_agent_certificate_expiration_date" % key + " to method remove_hub_from_cluster_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_agent_certificate_expiration_date`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_agent_certificate_expiration_date`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `remove_hub_from_cluster_for_site`") # noqa: E501 + # verify the required parameter 'agentname' is set + if self.api_client.client_side_validation and ('agentname' not in local_var_params or # noqa: E501 + local_var_params['agentname'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentname` when calling `remove_hub_from_cluster_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'agentname' in local_var_params: + path_params['agentname'] = local_var_params['agentname'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/crt/expiration", - "GET", + '/config/mfte/site/{siteName}/cluster/hub/{agentname}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AgentCertificateExpirationData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_agent_parameters(self, server, agent, **kwargs): # noqa: E501 - """get agent parameters # noqa: E501 + def remove_old_alerts(self, date, **kwargs): # noqa: E501 + """remove old alerts. # noqa: E501 - Get all the parameters of the specified Agent. # noqa: E501 + remove alerts until specified date. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_agent_parameters(server, agent, async_req=True) + + >>> thread = api.remove_old_alerts(date, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str agent: The name of the agent to query. (required) - :param bool extended_data: True to return more agent parameters. HIDDEN - :return: KeyValueListResult + :param date: date (required) + :type date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_agent_parameters_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.get_agent_parameters_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_old_alerts_with_http_info(date, **kwargs) # noqa: E501 - def get_agent_parameters_with_http_info( - self, server, agent, **kwargs - ): # noqa: E501 - """get agent parameters # noqa: E501 + def remove_old_alerts_with_http_info(self, date, **kwargs): # noqa: E501 + """remove old alerts. # noqa: E501 - Get all the parameters of the specified Agent. # noqa: E501 + remove alerts until specified date. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_agent_parameters_with_http_info(server, agent, async_req=True) + + >>> thread = api.remove_old_alerts_with_http_info(date, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str agent: The name of the agent to query. (required) - :param bool extended_data: True to return more agent parameters. HIDDEN - :return: KeyValueListResult + :param date: date (required) + :type date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "extended_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'date' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_agent_parameters" % key + " to method remove_old_alerts" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_agent_parameters`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_agent_parameters`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'date' is set + if self.api_client.client_side_validation and ('date' not in local_var_params or # noqa: E501 + local_var_params['date'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `date` when calling `remove_old_alerts`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'date' in local_var_params: + path_params['date'] = local_var_params['date'] # noqa: E501 query_params = [] - if "extended_data" in params: - query_params.append(("extendedData", params["extended_data"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/params", - "GET", + '/config/em/alerts/{date}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="KeyValueListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_agents(self, server, **kwargs): # noqa: E501 - """get Server agents # noqa: E501 + def remove_role_from_user(self, user, role, **kwargs): # noqa: E501 + """Remove a role from a user # noqa: E501 - Get all the agents of the specified Server. # noqa: E501 + Remove a role from a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_agents(server, async_req=True) + + >>> thread = api.remove_role_from_user(user, role, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server to query. Optionally you can filter agent name of host or alias of the Agent (required) - :param str agent: Optionally case insensitive agent name filter of host or alias of the Agent. `ctm server:agents::get Server AgentName` returns all agents which names start with `agentname` - :return: AgentDetailsList + :param user: Name of user (required) + :type user: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_agents_with_http_info(server, **kwargs) # noqa: E501 - else: - (data) = self.get_agents_with_http_info(server, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_role_from_user_with_http_info(user, role, **kwargs) # noqa: E501 - def get_agents_with_http_info(self, server, **kwargs): # noqa: E501 - """get Server agents # noqa: E501 + def remove_role_from_user_with_http_info(self, user, role, **kwargs): # noqa: E501 + """Remove a role from a user # noqa: E501 - Get all the agents of the specified Server. # noqa: E501 + Remove a role from a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_agents_with_http_info(server, async_req=True) + + >>> thread = api.remove_role_from_user_with_http_info(user, role, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server to query. Optionally you can filter agent name of host or alias of the Agent (required) - :param str agent: Optionally case insensitive agent name filter of host or alias of the Agent. `ctm server:agents::get Server AgentName` returns all agents which names start with `agentname` - :return: AgentDetailsList + :param user: Name of user (required) + :type user: str + :param role: Name of role (required) + :type role: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user', + 'role' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_agents" % key + " to method remove_role_from_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_agents`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `remove_role_from_user`") # noqa: E501 + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `remove_role_from_user`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 query_params = [] - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agents", - "GET", + '/config/authorization/user/{user}/role/{role}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AgentDetailsList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_all_archive_rules(self, **kwargs): # noqa: E501 - """Get all Workload Archiving rules # noqa: E501 + def remove_wda_gateway(self, server, agent, gateway_name, **kwargs): # noqa: E501 + """remove DataAssurance gateway. # noqa: E501 - Get all the Archiving rules # noqa: E501 + remove DataAssurance gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_archive_rules(async_req=True) + + >>> thread = api.remove_wda_gateway(server, agent, gateway_name, async_req=True) >>> result = thread.get() - :param async_req bool - :return: ArchiveRulesList + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param gateway_name: DataAssurance gateway name (required) + :type gateway_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_all_archive_rules_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_all_archive_rules_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.remove_wda_gateway_with_http_info(server, agent, gateway_name, **kwargs) # noqa: E501 - def get_all_archive_rules_with_http_info(self, **kwargs): # noqa: E501 - """Get all Workload Archiving rules # noqa: E501 + def remove_wda_gateway_with_http_info(self, server, agent, gateway_name, **kwargs): # noqa: E501 + """remove DataAssurance gateway. # noqa: E501 - Get all the Archiving rules # noqa: E501 + remove DataAssurance gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_archive_rules_with_http_info(async_req=True) + + >>> thread = api.remove_wda_gateway_with_http_info(server, agent, gateway_name, async_req=True) >>> result = thread.get() - :param async_req bool - :return: ArchiveRulesList + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param gateway_name: DataAssurance gateway name (required) + :type gateway_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'gateway_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_archive_rules" % key + " to method remove_wda_gateway" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `remove_wda_gateway`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `remove_wda_gateway`") # noqa: E501 + # verify the required parameter 'gateway_name' is set + if self.api_client.client_side_validation and ('gateway_name' not in local_var_params or # noqa: E501 + local_var_params['gateway_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gateway_name` when calling `remove_wda_gateway`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'gateway_name' in local_var_params: + path_params['gatewayName'] = local_var_params['gateway_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/archive/rules", - "GET", + '/config/dataAssurance/{server}/{agent}/gateway/{gatewayName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ArchiveRulesList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_all_authorization_roles(self, **kwargs): # noqa: E501 - """Get Authorization Roles # noqa: E501 + def rename_role(self, role, role_properties, **kwargs): # noqa: E501 + """Rename Authorization Role # noqa: E501 - Get Authorization Roles # noqa: E501 + Rename Authorization Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_authorization_roles(async_req=True) + + >>> thread = api.rename_role(role, role_properties, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. - :param str description: The Role description. - :return: RoleHeaderList + :param role: The Role name. (required) + :type role: str + :param role_properties: The new role name. (required) + :type role_properties: RoleProperties + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_all_authorization_roles_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_all_authorization_roles_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.rename_role_with_http_info(role, role_properties, **kwargs) # noqa: E501 - def get_all_authorization_roles_with_http_info(self, **kwargs): # noqa: E501 - """Get Authorization Roles # noqa: E501 + def rename_role_with_http_info(self, role, role_properties, **kwargs): # noqa: E501 + """Rename Authorization Role # noqa: E501 - Get Authorization Roles # noqa: E501 + Rename Authorization Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_authorization_roles_with_http_info(async_req=True) + + >>> thread = api.rename_role_with_http_info(role, role_properties, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. - :param str description: The Role description. - :return: RoleHeaderList + :param role: The Role name. (required) + :type role: str + :param role_properties: The new role name. (required) + :type role_properties: RoleProperties + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["role", "description"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'role', + 'role_properties' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_authorization_roles" % key + " to method rename_role" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `rename_role`") # noqa: E501 + # verify the required parameter 'role_properties' is set + if self.api_client.client_side_validation and ('role_properties' not in local_var_params or # noqa: E501 + local_var_params['role_properties'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role_properties` when calling `rename_role`") # noqa: E501 collection_formats = {} path_params = {} + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 query_params = [] - if "role" in params: - query_params.append(("role", params["role"])) # noqa: E501 - if "description" in params: - query_params.append(("description", params["description"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'role_properties' in local_var_params: + body_params = local_var_params['role_properties'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/roles", - "GET", + '/config/authorization/role/{role}/rename', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RoleHeaderList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_all_organization_groups(self, **kwargs): # noqa: E501 - """Get All organization groups # noqa: E501 + def replicate_database(self, server, **kwargs): # noqa: E501 + """Trigger DB replication For CTM High Availability # noqa: E501 - Get All organization groups # noqa: E501 + Trigger DB replication on a specified Server For CTM High Availability # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_organization_groups(async_req=True) + + >>> thread = api.replicate_database(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str organizationgroup: The organization group name. - :return: list[str] + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_all_organization_groups_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_all_organization_groups_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.replicate_database_with_http_info(server, **kwargs) # noqa: E501 - def get_all_organization_groups_with_http_info(self, **kwargs): # noqa: E501 - """Get All organization groups # noqa: E501 + def replicate_database_with_http_info(self, server, **kwargs): # noqa: E501 + """Trigger DB replication For CTM High Availability # noqa: E501 - Get All organization groups # noqa: E501 + Trigger DB replication on a specified Server For CTM High Availability # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_organization_groups_with_http_info(async_req=True) + + >>> thread = api.replicate_database_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str organizationgroup: The organization group name. - :return: list[str] + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["organizationgroup"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_organization_groups" % key + " to method replicate_database" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `replicate_database`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - if "organizationgroup" in params: - query_params.append( - ("organizationgroup", params["organizationgroup"]) - ) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/organizationgroups", - "GET", + '/config/server/{server}/database/replicate', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[str]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_all_roles_associated_with_organization_group( - self, organizationgroup, **kwargs - ): # noqa: E501 - """Get Authorization Roles associated with an organization group # noqa: E501 + def resume_ctm(self, server, **kwargs): # noqa: E501 + """Resume the CTM server. # noqa: E501 - Get Authorization Roles associated with an organization group # noqa: E501 + When server is resumed, the server is still up and running but do not execute new jobs. Any jobs that are already executing will continue to be. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_roles_associated_with_organization_group(organizationgroup, async_req=True) + + >>> thread = api.resume_ctm(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str organizationgroup: Name of organization group (required) - :param str role: The Role name. - :return: list[str] + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_all_roles_associated_with_organization_group_with_http_info( - organizationgroup, **kwargs - ) # noqa: E501 - else: - ( - data - ) = self.get_all_roles_associated_with_organization_group_with_http_info( - organizationgroup, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.resume_ctm_with_http_info(server, **kwargs) # noqa: E501 - def get_all_roles_associated_with_organization_group_with_http_info( - self, organizationgroup, **kwargs - ): # noqa: E501 - """Get Authorization Roles associated with an organization group # noqa: E501 + def resume_ctm_with_http_info(self, server, **kwargs): # noqa: E501 + """Resume the CTM server. # noqa: E501 - Get Authorization Roles associated with an organization group # noqa: E501 + When server is resumed, the server is still up and running but do not execute new jobs. Any jobs that are already executing will continue to be. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_roles_associated_with_organization_group_with_http_info(organizationgroup, async_req=True) + + >>> thread = api.resume_ctm_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str organizationgroup: Name of organization group (required) - :param str role: The Role name. - :return: list[str] + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["organizationgroup", "role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_roles_associated_with_organization_group" % key + " to method resume_ctm" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'organizationgroup' is set - if self.api_client.client_side_validation and ( - "organizationgroup" not in params or params["organizationgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `organizationgroup` when calling `get_all_roles_associated_with_organization_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `resume_ctm`") # noqa: E501 collection_formats = {} path_params = {} - if "organizationgroup" in params: - path_params["organizationgroup"] = params["organizationgroup"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - if "role" in params: - query_params.append(("role", params["role"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: None, + 403: None, + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/organizationgroup/{organizationgroup}/roles", - "GET", + '/config/server/{server}/resume', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[str]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_all_users(self, **kwargs): # noqa: E501 - """Get users # noqa: E501 + def send_archive_cleanup_request(self, **kwargs): # noqa: E501 + """Deletes data (jobs including outputs and logs) from the Workload Archiving database. # noqa: E501 - Get users # noqa: E501 + Deletes data (jobs including outputs and logs) by search criteria from the Workload Archiving database. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_users(async_req=True) + + >>> thread = api.send_archive_cleanup_request(async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The user name. - :param str full_name: The user full name. - :param str description: The user description. - :return: list[UserHeader] + :param application: Job's application. + :type application: str + :param application_exceptions: Cleanup should skip job's application that are mentioned in exceptions + :type application_exceptions: str + :param sub_application: Job's sub application + :type sub_application: str + :param sub_application_exceptions: Job's sub application exception + :type sub_application_exceptions: str + :param ctm: server name + :type ctm: str + :param server: Server name + :type server: str + :param ctm_exceptions: server exceptions + :type ctm_exceptions: str + :param server_exceptions: Server exceptions + :type server_exceptions: str + :param folder: Job's folder. + :type folder: str + :param folder_exceptions: Job's folder exceptions + :type folder_exceptions: str + :param jobname: Job's name + :type jobname: str + :param jobname_exceptions: Job's name exceptions + :type jobname_exceptions: str + :param library: Job's library + :type library: str + :param library_exceptions: Job's library exceptions + :type library_exceptions: str + :param rule_name: Job's archive rule + :type rule_name: str + :param job_status: The job's end status. + :type job_status: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_all_users_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_all_users_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.send_archive_cleanup_request_with_http_info(**kwargs) # noqa: E501 - def get_all_users_with_http_info(self, **kwargs): # noqa: E501 - """Get users # noqa: E501 + def send_archive_cleanup_request_with_http_info(self, **kwargs): # noqa: E501 + """Deletes data (jobs including outputs and logs) from the Workload Archiving database. # noqa: E501 - Get users # noqa: E501 + Deletes data (jobs including outputs and logs) by search criteria from the Workload Archiving database. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_users_with_http_info(async_req=True) + + >>> thread = api.send_archive_cleanup_request_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The user name. - :param str full_name: The user full name. - :param str description: The user description. - :return: list[UserHeader] + :param application: Job's application. + :type application: str + :param application_exceptions: Cleanup should skip job's application that are mentioned in exceptions + :type application_exceptions: str + :param sub_application: Job's sub application + :type sub_application: str + :param sub_application_exceptions: Job's sub application exception + :type sub_application_exceptions: str + :param ctm: server name + :type ctm: str + :param server: Server name + :type server: str + :param ctm_exceptions: server exceptions + :type ctm_exceptions: str + :param server_exceptions: Server exceptions + :type server_exceptions: str + :param folder: Job's folder. + :type folder: str + :param folder_exceptions: Job's folder exceptions + :type folder_exceptions: str + :param jobname: Job's name + :type jobname: str + :param jobname_exceptions: Job's name exceptions + :type jobname_exceptions: str + :param library: Job's library + :type library: str + :param library_exceptions: Job's library exceptions + :type library_exceptions: str + :param rule_name: Job's archive rule + :type rule_name: str + :param job_status: The job's end status. + :type job_status: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "full_name", "description"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'application', + 'application_exceptions', + 'sub_application', + 'sub_application_exceptions', + 'ctm', + 'server', + 'ctm_exceptions', + 'server_exceptions', + 'folder', + 'folder_exceptions', + 'jobname', + 'jobname_exceptions', + 'library', + 'library_exceptions', + 'rule_name', + 'job_status' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_users" % key + " to method send_archive_cleanup_request" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - if "full_name" in params: - query_params.append(("fullName", params["full_name"])) # noqa: E501 - if "description" in params: - query_params.append(("description", params["description"])) # noqa: E501 - - header_params = {} + if 'application' in local_var_params and local_var_params['application'] is not None: # noqa: E501 + query_params.append(('application', local_var_params['application'])) # noqa: E501 + if 'application_exceptions' in local_var_params and local_var_params['application_exceptions'] is not None: # noqa: E501 + query_params.append(('applicationExceptions', local_var_params['application_exceptions'])) # noqa: E501 + if 'sub_application' in local_var_params and local_var_params['sub_application'] is not None: # noqa: E501 + query_params.append(('subApplication', local_var_params['sub_application'])) # noqa: E501 + if 'sub_application_exceptions' in local_var_params and local_var_params['sub_application_exceptions'] is not None: # noqa: E501 + query_params.append(('subApplicationExceptions', local_var_params['sub_application_exceptions'])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'ctm_exceptions' in local_var_params and local_var_params['ctm_exceptions'] is not None: # noqa: E501 + query_params.append(('ctmExceptions', local_var_params['ctm_exceptions'])) # noqa: E501 + if 'server_exceptions' in local_var_params and local_var_params['server_exceptions'] is not None: # noqa: E501 + query_params.append(('serverExceptions', local_var_params['server_exceptions'])) # noqa: E501 + if 'folder' in local_var_params and local_var_params['folder'] is not None: # noqa: E501 + query_params.append(('folder', local_var_params['folder'])) # noqa: E501 + if 'folder_exceptions' in local_var_params and local_var_params['folder_exceptions'] is not None: # noqa: E501 + query_params.append(('folderExceptions', local_var_params['folder_exceptions'])) # noqa: E501 + if 'jobname' in local_var_params and local_var_params['jobname'] is not None: # noqa: E501 + query_params.append(('jobname', local_var_params['jobname'])) # noqa: E501 + if 'jobname_exceptions' in local_var_params and local_var_params['jobname_exceptions'] is not None: # noqa: E501 + query_params.append(('jobnameExceptions', local_var_params['jobname_exceptions'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + if 'library_exceptions' in local_var_params and local_var_params['library_exceptions'] is not None: # noqa: E501 + query_params.append(('libraryExceptions', local_var_params['library_exceptions'])) # noqa: E501 + if 'rule_name' in local_var_params and local_var_params['rule_name'] is not None: # noqa: E501 + query_params.append(('ruleName', local_var_params['rule_name'])) # noqa: E501 + if 'job_status' in local_var_params and local_var_params['job_status'] is not None: # noqa: E501 + query_params.append(('jobStatus', local_var_params['job_status'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/users", - "GET", + '/config/archive/cleanup', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[UserHeader]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_archive_statistics(self, **kwargs): # noqa: E501 - """Get Workload Archiving statistics # noqa: E501 + def send_ctl_command(self, name, ctl_request_params, **kwargs): # noqa: E501 + """Run control shell command # noqa: E501 - Get list of statistical information for each Archiving rule and total information about the number of jobs that have been archived, data size of all job logs and outputs that have been archived, size of the Workload Archiving database including all tables and indexes and percentage of disk space used on the Workload Archiving server # noqa: E501 + Run CTM/EM server control shell command # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_archive_statistics(async_req=True) + + >>> thread = api.send_ctl_command(name, ctl_request_params, async_req=True) >>> result = thread.get() - :param async_req bool - :return: RulesStatisticListSummary + :param name: (required) + :type name: str + :param ctl_request_params: (required) + :type ctl_request_params: CtlRequestParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CtlResponse """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_archive_statistics_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_archive_statistics_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.send_ctl_command_with_http_info(name, ctl_request_params, **kwargs) # noqa: E501 - def get_archive_statistics_with_http_info(self, **kwargs): # noqa: E501 - """Get Workload Archiving statistics # noqa: E501 + def send_ctl_command_with_http_info(self, name, ctl_request_params, **kwargs): # noqa: E501 + """Run control shell command # noqa: E501 - Get list of statistical information for each Archiving rule and total information about the number of jobs that have been archived, data size of all job logs and outputs that have been archived, size of the Workload Archiving database including all tables and indexes and percentage of disk space used on the Workload Archiving server # noqa: E501 + Run CTM/EM server control shell command # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_archive_statistics_with_http_info(async_req=True) + + >>> thread = api.send_ctl_command_with_http_info(name, ctl_request_params, async_req=True) >>> result = thread.get() - :param async_req bool - :return: RulesStatisticListSummary + :param name: (required) + :type name: str + :param ctl_request_params: (required) + :type ctl_request_params: CtlRequestParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CtlResponse, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name', + 'ctl_request_params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_archive_statistics" % key + " to method send_ctl_command" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `send_ctl_command`") # noqa: E501 + # verify the required parameter 'ctl_request_params' is set + if self.api_client.client_side_validation and ('ctl_request_params' not in local_var_params or # noqa: E501 + local_var_params['ctl_request_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctl_request_params` when calling `send_ctl_command`") # noqa: E501 collection_formats = {} path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'ctl_request_params' in local_var_params: + body_params = local_var_params['ctl_request_params'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtlResponse", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/archive/statistics", - "GET", + '/config/server/{name}/ctl', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RulesStatisticListSummary", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_external_user_authorized_folders(self, name, **kwargs): # noqa: E501 - """Get MFT external user authorized folders # noqa: E501 + def set_active_shout_destination_list(self, server, listname, **kwargs): # noqa: E501 + """Activates the notification destinations list. # noqa: E501 - Get MFT external user authorized folders # noqa: E501 + Activates the notification destinations list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_external_user_authorized_folders(name, async_req=True) + + >>> thread = api.set_active_shout_destination_list(server, listname, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The external user name. (required) - :return: list[str] + :param server: Defines the name of the Server. (required) + :type server: str + :param listname: Defines the name of the notification destinations list. (required) + :type listname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_external_user_authorized_folders_with_http_info( - name, **kwargs - ) # noqa: E501 - else: - (data) = self.get_external_user_authorized_folders_with_http_info( - name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_active_shout_destination_list_with_http_info(server, listname, **kwargs) # noqa: E501 - def get_external_user_authorized_folders_with_http_info( - self, name, **kwargs - ): # noqa: E501 - """Get MFT external user authorized folders # noqa: E501 + def set_active_shout_destination_list_with_http_info(self, server, listname, **kwargs): # noqa: E501 + """Activates the notification destinations list. # noqa: E501 - Get MFT external user authorized folders # noqa: E501 + Activates the notification destinations list. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_external_user_authorized_folders_with_http_info(name, async_req=True) + + >>> thread = api.set_active_shout_destination_list_with_http_info(server, listname, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The external user name. (required) - :return: list[str] + :param server: Defines the name of the Server. (required) + :type server: str + :param listname: Defines the name of the notification destinations list. (required) + :type listname: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'listname' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_external_user_authorized_folders" % key + " to method set_active_shout_destination_list" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `get_external_user_authorized_folders`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `set_active_shout_destination_list`") # noqa: E501 + # verify the required parameter 'listname' is set + if self.api_client.client_side_validation and ('listname' not in local_var_params or # noqa: E501 + local_var_params['listname'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `listname` when calling `set_active_shout_destination_list`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'listname' in local_var_params: + path_params['listname'] = local_var_params['listname'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/externaluser/{name}/virtualfolders", - "GET", + '/config/server/{server}/notification/list/{listname}/setactive', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[str]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_external_users(self, **kwargs): # noqa: E501 - """Get MFT external users that match the search criteria. # noqa: E501 + def set_agent_parameter(self, server, agent, name, **kwargs): # noqa: E501 + """set agent parameter # noqa: E501 - Get MFT external users that match the search criteria. # noqa: E501 + Set the value of the specified parameter in the specified agent. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_external_users(async_req=True) + + >>> thread = api.set_agent_parameter(server, agent, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The user name. - :param str email: The user email. - :param str description: The user description. - :param str company: The user company. - :param str phone_number: The user phoneNumber. - :return: list[ExternalUserData] + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to update. (required) + :type agent: str + :param name: The parameter name. (required) + :type name: str + :param body: The new parameter value. + :type body: OptionalValue + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: KeyValue """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_external_users_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_external_users_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_agent_parameter_with_http_info(server, agent, name, **kwargs) # noqa: E501 - def get_external_users_with_http_info(self, **kwargs): # noqa: E501 - """Get MFT external users that match the search criteria. # noqa: E501 + def set_agent_parameter_with_http_info(self, server, agent, name, **kwargs): # noqa: E501 + """set agent parameter # noqa: E501 - Get MFT external users that match the search criteria. # noqa: E501 + Set the value of the specified parameter in the specified agent. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_external_users_with_http_info(async_req=True) + + >>> thread = api.set_agent_parameter_with_http_info(server, agent, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The user name. - :param str email: The user email. - :param str description: The user description. - :param str company: The user company. - :param str phone_number: The user phoneNumber. - :return: list[ExternalUserData] + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to update. (required) + :type agent: str + :param name: The parameter name. (required) + :type name: str + :param body: The new parameter value. + :type body: OptionalValue + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(KeyValue, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "name", - "email", - "description", - "company", - "phone_number", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'server', + 'agent', + 'name', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_external_users" % key + " to method set_agent_parameter" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `set_agent_parameter`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `set_agent_parameter`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `set_agent_parameter`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - if "email" in params: - query_params.append(("email", params["email"])) # noqa: E501 - if "description" in params: - query_params.append(("description", params["description"])) # noqa: E501 - if "company" in params: - query_params.append(("company", params["company"])) # noqa: E501 - if "phone_number" in params: - query_params.append(("phoneNumber", params["phone_number"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "KeyValue", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/externalusers", - "GET", + '/config/server/{server}/agent/{agent}/param/{name}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[ExternalUserData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_fts_settings(self, server, agent, **kwargs): # noqa: E501 - """Get File Transfer Server (FTS) configuration data. # noqa: E501 + def set_ctm_desired_state(self, server, state, **kwargs): # noqa: E501 + """Set server to desired state. # noqa: E501 - Get File Transfer Server (FTS) configuration data. # noqa: E501 + Set server to desired state - Up, Down, Recycle, Ignore. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_fts_settings(server, agent, async_req=True) + + >>> thread = api.set_ctm_desired_state(server, state, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :return: FtsSettingsData + :param server: (required) + :type server: str + :param state: (required) + :type state: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_fts_settings_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.get_fts_settings_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_ctm_desired_state_with_http_info(server, state, **kwargs) # noqa: E501 - def get_fts_settings_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """Get File Transfer Server (FTS) configuration data. # noqa: E501 + def set_ctm_desired_state_with_http_info(self, server, state, **kwargs): # noqa: E501 + """Set server to desired state. # noqa: E501 - Get File Transfer Server (FTS) configuration data. # noqa: E501 + Set server to desired state - Up, Down, Recycle, Ignore. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_fts_settings_with_http_info(server, agent, async_req=True) + + >>> thread = api.set_ctm_desired_state_with_http_info(server, state, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :return: FtsSettingsData + :param server: (required) + :type server: str + :param state: (required) + :type state: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'state' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_fts_settings" % key + " to method set_ctm_desired_state" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_fts_settings`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_fts_settings`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `set_ctm_desired_state`") # noqa: E501 + # verify the required parameter 'state' is set + if self.api_client.client_side_validation and ('state' not in local_var_params or # noqa: E501 + local_var_params['state'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `state` when calling `set_ctm_desired_state`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'state' in local_var_params: + path_params['state'] = local_var_params['state'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/fts/settings", - "GET", + '/config/server/{server}/desiredState/{state}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="FtsSettingsData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_hostgroups(self, server, **kwargs): # noqa: E501 - """get Server hostgroups # noqa: E501 + def set_data_assurance_configuration(self, server, agent, data_assurance_configration_data, **kwargs): # noqa: E501 + """set DataAssurance configuration. # noqa: E501 - Get all the hostgroups of the specified Server. # noqa: E501 + set DataAssurance configuration. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_hostgroups(server, async_req=True) + + >>> thread = api.set_data_assurance_configuration(server, agent, data_assurance_configration_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroups belong to. (required) - :return: StringListResult + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param data_assurance_configration_data: DataAssurance Configuration Data (required) + :type data_assurance_configration_data: DataAssuranceConfigrationData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_hostgroups_with_http_info(server, **kwargs) # noqa: E501 - else: - (data) = self.get_hostgroups_with_http_info(server, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_data_assurance_configuration_with_http_info(server, agent, data_assurance_configration_data, **kwargs) # noqa: E501 - def get_hostgroups_with_http_info(self, server, **kwargs): # noqa: E501 - """get Server hostgroups # noqa: E501 + def set_data_assurance_configuration_with_http_info(self, server, agent, data_assurance_configration_data, **kwargs): # noqa: E501 + """set DataAssurance configuration. # noqa: E501 - Get all the hostgroups of the specified Server. # noqa: E501 + set DataAssurance configuration. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_hostgroups_with_http_info(server, async_req=True) + + >>> thread = api.set_data_assurance_configuration_with_http_info(server, agent, data_assurance_configration_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroups belong to. (required) - :return: StringListResult + :param server: server name (required) + :type server: str + :param agent: agent name (required) + :type agent: str + :param data_assurance_configration_data: DataAssurance Configuration Data (required) + :type data_assurance_configration_data: DataAssuranceConfigrationData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'data_assurance_configration_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_hostgroups" % key + " to method set_data_assurance_configuration" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_hostgroups`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `set_data_assurance_configuration`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `set_data_assurance_configuration`") # noqa: E501 + # verify the required parameter 'data_assurance_configration_data' is set + if self.api_client.client_side_validation and ('data_assurance_configration_data' not in local_var_params or # noqa: E501 + local_var_params['data_assurance_configration_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `data_assurance_configration_data` when calling `set_data_assurance_configuration`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'data_assurance_configration_data' in local_var_params: + body_params = local_var_params['data_assurance_configration_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/hostgroups", - "GET", + '/config/server/{server}/agent/{agent}/dataAssurance/configuration', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="StringListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_hosts_in_group(self, server, hostgroup, **kwargs): # noqa: E501 - """get hostgroup agents # noqa: E501 + def set_em_as_primary(self, **kwargs): # noqa: E501 + """Set the secondary EM server as Primary # noqa: E501 - Get the agents that compose the specified hostgroup # noqa: E501 + Set the secondary EM server as Primary. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_hosts_in_group(server, hostgroup, async_req=True) + + >>> thread = api.set_em_as_primary(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroup belongs to. (required) - :param str hostgroup: The hostgroup name (required) - :return: AgentsInGroupListResult + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_hosts_in_group_with_http_info( - server, hostgroup, **kwargs - ) # noqa: E501 - else: - (data) = self.get_hosts_in_group_with_http_info( - server, hostgroup, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_em_as_primary_with_http_info(**kwargs) # noqa: E501 - def get_hosts_in_group_with_http_info( - self, server, hostgroup, **kwargs - ): # noqa: E501 - """get hostgroup agents # noqa: E501 + def set_em_as_primary_with_http_info(self, **kwargs): # noqa: E501 + """Set the secondary EM server as Primary # noqa: E501 - Get the agents that compose the specified hostgroup # noqa: E501 + Set the secondary EM server as Primary. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_hosts_in_group_with_http_info(server, hostgroup, async_req=True) + + >>> thread = api.set_em_as_primary_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the hostgroup belongs to. (required) - :param str hostgroup: The hostgroup name (required) - :return: AgentsInGroupListResult + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "hostgroup"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_hosts_in_group" % key + " to method set_em_as_primary" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_hosts_in_group`" - ) # noqa: E501 - # verify the required parameter 'hostgroup' is set - if self.api_client.client_side_validation and ( - "hostgroup" not in params or params["hostgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostgroup` when calling `get_hosts_in_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "hostgroup" in params: - path_params["hostgroup"] = params["hostgroup"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/hostgroup/{hostgroup}/agents", - "GET", + '/config/em/setasprimary', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AgentsInGroupListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_hub_status_details(self, node_id, **kwargs): # noqa: E501 - """Get hub status. # noqa: E501 + def set_server_system_setting(self, name, value, **kwargs): # noqa: E501 + """Set a system setting for Control-M server # noqa: E501 - Get hub status. # noqa: E501 + Set a system setting for Control-M server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_hub_status_details(node_id, async_req=True) + + >>> thread = api.set_server_system_setting(name, value, async_req=True) >>> result = thread.get() - :param async_req bool - :param str node_id: Node ID of the hub (required) - :return: str + :param name: Parameter name (required) + :type name: str + :param value: Parameter value (required) + :type value: str + :param server: Server to set the system settings. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_hub_status_details_with_http_info( - node_id, **kwargs - ) # noqa: E501 - else: - (data) = self.get_hub_status_details_with_http_info( - node_id, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_server_system_setting_with_http_info(name, value, **kwargs) # noqa: E501 - def get_hub_status_details_with_http_info(self, node_id, **kwargs): # noqa: E501 - """Get hub status. # noqa: E501 + def set_server_system_setting_with_http_info(self, name, value, **kwargs): # noqa: E501 + """Set a system setting for Control-M server # noqa: E501 - Get hub status. # noqa: E501 + Set a system setting for Control-M server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_hub_status_details_with_http_info(node_id, async_req=True) + + >>> thread = api.set_server_system_setting_with_http_info(name, value, async_req=True) >>> result = thread.get() - :param async_req bool - :param str node_id: Node ID of the hub (required) - :return: str + :param name: Parameter name (required) + :type name: str + :param value: Parameter value (required) + :type value: str + :param server: Server to set the system settings. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["node_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name', + 'value', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_hub_status_details" % key + " to method set_server_system_setting" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'node_id' is set - if self.api_client.client_side_validation and ( - "node_id" not in params or params["node_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `node_id` when calling `get_hub_status_details`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `set_server_system_setting`") # noqa: E501 + # verify the required parameter 'value' is set + if self.api_client.client_side_validation and ('value' not in local_var_params or # noqa: E501 + local_var_params['value'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `value` when calling `set_server_system_setting`") # noqa: E501 collection_formats = {} path_params = {} - if "node_id" in params: - path_params["nodeId"] = params["node_id"] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'value' in local_var_params: + path_params['value'] = local_var_params['value'] # noqa: E501 query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/hub/{nodeId}/status", - "GET", + '/config/systemsettings/server/{name}/{value}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_mft_configuration(self, server, agent, **kwargs): # noqa: E501 - """Get MFT Configuration # noqa: E501 + def set_system_param(self, name, new_value, **kwargs): # noqa: E501 + """set value of a an em system parameter # noqa: E501 - Get MFT Configuration # noqa: E501 + Set value of an enterprise management system parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_configuration(server, agent, async_req=True) + + >>> thread = api.set_system_param(name, new_value, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :return: MftConfigurationData + :param name: Parameter name (required) + :type name: str + :param new_value: Param new value (required) + :type new_value: Value + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_mft_configuration_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.get_mft_configuration_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_system_param_with_http_info(name, new_value, **kwargs) # noqa: E501 - def get_mft_configuration_with_http_info( - self, server, agent, **kwargs - ): # noqa: E501 - """Get MFT Configuration # noqa: E501 + def set_system_param_with_http_info(self, name, new_value, **kwargs): # noqa: E501 + """set value of a an em system parameter # noqa: E501 - Get MFT Configuration # noqa: E501 + Set value of an enterprise management system parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_configuration_with_http_info(server, agent, async_req=True) + + >>> thread = api.set_system_param_with_http_info(name, new_value, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :return: MftConfigurationData + :param name: Parameter name (required) + :type name: str + :param new_value: Param new value (required) + :type new_value: Value + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name', + 'new_value' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_mft_configuration" % key + " to method set_system_param" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_mft_configuration`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_mft_configuration`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `set_system_param`") # noqa: E501 + # verify the required parameter 'new_value' is set + if self.api_client.client_side_validation and ('new_value' not in local_var_params or # noqa: E501 + local_var_params['new_value'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `new_value` when calling `set_system_param`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'new_value' in local_var_params: + body_params = local_var_params['new_value'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/configuration", - "GET", + '/config/em/param/{name}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="MftConfigurationData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_mft_folders(self, **kwargs): # noqa: E501 - """Get MFT virtual folders that match the search criteria. # noqa: E501 + def set_system_setting(self, systemsetting, **kwargs): # noqa: E501 + """Set system setting for Control-M environment # noqa: E501 - Get MFT virtual folders that match the search criteria. # noqa: E501 + Set system setting for Control-M environment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_folders(async_req=True) + + >>> thread = api.set_system_setting(systemsetting, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The virtual folder name. - :return: list[FolderPropertiesData] + :param systemsetting: System Setting JSON file (required) + :type systemsetting: file + :param server: Server to which the system settings are applied + :type server: str + :param saml2metadatafile: SAML2 Identity Provider Metadata file to upload + :type saml2metadatafile: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_mft_folders_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_mft_folders_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_system_setting_with_http_info(systemsetting, **kwargs) # noqa: E501 - def get_mft_folders_with_http_info(self, **kwargs): # noqa: E501 - """Get MFT virtual folders that match the search criteria. # noqa: E501 + def set_system_setting_with_http_info(self, systemsetting, **kwargs): # noqa: E501 + """Set system setting for Control-M environment # noqa: E501 - Get MFT virtual folders that match the search criteria. # noqa: E501 + Set system setting for Control-M environment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_folders_with_http_info(async_req=True) + + >>> thread = api.set_system_setting_with_http_info(systemsetting, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The virtual folder name. - :return: list[FolderPropertiesData] + :param systemsetting: System Setting JSON file (required) + :type systemsetting: file + :param server: Server to which the system settings are applied + :type server: str + :param saml2metadatafile: SAML2 Identity Provider Metadata file to upload + :type saml2metadatafile: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'systemsetting', + 'server', + 'saml2metadatafile' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_mft_folders" % key + " to method set_system_setting" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'systemsetting' is set + if self.api_client.client_side_validation and ('systemsetting' not in local_var_params or # noqa: E501 + local_var_params['systemsetting'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `systemsetting` when calling `set_system_setting`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} + if 'systemsetting' in local_var_params: + local_var_files['systemsetting'] = local_var_params['systemsetting'] # noqa: E501 + if 'saml2metadatafile' in local_var_params: + local_var_files['saml2metadatafile'] = local_var_params['saml2metadatafile'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 206: "ErrorList", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/virtualfolders", - "GET", + '/config/systemsettings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[FolderPropertiesData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_mft_gateways(self, **kwargs): # noqa: E501 - """Get MFT gateways # noqa: E501 + def set_user_preferences(self, user_name, user_preferences, **kwargs): # noqa: E501 + """Set user preferences by user name # noqa: E501 - Get MFT gateways # noqa: E501 + Set user preferences by user name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_gateways(async_req=True) + + >>> thread = api.set_user_preferences(user_name, user_preferences, async_req=True) >>> result = thread.get() - :param async_req bool - :return: list[GatewayData] + :param user_name: The name of the user (required) + :type user_name: str + :param user_preferences: The new value of UserPreferences to set (required) + :type user_preferences: UserPreferences + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_mft_gateways_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_mft_gateways_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_user_preferences_with_http_info(user_name, user_preferences, **kwargs) # noqa: E501 - def get_mft_gateways_with_http_info(self, **kwargs): # noqa: E501 - """Get MFT gateways # noqa: E501 + def set_user_preferences_with_http_info(self, user_name, user_preferences, **kwargs): # noqa: E501 + """Set user preferences by user name # noqa: E501 - Get MFT gateways # noqa: E501 + Set user preferences by user name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_gateways_with_http_info(async_req=True) + + >>> thread = api.set_user_preferences_with_http_info(user_name, user_preferences, async_req=True) >>> result = thread.get() - :param async_req bool - :return: list[GatewayData] + :param user_name: The name of the user (required) + :type user_name: str + :param user_preferences: The new value of UserPreferences to set (required) + :type user_preferences: UserPreferences + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user_name', + 'user_preferences' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_mft_gateways" % key + " to method set_user_preferences" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `set_user_preferences`") # noqa: E501 + # verify the required parameter 'user_preferences' is set + if self.api_client.client_side_validation and ('user_preferences' not in local_var_params or # noqa: E501 + local_var_params['user_preferences'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_preferences` when calling `set_user_preferences`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'user_name' in local_var_params and local_var_params['user_name'] is not None: # noqa: E501 + query_params.append(('userName', local_var_params['user_name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'user_preferences' in local_var_params: + body_params = local_var_params['user_preferences'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/gateways", - "GET", + '/config/authorization/user/preferences', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[GatewayData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_mft_user_groups(self, **kwargs): # noqa: E501 - """Get all user groups that match the search criteria. # noqa: E501 + def set_workflow_insights_data_export_system_params(self, system_params, **kwargs): # noqa: E501 + """set workflow data export system parameters. # noqa: E501 - Get all user groups that match the search criteria. # noqa: E501 + set workflow data export system parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_user_groups(async_req=True) + + >>> thread = api.set_workflow_insights_data_export_system_params(system_params, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The user group name. - :param str external_users: external users. - :param str ldap_groups: ldap groups. - :return: list[UserGroupPropertiesData] + :param system_params: workflow data export system parameters. (required) + :type system_params: SystemParametersList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_mft_user_groups_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_mft_user_groups_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_workflow_insights_data_export_system_params_with_http_info(system_params, **kwargs) # noqa: E501 - def get_mft_user_groups_with_http_info(self, **kwargs): # noqa: E501 - """Get all user groups that match the search criteria. # noqa: E501 + def set_workflow_insights_data_export_system_params_with_http_info(self, system_params, **kwargs): # noqa: E501 + """set workflow data export system parameters. # noqa: E501 - Get all user groups that match the search criteria. # noqa: E501 + set workflow data export system parameters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_mft_user_groups_with_http_info(async_req=True) + + >>> thread = api.set_workflow_insights_data_export_system_params_with_http_info(system_params, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The user group name. - :param str external_users: external users. - :param str ldap_groups: ldap groups. - :return: list[UserGroupPropertiesData] + :param system_params: workflow data export system parameters. (required) + :type system_params: SystemParametersList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "external_users", "ldap_groups"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'system_params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_mft_user_groups" % key + " to method set_workflow_insights_data_export_system_params" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'system_params' is set + if self.api_client.client_side_validation and ('system_params' not in local_var_params or # noqa: E501 + local_var_params['system_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `system_params` when calling `set_workflow_insights_data_export_system_params`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - if "external_users" in params: - query_params.append( - ("externalUsers", params["external_users"]) - ) # noqa: E501 - if "ldap_groups" in params: - query_params.append(("ldapGroups", params["ldap_groups"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'system_params' in local_var_params: + body_params = local_var_params['system_params'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/usergroups", - "GET", + '/config/workflowinsights/dataexport/parameters', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[UserGroupPropertiesData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_pgp_templates(self, server, agent, **kwargs): # noqa: E501 - """Get PGP Templates # noqa: E501 + def setasprimary(self, server, **kwargs): # noqa: E501 + """Set secondary server as Primary on a specified Server # noqa: E501 - Get PGP Templates # noqa: E501 + Set secondary server as Primary on a specified Server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_pgp_templates(server, agent, async_req=True) + + >>> thread = api.setasprimary(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str name: The PGP Template Name - :return: list[PgpTemplateData] + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_pgp_templates_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.get_pgp_templates_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.setasprimary_with_http_info(server, **kwargs) # noqa: E501 - def get_pgp_templates_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """Get PGP Templates # noqa: E501 + def setasprimary_with_http_info(self, server, **kwargs): # noqa: E501 + """Set secondary server as Primary on a specified Server # noqa: E501 - Get PGP Templates # noqa: E501 + Set secondary server as Primary on a specified Server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_pgp_templates_with_http_info(server, agent, async_req=True) + + >>> thread = api.setasprimary_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str name: The PGP Template Name - :return: list[PgpTemplateData] + :param server: (required) + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_pgp_templates" % key + " to method setasprimary" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_pgp_templates`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_pgp_templates`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `setasprimary`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/pgptemplates", - "GET", + '/config/server/{server}/setasprimary', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[PgpTemplateData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_remote_host_properties(self, server, remotehost, **kwargs): # noqa: E501 - """get a remote host configuration from Server # noqa: E501 + def test_agent(self, server, agent, **kwargs): # noqa: E501 + """Test the Agent connectivity to the server. # noqa: E501 - Get the remote host configuration properties from the Server # noqa: E501 + allows the user to test the Agent connectivity before adding it to his environment. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_host_properties(server, remotehost, async_req=True) + + >>> thread = api.test_agent(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is connected to. (required) - :param str remotehost: The name of the remote host. (required) - :return: AddRemoteHostParams + :param server: The Server the agent is going to be tested to. (required) + :type server: str + :param agent: The agent is going to be tested. (required) + :type agent: str + :param data: The non default, advanced configuration data + :type data: SetAgentParamsList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_remote_host_properties_with_http_info( - server, remotehost, **kwargs - ) # noqa: E501 - else: - (data) = self.get_remote_host_properties_with_http_info( - server, remotehost, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.test_agent_with_http_info(server, agent, **kwargs) # noqa: E501 - def get_remote_host_properties_with_http_info( - self, server, remotehost, **kwargs - ): # noqa: E501 - """get a remote host configuration from Server # noqa: E501 + def test_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 + """Test the Agent connectivity to the server. # noqa: E501 - Get the remote host configuration properties from the Server # noqa: E501 + allows the user to test the Agent connectivity before adding it to his environment. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_host_properties_with_http_info(server, remotehost, async_req=True) + + >>> thread = api.test_agent_with_http_info(server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the remote host is connected to. (required) - :param str remotehost: The name of the remote host. (required) - :return: AddRemoteHostParams + :param server: The Server the agent is going to be tested to. (required) + :type server: str + :param agent: The agent is going to be tested. (required) + :type agent: str + :param data: The non default, advanced configuration data + :type data: SetAgentParamsList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "remotehost"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_remote_host_properties" % key + " to method test_agent" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_remote_host_properties`" - ) # noqa: E501 - # verify the required parameter 'remotehost' is set - if self.api_client.client_side_validation and ( - "remotehost" not in params or params["remotehost"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `remotehost` when calling `get_remote_host_properties`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `test_agent`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `test_agent`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "remotehost" in params: - path_params["remotehost"] = params["remotehost"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'data' in local_var_params: + body_params = local_var_params['data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/remotehost/{remotehost}", - "GET", + '/config/server/{server}/agent/{agent}/test', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AddRemoteHostParams", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_remote_hosts(self, server, **kwargs): # noqa: E501 - """get Server remote hosts # noqa: E501 + def test_agentless_host(self, server, agentlesshost, **kwargs): # noqa: E501 + """test Agentless Host in the Server # noqa: E501 - Get all the remote hosts of the specified Server. # noqa: E501 + Test an Agentless Host. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_hosts(server, async_req=True) + + >>> thread = api.test_agentless_host(server, agentlesshost, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server to query. (required) - :return: StringListResult + :param server: The Server. (required) + :type server: str + :param agentlesshost: The Agentless Host. (required) + :type agentlesshost: str + :param body: The agentless host data. + :type body: AgentlessHostDetails + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_remote_hosts_with_http_info(server, **kwargs) # noqa: E501 - else: - (data) = self.get_remote_hosts_with_http_info( - server, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.test_agentless_host_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 - def get_remote_hosts_with_http_info(self, server, **kwargs): # noqa: E501 - """get Server remote hosts # noqa: E501 + def test_agentless_host_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """test Agentless Host in the Server # noqa: E501 - Get all the remote hosts of the specified Server. # noqa: E501 + Test an Agentless Host. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_hosts_with_http_info(server, async_req=True) + + >>> thread = api.test_agentless_host_with_http_info(server, agentlesshost, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server to query. (required) - :return: StringListResult + :param server: The Server. (required) + :type server: str + :param agentlesshost: The Agentless Host. (required) + :type agentlesshost: str + :param body: The agentless host data. + :type body: AgentlessHostDetails + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'agentlesshost', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_remote_hosts" % key + " to method test_agentless_host" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_remote_hosts`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `test_agentless_host`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `test_agentless_host`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/remotehosts", - "GET", + '/config/server/{server}/agentlesshost/{agentlesshost}/test', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="StringListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_role(self, role, **kwargs): # noqa: E501 - """Get Authorization Role # noqa: E501 + def test_run_as_user(self, server, agent, user, **kwargs): # noqa: E501 + """Test existed Run-as user # noqa: E501 - Get Authorization Role # noqa: E501 + Test existing Run-as user in server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_role(role, async_req=True) + + >>> thread = api.test_run_as_user(server, agent, user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. (required) - :return: RoleData + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param run_as_user_details_data: Run as user details data + :type run_as_user_details_data: RunAsUserDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_role_with_http_info(role, **kwargs) # noqa: E501 - else: - (data) = self.get_role_with_http_info(role, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.test_run_as_user_with_http_info(server, agent, user, **kwargs) # noqa: E501 - def get_role_with_http_info(self, role, **kwargs): # noqa: E501 - """Get Authorization Role # noqa: E501 + def test_run_as_user_with_http_info(self, server, agent, user, **kwargs): # noqa: E501 + """Test existed Run-as user # noqa: E501 - Get Authorization Role # noqa: E501 + Test existing Run-as user in server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_role_with_http_info(role, async_req=True) + + >>> thread = api.test_run_as_user_with_http_info(server, agent, user, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. (required) - :return: RoleData + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param run_as_user_details_data: Run as user details data + :type run_as_user_details_data: RunAsUserDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'user', + 'run_as_user_details_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_role" % key + " to method test_run_as_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `get_role`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `test_run_as_user`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `test_run_as_user`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `test_run_as_user`") # noqa: E501 collection_formats = {} path_params = {} - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'run_as_user_details_data' in local_var_params: + body_params = local_var_params['run_as_user_details_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/role/{role}", - "GET", + '/config/server/{server}/runasuser/{agent}/{user}/test', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RoleData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_role_associates(self, role, **kwargs): # noqa: E501 - """Get all authorization entities associated with role # noqa: E501 + def unlock_external_user(self, user_name, **kwargs): # noqa: E501 + """Unlock an external user # noqa: E501 - Get all authorization entities associated with role # noqa: E501 + Unlock an existing external user in MFTE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_role_associates(role, async_req=True) + + >>> thread = api.unlock_external_user(user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: role name. (required) - :return: list[AssociateData] + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_role_associates_with_http_info(role, **kwargs) # noqa: E501 - else: - (data) = self.get_role_associates_with_http_info( - role, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.unlock_external_user_with_http_info(user_name, **kwargs) # noqa: E501 - def get_role_associates_with_http_info(self, role, **kwargs): # noqa: E501 - """Get all authorization entities associated with role # noqa: E501 + def unlock_external_user_with_http_info(self, user_name, **kwargs): # noqa: E501 + """Unlock an external user # noqa: E501 - Get all authorization entities associated with role # noqa: E501 + Unlock an existing external user in MFTE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_role_associates_with_http_info(role, async_req=True) + + >>> thread = api.unlock_external_user_with_http_info(user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: role name. (required) - :return: list[AssociateData] + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_role_associates" % key + " to method unlock_external_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `get_role_associates`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `unlock_external_user`") # noqa: E501 collection_formats = {} path_params = {} - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/role/{role}/associates", - "GET", + '/config/mft/externaluser/{userName}/unlock', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[AssociateData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_run_as_user(self, server, agent, user, **kwargs): # noqa: E501 - """Get Run-as user # noqa: E501 + def unlock_external_user_for_site(self, site_name, user_name, **kwargs): # noqa: E501 + """Unlock an external user for site # noqa: E501 - Get Run-as user details from server. # noqa: E501 + Unlock an existing external user in MFTE for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_run_as_user(server, agent, user, async_req=True) + + >>> thread = api.unlock_external_user_for_site(site_name, user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :return: RunAsUserData + :param site_name: The site name (required) + :type site_name: str + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_run_as_user_with_http_info( - server, agent, user, **kwargs - ) # noqa: E501 - else: - (data) = self.get_run_as_user_with_http_info( - server, agent, user, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.unlock_external_user_for_site_with_http_info(site_name, user_name, **kwargs) # noqa: E501 - def get_run_as_user_with_http_info( - self, server, agent, user, **kwargs - ): # noqa: E501 - """Get Run-as user # noqa: E501 + def unlock_external_user_for_site_with_http_info(self, site_name, user_name, **kwargs): # noqa: E501 + """Unlock an external user for site # noqa: E501 - Get Run-as user details from server. # noqa: E501 + Unlock an existing external user in MFTE for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_run_as_user_with_http_info(server, agent, user, async_req=True) + + >>> thread = api.unlock_external_user_for_site_with_http_info(site_name, user_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :return: RunAsUserData + :param site_name: The site name (required) + :type site_name: str + :param user_name: Name of external user (required) + :type user_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "user"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'site_name', + 'user_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_run_as_user" % key + " to method unlock_external_user_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `get_run_as_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `unlock_external_user_for_site`") # noqa: E501 + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `unlock_external_user_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/runasuser/{agent}/{user}", - "GET", + '/config/mfte/site/{siteName}/externaluser/{userName}/unlock', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunAsUserData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_run_as_users_list(self, server, **kwargs): # noqa: E501 - """Get Run-as user list that match the requested search criteria. # noqa: E501 + def unlock_external_users(self, **kwargs): # noqa: E501 + """Unlock all external users # noqa: E501 - Get Run-as user list that match the requested search criteria from server. # noqa: E501 + Unlock all existing external users in MFTE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_run_as_users_list(server, async_req=True) + + >>> thread = api.unlock_external_users(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str user: The Run-as user. - :param str agent: The agent. - :return: RunAsUsersList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_run_as_users_list_with_http_info( - server, **kwargs - ) # noqa: E501 - else: - (data) = self.get_run_as_users_list_with_http_info( - server, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.unlock_external_users_with_http_info(**kwargs) # noqa: E501 - def get_run_as_users_list_with_http_info(self, server, **kwargs): # noqa: E501 - """Get Run-as user list that match the requested search criteria. # noqa: E501 + def unlock_external_users_with_http_info(self, **kwargs): # noqa: E501 + """Unlock all external users # noqa: E501 - Get Run-as user list that match the requested search criteria from server. # noqa: E501 + Unlock all existing external users in MFTE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_run_as_users_list_with_http_info(server, async_req=True) + + >>> thread = api.unlock_external_users_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str user: The Run-as user. - :param str agent: The agent. - :return: RunAsUsersList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "user", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_run_as_users_list" % key + " to method unlock_external_users" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_run_as_users_list`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 query_params = [] - if "user" in params: - query_params.append(("user", params["user"])) # noqa: E501 - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/runasusers", - "GET", + '/config/mft/externalusers/unlock', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunAsUsersList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_server_parameters(self, server, **kwargs): # noqa: E501 - """get Server parameters # noqa: E501 + def unlock_external_users_for_site(self, site_name, **kwargs): # noqa: E501 + """Unlock all external users for site # noqa: E501 - Get all the parameters of the specified Server. # noqa: E501 + Unlock all existing external users in MFTE for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_server_parameters(server, async_req=True) + + >>> thread = api.unlock_external_users_for_site(site_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server to query. (required) - :return: KeyValueListResult + :param site_name: The site name (required) + :type site_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_server_parameters_with_http_info( - server, **kwargs - ) # noqa: E501 - else: - (data) = self.get_server_parameters_with_http_info( - server, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.unlock_external_users_for_site_with_http_info(site_name, **kwargs) # noqa: E501 - def get_server_parameters_with_http_info(self, server, **kwargs): # noqa: E501 - """get Server parameters # noqa: E501 + def unlock_external_users_for_site_with_http_info(self, site_name, **kwargs): # noqa: E501 + """Unlock all external users for site # noqa: E501 - Get all the parameters of the specified Server. # noqa: E501 + Unlock all existing external users in MFTE for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_server_parameters_with_http_info(server, async_req=True) + + >>> thread = api.unlock_external_users_for_site_with_http_info(site_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server to query. (required) - :return: KeyValueListResult + :param site_name: The site name (required) + :type site_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'site_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_server_parameters" % key + " to method unlock_external_users_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_server_parameters`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `unlock_external_users_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/params", - "GET", + '/config/mfte/site/{siteName}/externalusers/unlock', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="KeyValueListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_servers(self, **kwargs): # noqa: E501 - """get all the Servers name and hostname in the system # noqa: E501 + def unmanaged_ctm_server(self, server, **kwargs): # noqa: E501 + """Set server to unmanaged state. # noqa: E501 - Get the names and hostnames of all Servers in the system. # noqa: E501 + Set server to unmanaged state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_servers(async_req=True) + + >>> thread = api.unmanaged_ctm_server(server, async_req=True) >>> result = thread.get() - :param async_req bool - :return: CtmDetailsList + :param server: (required) + :type server: str + :param host: Server host + :type host: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_servers_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_servers_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.unmanaged_ctm_server_with_http_info(server, **kwargs) # noqa: E501 - def get_servers_with_http_info(self, **kwargs): # noqa: E501 - """get all the Servers name and hostname in the system # noqa: E501 + def unmanaged_ctm_server_with_http_info(self, server, **kwargs): # noqa: E501 + """Set server to unmanaged state. # noqa: E501 - Get the names and hostnames of all Servers in the system. # noqa: E501 + Set server to unmanaged state. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_servers_with_http_info(async_req=True) + + >>> thread = api.unmanaged_ctm_server_with_http_info(server, async_req=True) >>> result = thread.get() - :param async_req bool - :return: CtmDetailsList + :param server: (required) + :type server: str + :param host: Server host + :type host: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'host' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_servers" % key + " to method unmanaged_ctm_server" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `unmanaged_ctm_server`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] + if 'host' in local_var_params and local_var_params['host'] is not None: # noqa: E501 + query_params.append(('host', local_var_params['host'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 403: None, + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/servers", - "GET", + '/config/server/{server}/unmanaged', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="CtmDetailsList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_user(self, user, **kwargs): # noqa: E501 - """Get user # noqa: E501 + def update_agent_parameter(self, server, agent, agent_parameter, **kwargs): # noqa: E501 + """Update agent parameter # noqa: E501 - Get user # noqa: E501 + Update a parameter for a specified Agent. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user(user, async_req=True) + + >>> thread = api.update_agent_parameter(server, agent, agent_parameter, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: The user name. (required) - :return: UserData + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to query. (required) + :type agent: str + :param agent_parameter: The parameter to be updated. (required) + :type agent_parameter: KeyValueObject + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_user_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.get_user_with_http_info(user, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_agent_parameter_with_http_info(server, agent, agent_parameter, **kwargs) # noqa: E501 - def get_user_with_http_info(self, user, **kwargs): # noqa: E501 - """Get user # noqa: E501 + def update_agent_parameter_with_http_info(self, server, agent, agent_parameter, **kwargs): # noqa: E501 + """Update agent parameter # noqa: E501 - Get user # noqa: E501 + Update a parameter for a specified Agent. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_with_http_info(user, async_req=True) + + >>> thread = api.update_agent_parameter_with_http_info(server, agent, agent_parameter, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: The user name. (required) - :return: UserData + :param server: The Server the agent is connected to. (required) + :type server: str + :param agent: The name of the agent to query. (required) + :type agent: str + :param agent_parameter: The parameter to be updated. (required) + :type agent_parameter: KeyValueObject + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'agent_parameter' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_user" % key + " to method update_agent_parameter" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `get_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_agent_parameter`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `update_agent_parameter`") # noqa: E501 + # verify the required parameter 'agent_parameter' is set + if self.api_client.client_side_validation and ('agent_parameter' not in local_var_params or # noqa: E501 + local_var_params['agent_parameter'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent_parameter` when calling `update_agent_parameter`") # noqa: E501 collection_formats = {} path_params = {} - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'agent_parameter' in local_var_params: + body_params = local_var_params['agent_parameter'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user/{user}", - "GET", + '/config/server/{server}/agent/{agent}/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="UserData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_user_effective_rights(self, **kwargs): # noqa: E501 - """Get user real effective authorizations # noqa: E501 + def update_agentless_host(self, server, agentlesshost, **kwargs): # noqa: E501 + """Update agentless host # noqa: E501 - Get user real effective authorizations by all his roles # noqa: E501 + Update agentless host. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_effective_rights(async_req=True) + + >>> thread = api.update_agentless_host(server, agentlesshost, async_req=True) >>> result = thread.get() - :param async_req bool - :return: RoleData + :param server: The server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The agentless host to update. (required) + :type agentlesshost: str + :param data: The agentless host data to update. + :type data: AgentlessHostDetails + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_user_effective_rights_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_user_effective_rights_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_agentless_host_with_http_info(server, agentlesshost, **kwargs) # noqa: E501 - def get_user_effective_rights_with_http_info(self, **kwargs): # noqa: E501 - """Get user real effective authorizations # noqa: E501 + def update_agentless_host_with_http_info(self, server, agentlesshost, **kwargs): # noqa: E501 + """Update agentless host # noqa: E501 - Get user real effective authorizations by all his roles # noqa: E501 + Update agentless host. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_effective_rights_with_http_info(async_req=True) + + >>> thread = api.update_agentless_host_with_http_info(server, agentlesshost, async_req=True) >>> result = thread.get() - :param async_req bool - :return: RoleData + :param server: The server the agentless host is connected to. (required) + :type server: str + :param agentlesshost: The agentless host to update. (required) + :type agentlesshost: str + :param data: The agentless host data to update. + :type data: AgentlessHostDetails + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'agentlesshost', + 'data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_effective_rights" % key + " to method update_agentless_host" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_agentless_host`") # noqa: E501 + # verify the required parameter 'agentlesshost' is set + if self.api_client.client_side_validation and ('agentlesshost' not in local_var_params or # noqa: E501 + local_var_params['agentlesshost'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agentlesshost` when calling `update_agentless_host`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agentlesshost' in local_var_params: + path_params['agentlesshost'] = local_var_params['agentlesshost'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'data' in local_var_params: + body_params = local_var_params['data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 422: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user/effectiveRights", - "GET", + '/config/server/{server}/agentlesshost/{agentlesshost}/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RoleData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_workflow_insights_status(self, **kwargs): # noqa: E501 - """get Workflow Insights status # noqa: E501 + def update_archive_rule(self, rule_name, archive_rule, **kwargs): # noqa: E501 + """Edit Workload Archiving rule # noqa: E501 - get Workflow Insights status - topology and system parameters # noqa: E501 + Edit Workload Archiving rule details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_workflow_insights_status(async_req=True) + + >>> thread = api.update_archive_rule(rule_name, archive_rule, async_req=True) >>> result = thread.get() - :param async_req bool - :return: WorkflowInsightsStatus + :param rule_name: Rule name to update (required) + :type rule_name: str + :param archive_rule: Edit Workload Archiving rule details (required) + :type archive_rule: ArchiveRule + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_workflow_insights_status_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_workflow_insights_status_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_archive_rule_with_http_info(rule_name, archive_rule, **kwargs) # noqa: E501 - def get_workflow_insights_status_with_http_info(self, **kwargs): # noqa: E501 - """get Workflow Insights status # noqa: E501 + def update_archive_rule_with_http_info(self, rule_name, archive_rule, **kwargs): # noqa: E501 + """Edit Workload Archiving rule # noqa: E501 - get Workflow Insights status - topology and system parameters # noqa: E501 + Edit Workload Archiving rule details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_workflow_insights_status_with_http_info(async_req=True) + + >>> thread = api.update_archive_rule_with_http_info(rule_name, archive_rule, async_req=True) >>> result = thread.get() - :param async_req bool - :return: WorkflowInsightsStatus + :param rule_name: Rule name to update (required) + :type rule_name: str + :param archive_rule: Edit Workload Archiving rule details (required) + :type archive_rule: ArchiveRule + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'rule_name', + 'archive_rule' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_workflow_insights_status" % key + " to method update_archive_rule" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'rule_name' is set + if self.api_client.client_side_validation and ('rule_name' not in local_var_params or # noqa: E501 + local_var_params['rule_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_name` when calling `update_archive_rule`") # noqa: E501 + # verify the required parameter 'archive_rule' is set + if self.api_client.client_side_validation and ('archive_rule' not in local_var_params or # noqa: E501 + local_var_params['archive_rule'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `archive_rule` when calling `update_archive_rule`") # noqa: E501 collection_formats = {} path_params = {} + if 'rule_name' in local_var_params: + path_params['ruleName'] = local_var_params['rule_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'archive_rule' in local_var_params: + body_params = local_var_params['archive_rule'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/config/workflowinsights/status", - "GET", + '/config/archive/rule/{ruleName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="WorkflowInsightsStatus", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_zos_templates(self, server, agent, **kwargs): # noqa: E501 - """Get z/OS Templates # noqa: E501 + def update_ctm_gateway(self, gateway_update_params, **kwargs): # noqa: E501 + """Update gateway. # noqa: E501 - Get z/OS Templates # noqa: E501 + Update an existing gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_zos_templates(server, agent, async_req=True) + + >>> thread = api.update_ctm_gateway(gateway_update_params, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str name: The z/OS Template Name - :return: list[ZosTemplateData] + :param gateway_update_params: Parameters for updating the gateway (required) + :type gateway_update_params: UpdateGatewayParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_zos_templates_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - else: - (data) = self.get_zos_templates_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_ctm_gateway_with_http_info(gateway_update_params, **kwargs) # noqa: E501 - def get_zos_templates_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """Get z/OS Templates # noqa: E501 + def update_ctm_gateway_with_http_info(self, gateway_update_params, **kwargs): # noqa: E501 + """Update gateway. # noqa: E501 - Get z/OS Templates # noqa: E501 + Update an existing gateway. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_zos_templates_with_http_info(server, agent, async_req=True) + + >>> thread = api.update_ctm_gateway_with_http_info(gateway_update_params, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str name: The z/OS Template Name - :return: list[ZosTemplateData] + :param gateway_update_params: Parameters for updating the gateway (required) + :type gateway_update_params: UpdateGatewayParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'gateway_update_params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_zos_templates" % key + " to method update_ctm_gateway" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `get_zos_templates`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_zos_templates`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'gateway_update_params' is set + if self.api_client.client_side_validation and ('gateway_update_params' not in local_var_params or # noqa: E501 + local_var_params['gateway_update_params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `gateway_update_params` when calling `update_ctm_gateway`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'gateway_update_params' in local_var_params: + body_params = local_var_params['gateway_update_params'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/zostemplates", - "GET", + '/config/server/gateway', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[ZosTemplateData]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def list_secrets(self, **kwargs): # noqa: E501 - """Get list of secret names # noqa: E501 + def update_ctm_security_attributes(self, ctm_name, entity_name, ctm_sec_security_attributes_updated, **kwargs): # noqa: E501 + """Update User Or Group Security Attributes # noqa: E501 - Get the list of names of all the secrets in the vault # noqa: E501 + Update User Or Group Security Attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_secrets(async_req=True) + + >>> thread = api.update_ctm_security_attributes(ctm_name, entity_name, ctm_sec_security_attributes_updated, async_req=True) >>> result = thread.get() - :param async_req bool - :return: StringListResult + :param ctm_name: (required) + :type ctm_name: str + :param entity_name: (required) + :type entity_name: str + :param ctm_sec_security_attributes_updated: (required) + :type ctm_sec_security_attributes_updated: CtmSecSecurityAttributes + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.list_secrets_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_secrets_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_ctm_security_attributes_with_http_info(ctm_name, entity_name, ctm_sec_security_attributes_updated, **kwargs) # noqa: E501 - def list_secrets_with_http_info(self, **kwargs): # noqa: E501 - """Get list of secret names # noqa: E501 + def update_ctm_security_attributes_with_http_info(self, ctm_name, entity_name, ctm_sec_security_attributes_updated, **kwargs): # noqa: E501 + """Update User Or Group Security Attributes # noqa: E501 - Get the list of names of all the secrets in the vault # noqa: E501 + Update User Or Group Security Attributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_secrets_with_http_info(async_req=True) + + >>> thread = api.update_ctm_security_attributes_with_http_info(ctm_name, entity_name, ctm_sec_security_attributes_updated, async_req=True) >>> result = thread.get() - :param async_req bool - :return: StringListResult + :param ctm_name: (required) + :type ctm_name: str + :param entity_name: (required) + :type entity_name: str + :param ctm_sec_security_attributes_updated: (required) + :type ctm_sec_security_attributes_updated: CtmSecSecurityAttributes + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'entity_name', + 'ctm_sec_security_attributes_updated' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_secrets" % key + " to method update_ctm_security_attributes" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `update_ctm_security_attributes`") # noqa: E501 + # verify the required parameter 'entity_name' is set + if self.api_client.client_side_validation and ('entity_name' not in local_var_params or # noqa: E501 + local_var_params['entity_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `entity_name` when calling `update_ctm_security_attributes`") # noqa: E501 + # verify the required parameter 'ctm_sec_security_attributes_updated' is set + if self.api_client.client_side_validation and ('ctm_sec_security_attributes_updated' not in local_var_params or # noqa: E501 + local_var_params['ctm_sec_security_attributes_updated'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_sec_security_attributes_updated` when calling `update_ctm_security_attributes`") # noqa: E501 collection_formats = {} path_params = {} + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + if 'entity_name' in local_var_params: + path_params['entityName'] = local_var_params['entity_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'ctm_sec_security_attributes_updated' in local_var_params: + body_params = local_var_params['ctm_sec_security_attributes_updated'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/secrets", - "GET", + '/config/server/{ctmName}/security/attributes/{entityName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="StringListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def ping_agent(self, server, agent, **kwargs): # noqa: E501 - """ping to the agent in the Server # noqa: E501 + def update_ctm_security_group(self, ctm_name, group_name, ctm_sec_group_updated, **kwargs): # noqa: E501 + """Update CTM Security group # noqa: E501 - Ping an Agent. # noqa: E501 + Update CTM Security group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.ping_agent(server, agent, async_req=True) + + >>> thread = api.update_ctm_security_group(ctm_name, group_name, ctm_sec_group_updated, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :param PingAgentParams body: - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param group_name: (required) + :type group_name: str + :param ctm_sec_group_updated: (required) + :type ctm_sec_group_updated: CtmSecGroup + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.ping_agent_with_http_info(server, agent, **kwargs) # noqa: E501 - else: - (data) = self.ping_agent_with_http_info( - server, agent, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_ctm_security_group_with_http_info(ctm_name, group_name, ctm_sec_group_updated, **kwargs) # noqa: E501 - def ping_agent_with_http_info(self, server, agent, **kwargs): # noqa: E501 - """ping to the agent in the Server # noqa: E501 + def update_ctm_security_group_with_http_info(self, ctm_name, group_name, ctm_sec_group_updated, **kwargs): # noqa: E501 + """Update CTM Security group # noqa: E501 - Ping an Agent. # noqa: E501 + Update CTM Security group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.ping_agent_with_http_info(server, agent, async_req=True) + + >>> thread = api.update_ctm_security_group_with_http_info(ctm_name, group_name, ctm_sec_group_updated, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent. (required) - :param PingAgentParams body: - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param group_name: (required) + :type group_name: str + :param ctm_sec_group_updated: (required) + :type ctm_sec_group_updated: CtmSecGroup + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "body"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'group_name', + 'ctm_sec_group_updated' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method ping_agent" % key + " to method update_ctm_security_group" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `ping_agent`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `ping_agent`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `update_ctm_security_group`") # noqa: E501 + # verify the required parameter 'group_name' is set + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_name` when calling `update_ctm_security_group`") # noqa: E501 + # verify the required parameter 'ctm_sec_group_updated' is set + if self.api_client.client_side_validation and ('ctm_sec_group_updated' not in local_var_params or # noqa: E501 + local_var_params['ctm_sec_group_updated'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_sec_group_updated` when calling `update_ctm_security_group`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + if 'group_name' in local_var_params: + path_params['groupName'] = local_var_params['group_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "body" in params: - body_params = params["body"] + if 'ctm_sec_group_updated' in local_var_params: + body_params = local_var_params['ctm_sec_group_updated'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/ping", - "POST", + '/config/server/{ctmName}/security/group/{groupName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def recycle_item(self, id, **kwargs): # noqa: E501 - """recycle item # noqa: E501 + def update_ctm_security_user(self, ctm_name, user_name, ctm_sec_user_data_updated, **kwargs): # noqa: E501 + """Update CTM Security user # noqa: E501 - Recycle an item # noqa: E501 + Update CTM Security user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.recycle_item(id, async_req=True) + + >>> thread = api.update_ctm_security_user(ctm_name, user_name, ctm_sec_user_data_updated, async_req=True) >>> result = thread.get() - :param async_req bool - :param str id: item data (required) - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param user_name: (required) + :type user_name: str + :param ctm_sec_user_data_updated: (required) + :type ctm_sec_user_data_updated: CtmSecUser + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.recycle_item_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.recycle_item_with_http_info(id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_ctm_security_user_with_http_info(ctm_name, user_name, ctm_sec_user_data_updated, **kwargs) # noqa: E501 - def recycle_item_with_http_info(self, id, **kwargs): # noqa: E501 - """recycle item # noqa: E501 + def update_ctm_security_user_with_http_info(self, ctm_name, user_name, ctm_sec_user_data_updated, **kwargs): # noqa: E501 + """Update CTM Security user # noqa: E501 - Recycle an item # noqa: E501 + Update CTM Security user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.recycle_item_with_http_info(id, async_req=True) + + >>> thread = api.update_ctm_security_user_with_http_info(ctm_name, user_name, ctm_sec_user_data_updated, async_req=True) >>> result = thread.get() - :param async_req bool - :param str id: item data (required) - :return: SuccessData + :param ctm_name: (required) + :type ctm_name: str + :param user_name: (required) + :type user_name: str + :param ctm_sec_user_data_updated: (required) + :type ctm_sec_user_data_updated: CtmSecUser + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm_name', + 'user_name', + 'ctm_sec_user_data_updated' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method recycle_item" % key + " to method update_ctm_security_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ( - "id" not in params or params["id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `id` when calling `recycle_item`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm_name' is set + if self.api_client.client_side_validation and ('ctm_name' not in local_var_params or # noqa: E501 + local_var_params['ctm_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_name` when calling `update_ctm_security_user`") # noqa: E501 + # verify the required parameter 'user_name' is set + if self.api_client.client_side_validation and ('user_name' not in local_var_params or # noqa: E501 + local_var_params['user_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_name` when calling `update_ctm_security_user`") # noqa: E501 + # verify the required parameter 'ctm_sec_user_data_updated' is set + if self.api_client.client_side_validation and ('ctm_sec_user_data_updated' not in local_var_params or # noqa: E501 + local_var_params['ctm_sec_user_data_updated'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm_sec_user_data_updated` when calling `update_ctm_security_user`") # noqa: E501 collection_formats = {} path_params = {} - if "id" in params: - path_params["id"] = params["id"] # noqa: E501 + if 'ctm_name' in local_var_params: + path_params['ctmName'] = local_var_params['ctm_name'] # noqa: E501 + if 'user_name' in local_var_params: + path_params['userName'] = local_var_params['user_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'ctm_sec_user_data_updated' in local_var_params: + body_params = local_var_params['ctm_sec_user_data_updated'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/item/{id}/recycle", - "POST", + '/config/server/{ctmName}/security/user/{userName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def remove_controlm_server(self, server, **kwargs): # noqa: E501 - """Delete Server # noqa: E501 + def update_em_component(self, body, **kwargs): # noqa: E501 + """Update the configuration of a specific EM component # noqa: E501 - Delete Server # noqa: E501 + Update the configuration details of a specific Control-M/Enterprise Manager component # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_controlm_server(server, async_req=True) + + >>> thread = api.update_em_component(body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: Server host name. (required) - :return: SuccessData + :param body: (required) + :type body: EmComponentDef + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.remove_controlm_server_with_http_info( - server, **kwargs - ) # noqa: E501 - else: - (data) = self.remove_controlm_server_with_http_info( - server, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_em_component_with_http_info(body, **kwargs) # noqa: E501 - def remove_controlm_server_with_http_info(self, server, **kwargs): # noqa: E501 - """Delete Server # noqa: E501 + def update_em_component_with_http_info(self, body, **kwargs): # noqa: E501 + """Update the configuration of a specific EM component # noqa: E501 - Delete Server # noqa: E501 + Update the configuration details of a specific Control-M/Enterprise Manager component # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_controlm_server_with_http_info(server, async_req=True) + + >>> thread = api.update_em_component_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: Server host name. (required) - :return: SuccessData + :param body: (required) + :type body: EmComponentDef + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method remove_controlm_server" % key + " to method update_em_component" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `remove_controlm_server`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `update_em_component`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}", - "DELETE", + '/config/em/component', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def remove_gateway(self, gateway_name, **kwargs): # noqa: E501 - """remove gateway. # noqa: E501 + def update_em_component_desired_state(self, body, **kwargs): # noqa: E501 + """Update the desired state of an EM component # noqa: E501 - remove gateway. # noqa: E501 + Update the desired state of a Control-M/Enterprise Manager component. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_gateway(gateway_name, async_req=True) + + >>> thread = api.update_em_component_desired_state(body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str gateway_name: gateway name (required) - :return: SuccessData + :param body: (required) + :type body: EmComponentDesiredState + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.remove_gateway_with_http_info( - gateway_name, **kwargs - ) # noqa: E501 - else: - (data) = self.remove_gateway_with_http_info( - gateway_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_em_component_desired_state_with_http_info(body, **kwargs) # noqa: E501 - def remove_gateway_with_http_info(self, gateway_name, **kwargs): # noqa: E501 - """remove gateway. # noqa: E501 + def update_em_component_desired_state_with_http_info(self, body, **kwargs): # noqa: E501 + """Update the desired state of an EM component # noqa: E501 - remove gateway. # noqa: E501 + Update the desired state of a Control-M/Enterprise Manager component. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_gateway_with_http_info(gateway_name, async_req=True) + + >>> thread = api.update_em_component_desired_state_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool - :param str gateway_name: gateway name (required) - :return: SuccessData + :param body: (required) + :type body: EmComponentDesiredState + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["gateway_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method remove_gateway" % key + " to method update_em_component_desired_state" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'gateway_name' is set - if self.api_client.client_side_validation and ( - "gateway_name" not in params or params["gateway_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `gateway_name` when calling `remove_gateway`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `update_em_component_desired_state`") # noqa: E501 collection_formats = {} path_params = {} - if "gateway_name" in params: - path_params["gatewayName"] = params["gateway_name"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/gateway/{gatewayName}", - "DELETE", + '/config/em/component/desiredState', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def remove_hub_from_cluster(self, agentname, **kwargs): # noqa: E501 - """remove hub from cluster. # noqa: E501 + def update_external_user(self, username, external_user_data, **kwargs): # noqa: E501 + """Update an external user # noqa: E501 - remove hub from cluster. # noqa: E501 + Update an external user for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_hub_from_cluster(agentname, async_req=True) + + >>> thread = api.update_external_user(username, external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str agentname: Agent name (required) - :return: SuccessData + :param username: The external user name (required) + :type username: str + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.remove_hub_from_cluster_with_http_info( - agentname, **kwargs - ) # noqa: E501 - else: - (data) = self.remove_hub_from_cluster_with_http_info( - agentname, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_external_user_with_http_info(username, external_user_data, **kwargs) # noqa: E501 - def remove_hub_from_cluster_with_http_info(self, agentname, **kwargs): # noqa: E501 - """remove hub from cluster. # noqa: E501 + def update_external_user_with_http_info(self, username, external_user_data, **kwargs): # noqa: E501 + """Update an external user # noqa: E501 - remove hub from cluster. # noqa: E501 + Update an external user for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_hub_from_cluster_with_http_info(agentname, async_req=True) + + >>> thread = api.update_external_user_with_http_info(username, external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str agentname: Agent name (required) - :return: SuccessData + :param username: The external user name (required) + :type username: str + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["agentname"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'username', + 'external_user_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method remove_hub_from_cluster" % key + " to method update_external_user" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'agentname' is set - if self.api_client.client_side_validation and ( - "agentname" not in params or params["agentname"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agentname` when calling `remove_hub_from_cluster`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `username` when calling `update_external_user`") # noqa: E501 + # verify the required parameter 'external_user_data' is set + if self.api_client.client_side_validation and ('external_user_data' not in local_var_params or # noqa: E501 + local_var_params['external_user_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `external_user_data` when calling `update_external_user`") # noqa: E501 collection_formats = {} path_params = {} - if "agentname" in params: - path_params["agentname"] = params["agentname"] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'external_user_data' in local_var_params: + body_params = local_var_params['external_user_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/cluster/hub/{agentname}", - "DELETE", + '/config/mft/externaluser/{username}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def remove_role_from_user(self, user, role, **kwargs): # noqa: E501 - """Remove a role from a user # noqa: E501 + def update_external_user_for_site(self, site_name, username, external_user_data, **kwargs): # noqa: E501 + """Update an external user for site # noqa: E501 - Remove a role from a user # noqa: E501 + Update an external user for site for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_role_from_user(user, role, async_req=True) + + >>> thread = api.update_external_user_for_site(site_name, username, external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: Name of user (required) - :param str role: Name of role (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param username: The external user name (required) + :type username: str + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.remove_role_from_user_with_http_info( - user, role, **kwargs - ) # noqa: E501 - else: - (data) = self.remove_role_from_user_with_http_info( - user, role, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_external_user_for_site_with_http_info(site_name, username, external_user_data, **kwargs) # noqa: E501 - def remove_role_from_user_with_http_info(self, user, role, **kwargs): # noqa: E501 - """Remove a role from a user # noqa: E501 + def update_external_user_for_site_with_http_info(self, site_name, username, external_user_data, **kwargs): # noqa: E501 + """Update an external user for site # noqa: E501 - Remove a role from a user # noqa: E501 + Update an external user for site for b2b # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_role_from_user_with_http_info(user, role, async_req=True) + + >>> thread = api.update_external_user_for_site_with_http_info(site_name, username, external_user_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: Name of user (required) - :param str role: Name of role (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param username: The external user name (required) + :type username: str + :param external_user_data: External user data (required) + :type external_user_data: ExternalUserData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user", "role"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'username', + 'external_user_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method remove_role_from_user" % key + " to method update_external_user_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `remove_role_from_user`" - ) # noqa: E501 - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `remove_role_from_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `update_external_user_for_site`") # noqa: E501 + # verify the required parameter 'username' is set + if self.api_client.client_side_validation and ('username' not in local_var_params or # noqa: E501 + local_var_params['username'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `username` when calling `update_external_user_for_site`") # noqa: E501 + # verify the required parameter 'external_user_data' is set + if self.api_client.client_side_validation and ('external_user_data' not in local_var_params or # noqa: E501 + local_var_params['external_user_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `external_user_data` when calling `update_external_user_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'username' in local_var_params: + path_params['username'] = local_var_params['username'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'external_user_data' in local_var_params: + body_params = local_var_params['external_user_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user/{user}/role/{role}", - "DELETE", + '/config/mfte/site/{siteName}/externaluser/{username}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def send_archive_cleanup_request(self, **kwargs): # noqa: E501 - """Deletes data (jobs including outputs and logs) from the Workload Archiving database. # noqa: E501 + def update_fts_settings(self, server, agent, fts_settings_data, **kwargs): # noqa: E501 + """Update File Transfer Server (FTS) configuration data. # noqa: E501 - Deletes data (jobs including outputs and logs) by search criteria from the Workload Archiving database. # noqa: E501 + Update File Transfer Server (FTS) configuration data. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_archive_cleanup_request(async_req=True) + + >>> thread = api.update_fts_settings(server, agent, fts_settings_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str application: Job's application. - :param str application_exceptions: Cleanup should skip job's application that are mentioned in exceptions - :param str sub_application: Job's sub application - :param str sub_application_exceptions: Job's sub application exception - :param str ctm: server name - :param str server: Server name - :param str ctm_exceptions: server exceptions - :param str server_exceptions: Server exceptions - :param str folder: Job's folder. - :param str folder_exceptions: Job's folder exceptions - :param str jobname: Job's name - :param str jobname_exceptions: Job's name exceptions - :param str library: Job's library - :param str library_exceptions: Job's library exceptions - :param str rule_name: Job's archive rule - :param str job_status: The job's end status. - :return: SuccessData - If the method is called asynchronously, - returns the request thread. - """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.send_archive_cleanup_request_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.send_archive_cleanup_request_with_http_info( - **kwargs - ) # noqa: E501 - return data + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param fts_settings_data: File Transfer Server (FTS) configuration data (required) + :type fts_settings_data: FtsSettingsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.update_fts_settings_with_http_info(server, agent, fts_settings_data, **kwargs) # noqa: E501 - def send_archive_cleanup_request_with_http_info(self, **kwargs): # noqa: E501 - """Deletes data (jobs including outputs and logs) from the Workload Archiving database. # noqa: E501 + def update_fts_settings_with_http_info(self, server, agent, fts_settings_data, **kwargs): # noqa: E501 + """Update File Transfer Server (FTS) configuration data. # noqa: E501 - Deletes data (jobs including outputs and logs) by search criteria from the Workload Archiving database. # noqa: E501 + Update File Transfer Server (FTS) configuration data. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_archive_cleanup_request_with_http_info(async_req=True) + + >>> thread = api.update_fts_settings_with_http_info(server, agent, fts_settings_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str application: Job's application. - :param str application_exceptions: Cleanup should skip job's application that are mentioned in exceptions - :param str sub_application: Job's sub application - :param str sub_application_exceptions: Job's sub application exception - :param str ctm: server name - :param str server: Server name - :param str ctm_exceptions: server exceptions - :param str server_exceptions: Server exceptions - :param str folder: Job's folder. - :param str folder_exceptions: Job's folder exceptions - :param str jobname: Job's name - :param str jobname_exceptions: Job's name exceptions - :param str library: Job's library - :param str library_exceptions: Job's library exceptions - :param str rule_name: Job's archive rule - :param str job_status: The job's end status. - :return: SuccessData - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [ - "application", - "application_exceptions", - "sub_application", - "sub_application_exceptions", - "ctm", - "server", - "ctm_exceptions", - "server_exceptions", - "folder", - "folder_exceptions", - "jobname", - "jobname_exceptions", - "library", - "library_exceptions", - "rule_name", - "job_status", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): - if key not in all_params: - raise TypeError( + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param fts_settings_data: File Transfer Server (FTS) configuration data (required) + :type fts_settings_data: FtsSettingsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'fts_settings_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method send_archive_cleanup_request" % key + " to method update_fts_settings" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_fts_settings`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `update_fts_settings`") # noqa: E501 + # verify the required parameter 'fts_settings_data' is set + if self.api_client.client_side_validation and ('fts_settings_data' not in local_var_params or # noqa: E501 + local_var_params['fts_settings_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `fts_settings_data` when calling `update_fts_settings`") # noqa: E501 collection_formats = {} path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - if "application" in params: - query_params.append(("application", params["application"])) # noqa: E501 - if "application_exceptions" in params: - query_params.append( - ("applicationExceptions", params["application_exceptions"]) - ) # noqa: E501 - if "sub_application" in params: - query_params.append( - ("subApplication", params["sub_application"]) - ) # noqa: E501 - if "sub_application_exceptions" in params: - query_params.append( - ("subApplicationExceptions", params["sub_application_exceptions"]) - ) # noqa: E501 - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "ctm_exceptions" in params: - query_params.append( - ("ctmExceptions", params["ctm_exceptions"]) - ) # noqa: E501 - if "server_exceptions" in params: - query_params.append( - ("serverExceptions", params["server_exceptions"]) - ) # noqa: E501 - if "folder" in params: - query_params.append(("folder", params["folder"])) # noqa: E501 - if "folder_exceptions" in params: - query_params.append( - ("folderExceptions", params["folder_exceptions"]) - ) # noqa: E501 - if "jobname" in params: - query_params.append(("jobname", params["jobname"])) # noqa: E501 - if "jobname_exceptions" in params: - query_params.append( - ("jobnameExceptions", params["jobname_exceptions"]) - ) # noqa: E501 - if "library" in params: - query_params.append(("library", params["library"])) # noqa: E501 - if "library_exceptions" in params: - query_params.append( - ("libraryExceptions", params["library_exceptions"]) - ) # noqa: E501 - if "rule_name" in params: - query_params.append(("ruleName", params["rule_name"])) # noqa: E501 - if "job_status" in params: - query_params.append(("jobStatus", params["job_status"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'fts_settings_data' in local_var_params: + body_params = local_var_params['fts_settings_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/archive/cleanup", - "DELETE", + '/config/server/{server}/agent/{agent}/mft/fts/settings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def set_agent_parameter(self, server, agent, name, **kwargs): # noqa: E501 - """set agent parameter # noqa: E501 + def update_host_restriction(self, ctm, host_restriction, **kwargs): # noqa: E501 + """Update an Host Restriction in the control-m server. # noqa: E501 - Set the value of the specified parameter in the specified agent. # noqa: E501 + Update an Host Restriction in the control-m server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_agent_parameter(server, agent, name, async_req=True) + + >>> thread = api.update_host_restriction(ctm, host_restriction, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str agent: The name of the agent to update. (required) - :param str name: The parameter name. (required) - :param OptionalValue body: The new parameter value. - :return: KeyValue + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param host_restriction: The parameters of the host restriction nodePrefix maxJobsAllowed maxCPUPct. (required) + :type host_restriction: HostRestriction + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.set_agent_parameter_with_http_info( - server, agent, name, **kwargs - ) # noqa: E501 - else: - (data) = self.set_agent_parameter_with_http_info( - server, agent, name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_host_restriction_with_http_info(ctm, host_restriction, **kwargs) # noqa: E501 - def set_agent_parameter_with_http_info( - self, server, agent, name, **kwargs - ): # noqa: E501 - """set agent parameter # noqa: E501 + def update_host_restriction_with_http_info(self, ctm, host_restriction, **kwargs): # noqa: E501 + """Update an Host Restriction in the control-m server. # noqa: E501 - Set the value of the specified parameter in the specified agent. # noqa: E501 + Update an Host Restriction in the control-m server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_agent_parameter_with_http_info(server, agent, name, async_req=True) + + >>> thread = api.update_host_restriction_with_http_info(ctm, host_restriction, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str agent: The name of the agent to update. (required) - :param str name: The parameter name. (required) - :param OptionalValue body: The new parameter value. - :return: KeyValue + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param host_restriction: The parameters of the host restriction nodePrefix maxJobsAllowed maxCPUPct. (required) + :type host_restriction: HostRestriction + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "name", "body"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'ctm', + 'host_restriction' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method set_agent_parameter" % key + " to method update_host_restriction" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `set_agent_parameter`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `set_agent_parameter`" - ) # noqa: E501 - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `set_agent_parameter`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `update_host_restriction`") # noqa: E501 + # verify the required parameter 'host_restriction' is set + if self.api_client.client_side_validation and ('host_restriction' not in local_var_params or # noqa: E501 + local_var_params['host_restriction'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `host_restriction` when calling `update_host_restriction`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "body" in params: - body_params = params["body"] + if 'host_restriction' in local_var_params: + body_params = local_var_params['host_restriction'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/param/{name}", - "POST", + '/config/server/{ctm}/hostRestriction', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="KeyValue", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def set_system_param(self, name, new_value, **kwargs): # noqa: E501 - """set value of a an em system parameter # noqa: E501 + def update_hosts_in_hostgroup(self, server, hostgroup, host_group_member_params_list, **kwargs): # noqa: E501 + """update agents in hostgroup. # noqa: E501 - Set value of an enterprise management system parameter # noqa: E501 + update agents in hostgroup. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_system_param(name, new_value, async_req=True) + + >>> thread = api.update_hosts_in_hostgroup(server, hostgroup, host_group_member_params_list, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: Parameter name (required) - :param Value new_value: Param new value (required) - :return: SuccessData + :param server: The Server the agent is connected to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param host_group_member_params_list: Agent list to update in a hostgroup (required) + :type host_group_member_params_list: HostgroupProperties + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.set_system_param_with_http_info( - name, new_value, **kwargs - ) # noqa: E501 - else: - (data) = self.set_system_param_with_http_info( - name, new_value, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_hosts_in_hostgroup_with_http_info(server, hostgroup, host_group_member_params_list, **kwargs) # noqa: E501 - def set_system_param_with_http_info(self, name, new_value, **kwargs): # noqa: E501 - """set value of a an em system parameter # noqa: E501 + def update_hosts_in_hostgroup_with_http_info(self, server, hostgroup, host_group_member_params_list, **kwargs): # noqa: E501 + """update agents in hostgroup. # noqa: E501 - Set value of an enterprise management system parameter # noqa: E501 + update agents in hostgroup. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_system_param_with_http_info(name, new_value, async_req=True) + + >>> thread = api.update_hosts_in_hostgroup_with_http_info(server, hostgroup, host_group_member_params_list, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: Parameter name (required) - :param Value new_value: Param new value (required) - :return: SuccessData + :param server: The Server the agent is connected to. (required) + :type server: str + :param hostgroup: The hostgroup name (required) + :type hostgroup: str + :param host_group_member_params_list: Agent list to update in a hostgroup (required) + :type host_group_member_params_list: HostgroupProperties + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "new_value"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'hostgroup', + 'host_group_member_params_list' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method set_system_param" % key + " to method update_hosts_in_hostgroup" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `set_system_param`" - ) # noqa: E501 - # verify the required parameter 'new_value' is set - if self.api_client.client_side_validation and ( - "new_value" not in params or params["new_value"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `new_value` when calling `set_system_param`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_hosts_in_hostgroup`") # noqa: E501 + # verify the required parameter 'hostgroup' is set + if self.api_client.client_side_validation and ('hostgroup' not in local_var_params or # noqa: E501 + local_var_params['hostgroup'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `hostgroup` when calling `update_hosts_in_hostgroup`") # noqa: E501 + # verify the required parameter 'host_group_member_params_list' is set + if self.api_client.client_side_validation and ('host_group_member_params_list' not in local_var_params or # noqa: E501 + local_var_params['host_group_member_params_list'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `host_group_member_params_list` when calling `update_hosts_in_hostgroup`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'hostgroup' in local_var_params: + path_params['hostgroup'] = local_var_params['hostgroup'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "new_value" in params: - body_params = params["new_value"] + if 'host_group_member_params_list' in local_var_params: + body_params = local_var_params['host_group_member_params_list'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/em/param/{name}", - "POST", + '/config/server/{server}/hostgroup/{hostgroup}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def setasprimary(self, server, **kwargs): # noqa: E501 - """Set secondary server as Primary on a specified Server # noqa: E501 + def update_load_balancer(self, server, load_balancer, load_balancer_parameters, **kwargs): # noqa: E501 + """update loadBalancer # noqa: E501 - Set secondary server as Primary on a specified Server # noqa: E501 + Update an existing loadBalancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.setasprimary(server, async_req=True) + + >>> thread = api.update_load_balancer(server, load_balancer, load_balancer_parameters, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: (required) - :return: SuccessData + :param server: The Server the loadBalncer is going to be added to. (required) + :type server: str + :param load_balancer: The loadbalncer to be updated. (required) + :type load_balancer: str + :param load_balancer_parameters: The parameters list. (required) + :type load_balancer_parameters: SetAgentParamsList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.setasprimary_with_http_info(server, **kwargs) # noqa: E501 - else: - (data) = self.setasprimary_with_http_info(server, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_load_balancer_with_http_info(server, load_balancer, load_balancer_parameters, **kwargs) # noqa: E501 - def setasprimary_with_http_info(self, server, **kwargs): # noqa: E501 - """Set secondary server as Primary on a specified Server # noqa: E501 + def update_load_balancer_with_http_info(self, server, load_balancer, load_balancer_parameters, **kwargs): # noqa: E501 + """update loadBalancer # noqa: E501 - Set secondary server as Primary on a specified Server # noqa: E501 + Update an existing loadBalancer. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.setasprimary_with_http_info(server, async_req=True) + + >>> thread = api.update_load_balancer_with_http_info(server, load_balancer, load_balancer_parameters, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: (required) - :return: SuccessData + :param server: The Server the loadBalncer is going to be added to. (required) + :type server: str + :param load_balancer: The loadbalncer to be updated. (required) + :type load_balancer: str + :param load_balancer_parameters: The parameters list. (required) + :type load_balancer_parameters: SetAgentParamsList + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'load_balancer', + 'load_balancer_parameters' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method setasprimary" % key + " to method update_load_balancer" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `setasprimary`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_load_balancer`") # noqa: E501 + # verify the required parameter 'load_balancer' is set + if self.api_client.client_side_validation and ('load_balancer' not in local_var_params or # noqa: E501 + local_var_params['load_balancer'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `load_balancer` when calling `update_load_balancer`") # noqa: E501 + # verify the required parameter 'load_balancer_parameters' is set + if self.api_client.client_side_validation and ('load_balancer_parameters' not in local_var_params or # noqa: E501 + local_var_params['load_balancer_parameters'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `load_balancer_parameters` when calling `update_load_balancer`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'load_balancer' in local_var_params: + path_params['loadBalancer'] = local_var_params['load_balancer'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'load_balancer_parameters' in local_var_params: + body_params = local_var_params['load_balancer_parameters'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/setasprimary", - "PUT", + '/config/server/{server}/loadbalancer/{loadBalancer}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def test_run_as_user(self, server, agent, user, **kwargs): # noqa: E501 - """Test existed Run-as user # noqa: E501 + def update_mft_configuration(self, server, agent, mft_configuration_data, **kwargs): # noqa: E501 + """Update MFT Configuration # noqa: E501 - Test existing Run-as user in server. # noqa: E501 + Update MFT Configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.test_run_as_user(server, agent, user, async_req=True) + + >>> thread = api.update_mft_configuration(server, agent, mft_configuration_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :param RunAsUserDetailsData run_as_user_details_data: Run as user details data - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param mft_configuration_data: MFT Configuration Data (required) + :type mft_configuration_data: MftConfigurationData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.test_run_as_user_with_http_info( - server, agent, user, **kwargs - ) # noqa: E501 - else: - (data) = self.test_run_as_user_with_http_info( - server, agent, user, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_mft_configuration_with_http_info(server, agent, mft_configuration_data, **kwargs) # noqa: E501 - def test_run_as_user_with_http_info( - self, server, agent, user, **kwargs - ): # noqa: E501 - """Test existed Run-as user # noqa: E501 + def update_mft_configuration_with_http_info(self, server, agent, mft_configuration_data, **kwargs): # noqa: E501 + """Update MFT Configuration # noqa: E501 - Test existing Run-as user in server. # noqa: E501 + Update MFT Configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.test_run_as_user_with_http_info(server, agent, user, async_req=True) + + >>> thread = api.update_mft_configuration_with_http_info(server, agent, mft_configuration_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :param RunAsUserDetailsData run_as_user_details_data: Run as user details data - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param mft_configuration_data: MFT Configuration Data (required) + :type mft_configuration_data: MftConfigurationData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "user", - "run_as_user_details_data", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'server', + 'agent', + 'mft_configuration_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method test_run_as_user" % key + " to method update_mft_configuration" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `test_run_as_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_mft_configuration`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `test_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `test_run_as_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `update_mft_configuration`") # noqa: E501 + # verify the required parameter 'mft_configuration_data' is set + if self.api_client.client_side_validation and ('mft_configuration_data' not in local_var_params or # noqa: E501 + local_var_params['mft_configuration_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `mft_configuration_data` when calling `update_mft_configuration`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "run_as_user_details_data" in params: - body_params = params["run_as_user_details_data"] + if 'mft_configuration_data' in local_var_params: + body_params = local_var_params['mft_configuration_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/runasuser/{agent}/{user}/test", - "POST", + '/config/server/{server}/agent/{agent}/mft/configuration', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_archive_rule(self, rule_name, archive_rule, **kwargs): # noqa: E501 - """Edit Workload Archiving rule # noqa: E501 + def update_mft_folder(self, folder_name, folder_properties_data, **kwargs): # noqa: E501 + """Update an existing virtual folder in MFT. # noqa: E501 - Edit Workload Archiving rule details # noqa: E501 + Update an existing virtual folder in MFT. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_archive_rule(rule_name, archive_rule, async_req=True) + + >>> thread = api.update_mft_folder(folder_name, folder_properties_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str rule_name: Rule name to update (required) - :param ArchiveRule archive_rule: Edit Workload Archiving rule details (required) - :return: SuccessData + :param folder_name: Name of folder (required) + :type folder_name: str + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_archive_rule_with_http_info( - rule_name, archive_rule, **kwargs - ) # noqa: E501 - else: - (data) = self.update_archive_rule_with_http_info( - rule_name, archive_rule, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_mft_folder_with_http_info(folder_name, folder_properties_data, **kwargs) # noqa: E501 - def update_archive_rule_with_http_info( - self, rule_name, archive_rule, **kwargs - ): # noqa: E501 - """Edit Workload Archiving rule # noqa: E501 + def update_mft_folder_with_http_info(self, folder_name, folder_properties_data, **kwargs): # noqa: E501 + """Update an existing virtual folder in MFT. # noqa: E501 - Edit Workload Archiving rule details # noqa: E501 + Update an existing virtual folder in MFT. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_archive_rule_with_http_info(rule_name, archive_rule, async_req=True) + + >>> thread = api.update_mft_folder_with_http_info(folder_name, folder_properties_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str rule_name: Rule name to update (required) - :param ArchiveRule archive_rule: Edit Workload Archiving rule details (required) - :return: SuccessData + :param folder_name: Name of folder (required) + :type folder_name: str + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["rule_name", "archive_rule"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'folder_name', + 'folder_properties_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_archive_rule" % key + " to method update_mft_folder" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'rule_name' is set - if self.api_client.client_side_validation and ( - "rule_name" not in params or params["rule_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `rule_name` when calling `update_archive_rule`" - ) # noqa: E501 - # verify the required parameter 'archive_rule' is set - if self.api_client.client_side_validation and ( - "archive_rule" not in params or params["archive_rule"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `archive_rule` when calling `update_archive_rule`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `update_mft_folder`") # noqa: E501 + # verify the required parameter 'folder_properties_data' is set + if self.api_client.client_side_validation and ('folder_properties_data' not in local_var_params or # noqa: E501 + local_var_params['folder_properties_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_properties_data` when calling `update_mft_folder`") # noqa: E501 collection_formats = {} path_params = {} - if "rule_name" in params: - path_params["ruleName"] = params["rule_name"] # noqa: E501 + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "archive_rule" in params: - body_params = params["archive_rule"] + if 'folder_properties_data' in local_var_params: + body_params = local_var_params['folder_properties_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/archive/rule/{ruleName}", - "POST", + '/config/mft/virtualfolder/{folderName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_external_user( - self, username, external_user_data, **kwargs - ): # noqa: E501 - """Update an external user # noqa: E501 + def update_mft_folder_for_site(self, site_name, folder_name, folder_properties_data, **kwargs): # noqa: E501 + """Update an existing virtual folder in MFT for site. # noqa: E501 - Update an external user for b2b # noqa: E501 + Update an existing virtual folder in MFT for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_external_user(username, external_user_data, async_req=True) + + >>> thread = api.update_mft_folder_for_site(site_name, folder_name, folder_properties_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str username: The external user name (required) - :param ExternalUserData external_user_data: External user data (required) - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_external_user_with_http_info( - username, external_user_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_external_user_with_http_info( - username, external_user_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_mft_folder_for_site_with_http_info(site_name, folder_name, folder_properties_data, **kwargs) # noqa: E501 - def update_external_user_with_http_info( - self, username, external_user_data, **kwargs - ): # noqa: E501 - """Update an external user # noqa: E501 + def update_mft_folder_for_site_with_http_info(self, site_name, folder_name, folder_properties_data, **kwargs): # noqa: E501 + """Update an existing virtual folder in MFT for site. # noqa: E501 - Update an external user for b2b # noqa: E501 + Update an existing virtual folder in MFT for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_external_user_with_http_info(username, external_user_data, async_req=True) + + >>> thread = api.update_mft_folder_for_site_with_http_info(site_name, folder_name, folder_properties_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str username: The external user name (required) - :param ExternalUserData external_user_data: External user data (required) - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param folder_name: Name of folder (required) + :type folder_name: str + :param folder_properties_data: virtual folder data (required) + :type folder_properties_data: FolderPropertiesData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["username", "external_user_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'folder_name', + 'folder_properties_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_external_user" % key + " to method update_mft_folder_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'username' is set - if self.api_client.client_side_validation and ( - "username" not in params or params["username"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `username` when calling `update_external_user`" - ) # noqa: E501 - # verify the required parameter 'external_user_data' is set - if self.api_client.client_side_validation and ( - "external_user_data" not in params or params["external_user_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `external_user_data` when calling `update_external_user`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `update_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'folder_name' is set + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `update_mft_folder_for_site`") # noqa: E501 + # verify the required parameter 'folder_properties_data' is set + if self.api_client.client_side_validation and ('folder_properties_data' not in local_var_params or # noqa: E501 + local_var_params['folder_properties_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_properties_data` when calling `update_mft_folder_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "username" in params: - path_params["username"] = params["username"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "external_user_data" in params: - body_params = params["external_user_data"] + if 'folder_properties_data' in local_var_params: + body_params = local_var_params['folder_properties_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/externaluser/{username}", - "POST", + '/config/mfte/site/{siteName}/virtualfolder/{folderName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_fts_settings( - self, server, agent, fts_settings_data, **kwargs - ): # noqa: E501 - """Update File Transfer Server (FTS) configuration data. # noqa: E501 + def update_mft_processing_rule_for_site(self, site_name, rule_name, rule_properties_file, **kwargs): # noqa: E501 + """Update MFTE processing rule for site # noqa: E501 - Update File Transfer Server (FTS) configuration data. # noqa: E501 + Update MFTE processing rule for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_fts_settings(server, agent, fts_settings_data, async_req=True) + + >>> thread = api.update_mft_processing_rule_for_site(site_name, rule_name, rule_properties_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param FtsSettingsData fts_settings_data: File Transfer Server (FTS) configuration data (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param rule_name: processing rule name (required) + :type rule_name: str + :param rule_properties_file: File with contenet of rule properties data. (required) + :type rule_properties_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_fts_settings_with_http_info( - server, agent, fts_settings_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_fts_settings_with_http_info( - server, agent, fts_settings_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_mft_processing_rule_for_site_with_http_info(site_name, rule_name, rule_properties_file, **kwargs) # noqa: E501 - def update_fts_settings_with_http_info( - self, server, agent, fts_settings_data, **kwargs - ): # noqa: E501 - """Update File Transfer Server (FTS) configuration data. # noqa: E501 + def update_mft_processing_rule_for_site_with_http_info(self, site_name, rule_name, rule_properties_file, **kwargs): # noqa: E501 + """Update MFTE processing rule for site # noqa: E501 - Update File Transfer Server (FTS) configuration data. # noqa: E501 + Update MFTE processing rule for site # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_fts_settings_with_http_info(server, agent, fts_settings_data, async_req=True) + + >>> thread = api.update_mft_processing_rule_for_site_with_http_info(site_name, rule_name, rule_properties_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param FtsSettingsData fts_settings_data: File Transfer Server (FTS) configuration data (required) - :return: SuccessData + :param site_name: site name (required) + :type site_name: str + :param rule_name: processing rule name (required) + :type rule_name: str + :param rule_properties_file: File with contenet of rule properties data. (required) + :type rule_properties_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "fts_settings_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'site_name', + 'rule_name', + 'rule_properties_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_fts_settings" % key + " to method update_mft_processing_rule_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_fts_settings`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `update_fts_settings`" - ) # noqa: E501 - # verify the required parameter 'fts_settings_data' is set - if self.api_client.client_side_validation and ( - "fts_settings_data" not in params or params["fts_settings_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `fts_settings_data` when calling `update_fts_settings`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `update_mft_processing_rule_for_site`") # noqa: E501 + # verify the required parameter 'rule_name' is set + if self.api_client.client_side_validation and ('rule_name' not in local_var_params or # noqa: E501 + local_var_params['rule_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_name` when calling `update_mft_processing_rule_for_site`") # noqa: E501 + # verify the required parameter 'rule_properties_file' is set + if self.api_client.client_side_validation and ('rule_properties_file' not in local_var_params or # noqa: E501 + local_var_params['rule_properties_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rule_properties_file` when calling `update_mft_processing_rule_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'rule_name' in local_var_params: + path_params['ruleName'] = local_var_params['rule_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} + if 'rule_properties_file' in local_var_params: + local_var_files['rulePropertiesFile'] = local_var_params['rule_properties_file'] # noqa: E501 body_params = None - if "fts_settings_data" in params: - body_params = params["fts_settings_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/fts/settings", - "POST", + '/config/mfte/site/{siteName}/processingRule/{ruleName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_hosts_in_hostgroup( - self, server, hostgroup, host_group_member_params_list, **kwargs - ): # noqa: E501 - """update agents in hostgroup. # noqa: E501 + def update_mft_user_group(self, name, user_group_details_data, **kwargs): # noqa: E501 + """Update user group. # noqa: E501 - update agents in hostgroup. # noqa: E501 + Update user group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_hosts_in_hostgroup(server, hostgroup, host_group_member_params_list, async_req=True) + + >>> thread = api.update_mft_user_group(name, user_group_details_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str hostgroup: The hostgroup name (required) - :param HostgroupProperties host_group_member_params_list: Agent list to update in a hostgroup (required) - :return: SuccessData + :param name: User group name (required) + :type name: str + :param user_group_details_data: User group details (required) + :type user_group_details_data: UserGroupDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_hosts_in_hostgroup_with_http_info( - server, hostgroup, host_group_member_params_list, **kwargs - ) # noqa: E501 - else: - (data) = self.update_hosts_in_hostgroup_with_http_info( - server, hostgroup, host_group_member_params_list, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_mft_user_group_with_http_info(name, user_group_details_data, **kwargs) # noqa: E501 - def update_hosts_in_hostgroup_with_http_info( - self, server, hostgroup, host_group_member_params_list, **kwargs - ): # noqa: E501 - """update agents in hostgroup. # noqa: E501 + def update_mft_user_group_with_http_info(self, name, user_group_details_data, **kwargs): # noqa: E501 + """Update user group. # noqa: E501 - update agents in hostgroup. # noqa: E501 + Update user group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_hosts_in_hostgroup_with_http_info(server, hostgroup, host_group_member_params_list, async_req=True) + + >>> thread = api.update_mft_user_group_with_http_info(name, user_group_details_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server the agent is connected to. (required) - :param str hostgroup: The hostgroup name (required) - :param HostgroupProperties host_group_member_params_list: Agent list to update in a hostgroup (required) - :return: SuccessData + :param name: User group name (required) + :type name: str + :param user_group_details_data: User group details (required) + :type user_group_details_data: UserGroupDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "hostgroup", - "host_group_member_params_list", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'name', + 'user_group_details_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_hosts_in_hostgroup" % key + " to method update_mft_user_group" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_hosts_in_hostgroup`" - ) # noqa: E501 - # verify the required parameter 'hostgroup' is set - if self.api_client.client_side_validation and ( - "hostgroup" not in params or params["hostgroup"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `hostgroup` when calling `update_hosts_in_hostgroup`" - ) # noqa: E501 - # verify the required parameter 'host_group_member_params_list' is set - if self.api_client.client_side_validation and ( - "host_group_member_params_list" not in params - or params["host_group_member_params_list"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `host_group_member_params_list` when calling `update_hosts_in_hostgroup`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `update_mft_user_group`") # noqa: E501 + # verify the required parameter 'user_group_details_data' is set + if self.api_client.client_side_validation and ('user_group_details_data' not in local_var_params or # noqa: E501 + local_var_params['user_group_details_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_group_details_data` when calling `update_mft_user_group`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "hostgroup" in params: - path_params["hostgroup"] = params["hostgroup"] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "host_group_member_params_list" in params: - body_params = params["host_group_member_params_list"] + if 'user_group_details_data' in local_var_params: + body_params = local_var_params['user_group_details_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/hostgroup/{hostgroup}", - "POST", + '/config/mft/usergroup/{name}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_mft_configuration( - self, server, agent, mft_configuration_data, **kwargs - ): # noqa: E501 - """Update MFT Configuration # noqa: E501 + def update_mft_user_group_for_site(self, site_name, name, user_group_details_data, **kwargs): # noqa: E501 + """Update user group for site. # noqa: E501 - Update MFT Configuration # noqa: E501 + Update user group for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_mft_configuration(server, agent, mft_configuration_data, async_req=True) + + >>> thread = api.update_mft_user_group_for_site(site_name, name, user_group_details_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param MftConfigurationData mft_configuration_data: MFT Configuration Data (required) - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param name: User group name (required) + :type name: str + :param user_group_details_data: User group details (required) + :type user_group_details_data: UserGroupDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_mft_configuration_with_http_info( - server, agent, mft_configuration_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_mft_configuration_with_http_info( - server, agent, mft_configuration_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_mft_user_group_for_site_with_http_info(site_name, name, user_group_details_data, **kwargs) # noqa: E501 - def update_mft_configuration_with_http_info( - self, server, agent, mft_configuration_data, **kwargs - ): # noqa: E501 - """Update MFT Configuration # noqa: E501 + def update_mft_user_group_for_site_with_http_info(self, site_name, name, user_group_details_data, **kwargs): # noqa: E501 + """Update user group for site. # noqa: E501 - Update MFT Configuration # noqa: E501 + Update user group for site. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_mft_configuration_with_http_info(server, agent, mft_configuration_data, async_req=True) + + >>> thread = api.update_mft_user_group_for_site_with_http_info(site_name, name, user_group_details_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param MftConfigurationData mft_configuration_data: MFT Configuration Data (required) - :return: SuccessData + :param site_name: The site name. (required) + :type site_name: str + :param name: User group name (required) + :type name: str + :param user_group_details_data: User group details (required) + :type user_group_details_data: UserGroupDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "mft_configuration_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_name', + 'name', + 'user_group_details_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_mft_configuration" % key + " to method update_mft_user_group_for_site" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_mft_configuration`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `update_mft_configuration`" - ) # noqa: E501 - # verify the required parameter 'mft_configuration_data' is set - if self.api_client.client_side_validation and ( - "mft_configuration_data" not in params - or params["mft_configuration_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `mft_configuration_data` when calling `update_mft_configuration`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_name' is set + if self.api_client.client_side_validation and ('site_name' not in local_var_params or # noqa: E501 + local_var_params['site_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_name` when calling `update_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `update_mft_user_group_for_site`") # noqa: E501 + # verify the required parameter 'user_group_details_data' is set + if self.api_client.client_side_validation and ('user_group_details_data' not in local_var_params or # noqa: E501 + local_var_params['user_group_details_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_group_details_data` when calling `update_mft_user_group_for_site`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 + if 'site_name' in local_var_params: + path_params['siteName'] = local_var_params['site_name'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "mft_configuration_data" in params: - body_params = params["mft_configuration_data"] + if 'user_group_details_data' in local_var_params: + body_params = local_var_params['user_group_details_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/configuration", - "POST", + '/config/mfte/site/{siteName}/usergroup/{name}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_mft_folder( - self, folder_name, folder_properties_data, **kwargs - ): # noqa: E501 - """Update an existing virtual folder in MFT. # noqa: E501 + def update_pgp_template(self, server, agent, template_name, pgp_template_data, **kwargs): # noqa: E501 + """Update PGP Template # noqa: E501 - Update an existing virtual folder in MFT. # noqa: E501 + Update PGP Template # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_mft_folder(folder_name, folder_properties_data, async_req=True) + + >>> thread = api.update_pgp_template(server, agent, template_name, pgp_template_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :param FolderPropertiesData folder_properties_data: virtual folder data (required) - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The PGP Template Name (required) + :type template_name: str + :param pgp_template_data: PGP Template Data (required) + :type pgp_template_data: PgpTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_mft_folder_with_http_info( - folder_name, folder_properties_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_mft_folder_with_http_info( - folder_name, folder_properties_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_pgp_template_with_http_info(server, agent, template_name, pgp_template_data, **kwargs) # noqa: E501 - def update_mft_folder_with_http_info( - self, folder_name, folder_properties_data, **kwargs - ): # noqa: E501 - """Update an existing virtual folder in MFT. # noqa: E501 + def update_pgp_template_with_http_info(self, server, agent, template_name, pgp_template_data, **kwargs): # noqa: E501 + """Update PGP Template # noqa: E501 - Update an existing virtual folder in MFT. # noqa: E501 + Update PGP Template # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_mft_folder_with_http_info(folder_name, folder_properties_data, async_req=True) + + >>> thread = api.update_pgp_template_with_http_info(server, agent, template_name, pgp_template_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str folder_name: Name of folder (required) - :param FolderPropertiesData folder_properties_data: virtual folder data (required) - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The PGP Template Name (required) + :type template_name: str + :param pgp_template_data: PGP Template Data (required) + :type pgp_template_data: PgpTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["folder_name", "folder_properties_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'template_name', + 'pgp_template_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_mft_folder" % key + " to method update_pgp_template" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'folder_name' is set - if self.api_client.client_side_validation and ( - "folder_name" not in params or params["folder_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_name` when calling `update_mft_folder`" - ) # noqa: E501 - # verify the required parameter 'folder_properties_data' is set - if self.api_client.client_side_validation and ( - "folder_properties_data" not in params - or params["folder_properties_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_properties_data` when calling `update_mft_folder`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_pgp_template`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `update_pgp_template`") # noqa: E501 + # verify the required parameter 'template_name' is set + if self.api_client.client_side_validation and ('template_name' not in local_var_params or # noqa: E501 + local_var_params['template_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_name` when calling `update_pgp_template`") # noqa: E501 + # verify the required parameter 'pgp_template_data' is set + if self.api_client.client_side_validation and ('pgp_template_data' not in local_var_params or # noqa: E501 + local_var_params['pgp_template_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `pgp_template_data` when calling `update_pgp_template`") # noqa: E501 collection_formats = {} path_params = {} - if "folder_name" in params: - path_params["folderName"] = params["folder_name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'template_name' in local_var_params: + path_params['templateName'] = local_var_params['template_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "folder_properties_data" in params: - body_params = params["folder_properties_data"] + if 'pgp_template_data' in local_var_params: + body_params = local_var_params['pgp_template_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/virtualfolder/{folderName}", - "POST", + '/config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_mft_user_group( - self, name, user_group_details_data, **kwargs - ): # noqa: E501 - """Update user group. # noqa: E501 + def update_role(self, role, role_file, **kwargs): # noqa: E501 + """Update Authorization Role # noqa: E501 - Update user group. # noqa: E501 + Update Authorization Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_mft_user_group(name, user_group_details_data, async_req=True) + + >>> thread = api.update_role(role, role_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: User group name (required) - :param UserGroupDetailsData user_group_details_data: User group details (required) - :return: SuccessData + :param role: The Role name. (required) + :type role: str + :param role_file: File with contenet of Role Data. (required) + :type role_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_mft_user_group_with_http_info( - name, user_group_details_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_mft_user_group_with_http_info( - name, user_group_details_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_role_with_http_info(role, role_file, **kwargs) # noqa: E501 - def update_mft_user_group_with_http_info( - self, name, user_group_details_data, **kwargs - ): # noqa: E501 - """Update user group. # noqa: E501 + def update_role_with_http_info(self, role, role_file, **kwargs): # noqa: E501 + """Update Authorization Role # noqa: E501 - Update user group. # noqa: E501 + Update Authorization Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_mft_user_group_with_http_info(name, user_group_details_data, async_req=True) + + >>> thread = api.update_role_with_http_info(role, role_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: User group name (required) - :param UserGroupDetailsData user_group_details_data: User group details (required) - :return: SuccessData + :param role: The Role name. (required) + :type role: str + :param role_file: File with contenet of Role Data. (required) + :type role_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "user_group_details_data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'role', + 'role_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_mft_user_group" % key + " to method update_role" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `update_mft_user_group`" - ) # noqa: E501 - # verify the required parameter 'user_group_details_data' is set - if self.api_client.client_side_validation and ( - "user_group_details_data" not in params - or params["user_group_details_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user_group_details_data` when calling `update_mft_user_group`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'role' is set + if self.api_client.client_side_validation and ('role' not in local_var_params or # noqa: E501 + local_var_params['role'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role` when calling `update_role`") # noqa: E501 + # verify the required parameter 'role_file' is set + if self.api_client.client_side_validation and ('role_file' not in local_var_params or # noqa: E501 + local_var_params['role_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `role_file` when calling `update_role`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'role' in local_var_params: + path_params['role'] = local_var_params['role'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} + if 'role_file' in local_var_params: + local_var_files['roleFile'] = local_var_params['role_file'] # noqa: E501 body_params = None - if "user_group_details_data" in params: - body_params = params["user_group_details_data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/mft/usergroup/{name}", - "POST", + '/config/authorization/role/{role}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_pgp_template( - self, server, agent, template_name, pgp_template_data, **kwargs - ): # noqa: E501 - """Update PGP Template # noqa: E501 + def update_run_as_user(self, server, agent, user, run_as_user_details_data, **kwargs): # noqa: E501 + """Update Run-as user # noqa: E501 - Update PGP Template # noqa: E501 + Update Run-as user details in server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_pgp_template(server, agent, template_name, pgp_template_data, async_req=True) + + >>> thread = api.update_run_as_user(server, agent, user, run_as_user_details_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The PGP Template Name (required) - :param PgpTemplateData pgp_template_data: PGP Template Data (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param run_as_user_details_data: Run as user details data (required) + :type run_as_user_details_data: RunAsUserDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_pgp_template_with_http_info( - server, agent, template_name, pgp_template_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_pgp_template_with_http_info( - server, agent, template_name, pgp_template_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_run_as_user_with_http_info(server, agent, user, run_as_user_details_data, **kwargs) # noqa: E501 - def update_pgp_template_with_http_info( - self, server, agent, template_name, pgp_template_data, **kwargs - ): # noqa: E501 - """Update PGP Template # noqa: E501 + def update_run_as_user_with_http_info(self, server, agent, user, run_as_user_details_data, **kwargs): # noqa: E501 + """Update Run-as user # noqa: E501 - Update PGP Template # noqa: E501 + Update Run-as user details in server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_pgp_template_with_http_info(server, agent, template_name, pgp_template_data, async_req=True) + + >>> thread = api.update_run_as_user_with_http_info(server, agent, user, run_as_user_details_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The PGP Template Name (required) - :param PgpTemplateData pgp_template_data: PGP Template Data (required) - :return: SuccessData + :param server: The Server. (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param user: The user name (required) + :type user: str + :param run_as_user_details_data: Run as user details data (required) + :type run_as_user_details_data: RunAsUserDetailsData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "template_name", - "pgp_template_data", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'server', + 'agent', + 'user', + 'run_as_user_details_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_pgp_template" % key + " to method update_run_as_user" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_pgp_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_run_as_user`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `update_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'template_name' is set - if self.api_client.client_side_validation and ( - "template_name" not in params or params["template_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `template_name` when calling `update_pgp_template`" - ) # noqa: E501 - # verify the required parameter 'pgp_template_data' is set - if self.api_client.client_side_validation and ( - "pgp_template_data" not in params or params["pgp_template_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `pgp_template_data` when calling `update_pgp_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `update_run_as_user`") # noqa: E501 + # verify the required parameter 'user' is set + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `update_run_as_user`") # noqa: E501 + # verify the required parameter 'run_as_user_details_data' is set + if self.api_client.client_side_validation and ('run_as_user_details_data' not in local_var_params or # noqa: E501 + local_var_params['run_as_user_details_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_as_user_details_data` when calling `update_run_as_user`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "template_name" in params: - path_params["templateName"] = params["template_name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "pgp_template_data" in params: - body_params = params["pgp_template_data"] + if 'run_as_user_details_data' in local_var_params: + body_params = local_var_params['run_as_user_details_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/pgptemplate/{templateName}", - "PUT", + '/config/server/{server}/runasuser/{agent}/{user}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_role(self, role, role_file, **kwargs): # noqa: E501 - """Update Authorization Role # noqa: E501 + def update_secret(self, name, **kwargs): # noqa: E501 + """Update an existing secret # noqa: E501 - Update Authorization Role # noqa: E501 + Update an existing secret in the secrets vault. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_role(role, role_file, async_req=True) + + >>> thread = api.update_secret(name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. (required) - :param file role_file: File with contenet of Role Data. (required) - :return: SuccessData + :param name: The name of the secret to update (required) + :type name: str + :param value: The new value for the secret + :type value: SecretValue + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_role_with_http_info( - role, role_file, **kwargs - ) # noqa: E501 - else: - (data) = self.update_role_with_http_info( - role, role_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_secret_with_http_info(name, **kwargs) # noqa: E501 - def update_role_with_http_info(self, role, role_file, **kwargs): # noqa: E501 - """Update Authorization Role # noqa: E501 + def update_secret_with_http_info(self, name, **kwargs): # noqa: E501 + """Update an existing secret # noqa: E501 - Update Authorization Role # noqa: E501 + Update an existing secret in the secrets vault. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_role_with_http_info(role, role_file, async_req=True) + + >>> thread = api.update_secret_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str role: The Role name. (required) - :param file role_file: File with contenet of Role Data. (required) - :return: SuccessData + :param name: The name of the secret to update (required) + :type name: str + :param value: The new value for the secret + :type value: SecretValue + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["role", "role_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name', + 'value' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_role" % key + " to method update_secret" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'role' is set - if self.api_client.client_side_validation and ( - "role" not in params or params["role"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role` when calling `update_role`" - ) # noqa: E501 - # verify the required parameter 'role_file' is set - if self.api_client.client_side_validation and ( - "role_file" not in params or params["role_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `role_file` when calling `update_role`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `update_secret`") # noqa: E501 collection_formats = {} path_params = {} - if "role" in params: - path_params["role"] = params["role"] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "role_file" in params: - local_var_files["roleFile"] = params["role_file"] # noqa: E501 body_params = None + if 'value' in local_var_params: + body_params = local_var_params['value'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/role/{role}", - "POST", + '/config/secret/{name}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_run_as_user( - self, server, agent, user, run_as_user_details_data, **kwargs - ): # noqa: E501 - """Update Run-as user # noqa: E501 + def update_server(self, server, params, **kwargs): # noqa: E501 + """Update Server # noqa: E501 - Update Run-as user details in server. # noqa: E501 + Update Server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_run_as_user(server, agent, user, run_as_user_details_data, async_req=True) + + >>> thread = api.update_server(server, params, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :param RunAsUserDetailsData run_as_user_details_data: Run as user details data (required) - :return: SuccessData + :param server: Server host name. (required) + :type server: str + :param params: (required) + :type params: ServerEditParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_run_as_user_with_http_info( - server, agent, user, run_as_user_details_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_run_as_user_with_http_info( - server, agent, user, run_as_user_details_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_server_with_http_info(server, params, **kwargs) # noqa: E501 - def update_run_as_user_with_http_info( - self, server, agent, user, run_as_user_details_data, **kwargs - ): # noqa: E501 - """Update Run-as user # noqa: E501 + def update_server_with_http_info(self, server, params, **kwargs): # noqa: E501 + """Update Server # noqa: E501 - Update Run-as user details in server. # noqa: E501 + Update Server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_run_as_user_with_http_info(server, agent, user, run_as_user_details_data, async_req=True) + + >>> thread = api.update_server_with_http_info(server, params, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server. (required) - :param str agent: The Agent (required) - :param str user: The user name (required) - :param RunAsUserDetailsData run_as_user_details_data: Run as user details data (required) - :return: SuccessData + :param server: Server host name. (required) + :type server: str + :param params: (required) + :type params: ServerEditParams + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "user", - "run_as_user_details_data", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'server', + 'params' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_run_as_user" % key + " to method update_server" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `update_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `update_run_as_user`" - ) # noqa: E501 - # verify the required parameter 'run_as_user_details_data' is set - if self.api_client.client_side_validation and ( - "run_as_user_details_data" not in params - or params["run_as_user_details_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `run_as_user_details_data` when calling `update_run_as_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_server`") # noqa: E501 + # verify the required parameter 'params' is set + if self.api_client.client_side_validation and ('params' not in local_var_params or # noqa: E501 + local_var_params['params'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `params` when calling `update_server`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "run_as_user_details_data" in params: - body_params = params["run_as_user_details_data"] + if 'params' in local_var_params: + body_params = local_var_params['params'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/runasuser/{agent}/{user}", - "POST", + '/config/server/{server}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_secret(self, name, **kwargs): # noqa: E501 - """Update an existing secret # noqa: E501 + def update_ssh_key(self, ctm, ssh_key_data, **kwargs): # noqa: E501 + """Update an SSH key in the control-m server. # noqa: E501 - Update an existing secret in the secrets vault. # noqa: E501 + Update an SSH key in the control-m server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_secret(name, async_req=True) + + >>> thread = api.update_ssh_key(ctm, ssh_key_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The name of the secret to update (required) - :param SecretValue value: The new value for the secret - :return: SuccessData + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param ssh_key_data: The parameters of the ssh key name password type format bits. (required) + :type ssh_key_data: SSHKeyData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_secret_with_http_info(name, **kwargs) # noqa: E501 - else: - (data) = self.update_secret_with_http_info(name, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_ssh_key_with_http_info(ctm, ssh_key_data, **kwargs) # noqa: E501 - def update_secret_with_http_info(self, name, **kwargs): # noqa: E501 - """Update an existing secret # noqa: E501 + def update_ssh_key_with_http_info(self, ctm, ssh_key_data, **kwargs): # noqa: E501 + """Update an SSH key in the control-m server. # noqa: E501 - Update an existing secret in the secrets vault. # noqa: E501 + Update an SSH key in the control-m server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_secret_with_http_info(name, async_req=True) + + >>> thread = api.update_ssh_key_with_http_info(ctm, ssh_key_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The name of the secret to update (required) - :param SecretValue value: The new value for the secret - :return: SuccessData + :param ctm: Name of the Control-M/Server. (required) + :type ctm: str + :param ssh_key_data: The parameters of the ssh key name password type format bits. (required) + :type ssh_key_data: SSHKeyData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "value"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'ctm', + 'ssh_key_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method update_secret" % key + " to method update_ssh_key" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `update_secret`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'ctm' is set + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `update_ssh_key`") # noqa: E501 + # verify the required parameter 'ssh_key_data' is set + if self.api_client.client_side_validation and ('ssh_key_data' not in local_var_params or # noqa: E501 + local_var_params['ssh_key_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ssh_key_data` when calling `update_ssh_key`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'ctm' in local_var_params: + path_params['ctm'] = local_var_params['ctm'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "value" in params: - body_params = params["value"] + if 'ssh_key_data' in local_var_params: + body_params = local_var_params['ssh_key_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 403: "ErrorList", + 404: "ErrorList", + 422: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/secret/{name}", - "POST", + '/config/server/{ctm}/sshkey/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def update_user(self, user, user_file, **kwargs): # noqa: E501 """Update user # noqa: E501 @@ -11539,26 +34305,31 @@ def update_user(self, user, user_file, **kwargs): # noqa: E501 Update user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user(user, user_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: The user name. (required) - :param file user_file: File with contenet of user data. (required) - :return: SuccessData + :param user: The user name. (required) + :type user: str + :param user_file: File with contenet of user data. (required) + :type user_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_user_with_http_info( - user, user_file, **kwargs - ) # noqa: E501 - else: - (data) = self.update_user_with_http_info( - user, user_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_user_with_http_info(user, user_file, **kwargs) # noqa: E501 def update_user_with_http_info(self, user, user_file, **kwargs): # noqa: E501 """Update user # noqa: E501 @@ -11566,239 +34337,297 @@ def update_user_with_http_info(self, user, user_file, **kwargs): # noqa: E501 Update user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_user_with_http_info(user, user_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str user: The user name. (required) - :param file user_file: File with contenet of user data. (required) - :return: SuccessData + :param user: The user name. (required) + :type user: str + :param user_file: File with contenet of user data. (required) + :type user_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["user", "user_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user', + 'user_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_user" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'user' is set - if self.api_client.client_side_validation and ( - "user" not in params or params["user"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user` when calling `update_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('user' not in local_var_params or # noqa: E501 + local_var_params['user'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user` when calling `update_user`") # noqa: E501 # verify the required parameter 'user_file' is set - if self.api_client.client_side_validation and ( - "user_file" not in params or params["user_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `user_file` when calling `update_user`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('user_file' not in local_var_params or # noqa: E501 + local_var_params['user_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_file` when calling `update_user`") # noqa: E501 collection_formats = {} path_params = {} - if "user" in params: - path_params["user"] = params["user"] # noqa: E501 + if 'user' in local_var_params: + path_params['user'] = local_var_params['user'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "user_file" in params: - local_var_files["userFile"] = params["user_file"] # noqa: E501 + if 'user_file' in local_var_params: + local_var_files['userFile'] = local_var_params['user_file'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/authorization/user/{user}", - "POST", + '/config/authorization/user/{user}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def update_zos_template( - self, server, agent, template_name, zos_template_data, **kwargs - ): # noqa: E501 + def update_zos_template(self, server, agent, template_name, zos_template_data, **kwargs): # noqa: E501 """Update z/OS Template # noqa: E501 Update z/OS Template # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_zos_template(server, agent, template_name, zos_template_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The z/OS Template Name (required) - :param ZosTemplateData zos_template_data: z/OS Template Data (required) - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The z/OS Template Name (required) + :type template_name: str + :param zos_template_data: z/OS Template Data (required) + :type zos_template_data: ZosTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_zos_template_with_http_info( - server, agent, template_name, zos_template_data, **kwargs - ) # noqa: E501 - else: - (data) = self.update_zos_template_with_http_info( - server, agent, template_name, zos_template_data, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_zos_template_with_http_info(server, agent, template_name, zos_template_data, **kwargs) # noqa: E501 - def update_zos_template_with_http_info( - self, server, agent, template_name, zos_template_data, **kwargs - ): # noqa: E501 + def update_zos_template_with_http_info(self, server, agent, template_name, zos_template_data, **kwargs): # noqa: E501 """Update z/OS Template # noqa: E501 Update z/OS Template # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_zos_template_with_http_info(server, agent, template_name, zos_template_data, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Server (required) - :param str agent: The Agent (required) - :param str template_name: The z/OS Template Name (required) - :param ZosTemplateData zos_template_data: z/OS Template Data (required) - :return: SuccessData + :param server: The Server (required) + :type server: str + :param agent: The Agent (required) + :type agent: str + :param template_name: The z/OS Template Name (required) + :type template_name: str + :param zos_template_data: z/OS Template Data (required) + :type zos_template_data: ZosTemplateData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "server", - "agent", - "template_name", - "zos_template_data", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + 'server', + 'agent', + 'template_name', + 'zos_template_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_zos_template" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_zos_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_zos_template`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `update_zos_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `update_zos_template`") # noqa: E501 # verify the required parameter 'template_name' is set - if self.api_client.client_side_validation and ( - "template_name" not in params or params["template_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `template_name` when calling `update_zos_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('template_name' not in local_var_params or # noqa: E501 + local_var_params['template_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_name` when calling `update_zos_template`") # noqa: E501 # verify the required parameter 'zos_template_data' is set - if self.api_client.client_side_validation and ( - "zos_template_data" not in params or params["zos_template_data"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `zos_template_data` when calling `update_zos_template`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('zos_template_data' not in local_var_params or # noqa: E501 + local_var_params['zos_template_data'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `zos_template_data` when calling `update_zos_template`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "template_name" in params: - path_params["templateName"] = params["template_name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'template_name' in local_var_params: + path_params['templateName'] = local_var_params['template_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "zos_template_data" in params: - body_params = params["zos_template_data"] + if 'zos_template_data' in local_var_params: + body_params = local_var_params['zos_template_data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/config/server/{server}/agent/{agent}/mft/zostemplate/{templateName}", - "PUT", + '/config/server/{server}/agent/{agent}/mft/zostemplate/{templateName}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/deploy_api.py b/src/clients/ctm_api_client/api/deploy_api.py index eee9ef3..3d7f292 100644 --- a/src/clients/ctm_api_client/api/deploy_api.py +++ b/src/clients/ctm_api_client/api/deploy_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class DeployApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -39,26 +43,31 @@ def delete_calendar(self, calendar_name, **kwargs): # noqa: E501 Delete a calendar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_calendar(calendar_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str calendar_name: The name of the calendar to be deleted. (required) - :param str server: The name of the server in which the calendar deploy. - :return: SuccessData + :param calendar_name: The name of the calendar to be deleted. (required) + :type calendar_name: str + :param server: The name of the server in which the calendar deploy. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_calendar_with_http_info( - calendar_name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_calendar_with_http_info( - calendar_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_calendar_with_http_info(calendar_name, **kwargs) # noqa: E501 def delete_calendar_with_http_info(self, calendar_name, **kwargs): # noqa: E501 """delete a calendar # noqa: E501 @@ -66,483 +75,777 @@ def delete_calendar_with_http_info(self, calendar_name, **kwargs): # noqa: E501 Delete a calendar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_calendar_with_http_info(calendar_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str calendar_name: The name of the calendar to be deleted. (required) - :param str server: The name of the server in which the calendar deploy. - :return: SuccessData + :param calendar_name: The name of the calendar to be deleted. (required) + :type calendar_name: str + :param server: The name of the server in which the calendar deploy. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["calendar_name", "server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'calendar_name', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_calendar" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'calendar_name' is set - if self.api_client.client_side_validation and ( - "calendar_name" not in params or params["calendar_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `calendar_name` when calling `delete_calendar`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('calendar_name' not in local_var_params or # noqa: E501 + local_var_params['calendar_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `calendar_name` when calling `delete_calendar`") # noqa: E501 collection_formats = {} path_params = {} - if "calendar_name" in params: - path_params["calendarName"] = params["calendar_name"] # noqa: E501 + if 'calendar_name' in local_var_params: + path_params['calendarName'] = local_var_params['calendar_name'] # noqa: E501 query_params = [] - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/calendar/{calendarName}", - "DELETE", + '/deploy/calendar/{calendarName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_connection_profile( - self, server, agent, type, name, **kwargs - ): # noqa: E501 + def delete_connection_profile(self, server, agent, type, name, **kwargs): # noqa: E501 """Delete Local Connection Profile # noqa: E501 Delete Local Connection Profile. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_connection_profile(server, agent, type, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The name of the Control-M in which the connection profile is deployed. (required) - :param str agent: The name of the agent the connection profile is deployed on. (required) - :param str type: The type of connection profile to delete. (required) - :param str name: Name of the Connection Profile (required) - :return: SuccessData + :param server: The name of the Control-M in which the connection profile is deployed. (required) + :type server: str + :param agent: The name of the agent the connection profile is deployed on. (required) + :type agent: str + :param type: The type of connection profile to delete. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_connection_profile_with_http_info( - server, agent, type, name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_connection_profile_with_http_info( - server, agent, type, name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_connection_profile_with_http_info(server, agent, type, name, **kwargs) # noqa: E501 - def delete_connection_profile_with_http_info( - self, server, agent, type, name, **kwargs - ): # noqa: E501 + def delete_connection_profile_with_http_info(self, server, agent, type, name, **kwargs): # noqa: E501 """Delete Local Connection Profile # noqa: E501 Delete Local Connection Profile. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_connection_profile_with_http_info(server, agent, type, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The name of the Control-M in which the connection profile is deployed. (required) - :param str agent: The name of the agent the connection profile is deployed on. (required) - :param str type: The type of connection profile to delete. (required) - :param str name: Name of the Connection Profile (required) - :return: SuccessData + :param server: The name of the Control-M in which the connection profile is deployed. (required) + :type server: str + :param agent: The name of the agent the connection profile is deployed on. (required) + :type agent: str + :param type: The type of connection profile to delete. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "type", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'agent', + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_connection_profile" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_connection_profile`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `delete_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `delete_connection_profile`") # noqa: E501 # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `delete_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `delete_connection_profile`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_connection_profile`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "type" in params: - path_params["type"] = params["type"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofile/{server}/{agent}/{type}/{name}", - "DELETE", + '/deploy/connectionprofile/{server}/{agent}/{type}/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_folder(self, control_m, folder_name, **kwargs): # noqa: E501 + def delete_folder(self, server, folder_name, **kwargs): # noqa: E501 """delete a folder # noqa: E501 Delete a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_folder(control_m, folder_name, async_req=True) + + >>> thread = api.delete_folder(server, folder_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str control_m: The name of the Control-M in which the folder(s) are deployed. (required) - :param str folder_name: The name of the required folder(s). (required) - :return: SuccessData + :param server: The name of the Control-M in which the folder(s) are deployed. (required) + :type server: str + :param folder_name: The name of the required folder(s). (required) + :type folder_name: str + :param library: library be filled only for z/os. + :type library: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_folder_with_http_info( - control_m, folder_name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_folder_with_http_info( - control_m, folder_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_folder_with_http_info(server, folder_name, **kwargs) # noqa: E501 - def delete_folder_with_http_info( - self, control_m, folder_name, **kwargs - ): # noqa: E501 + def delete_folder_with_http_info(self, server, folder_name, **kwargs): # noqa: E501 """delete a folder # noqa: E501 Delete a folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_folder_with_http_info(control_m, folder_name, async_req=True) + + >>> thread = api.delete_folder_with_http_info(server, folder_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str control_m: The name of the Control-M in which the folder(s) are deployed. (required) - :param str folder_name: The name of the required folder(s). (required) - :return: SuccessData + :param server: The name of the Control-M in which the folder(s) are deployed. (required) + :type server: str + :param folder_name: The name of the required folder(s). (required) + :type folder_name: str + :param library: library be filled only for z/os. + :type library: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["control_m", "folder_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'folder_name', + 'library' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_folder" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'control_m' is set - if self.api_client.client_side_validation and ( - "control_m" not in params or params["control_m"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `control_m` when calling `delete_folder`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_folder`") # noqa: E501 # verify the required parameter 'folder_name' is set - if self.api_client.client_side_validation and ( - "folder_name" not in params or params["folder_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `folder_name` when calling `delete_folder`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('folder_name' not in local_var_params or # noqa: E501 + local_var_params['folder_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `folder_name` when calling `delete_folder`") # noqa: E501 collection_formats = {} path_params = {} - if "control_m" in params: - path_params["controlM"] = params["control_m"] # noqa: E501 - if "folder_name" in params: - path_params["folderName"] = params["folder_name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'folder_name' in local_var_params: + path_params['folderName'] = local_var_params['folder_name'] # noqa: E501 query_params = [] + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/folder/{controlM}/{folderName}", - "DELETE", + '/deploy/folder/{server}/{folderName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_job_path(self, job_path, **kwargs): # noqa: E501 + """delete a job # noqa: E501 + + Delete a job # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_job_path(job_path, async_req=True) + >>> result = thread.get() + + :param job_path: The name of the required jobPath. (required) + :type job_path: str + :param server: The name of the Control-M in which the job are deployed. + :type server: str + :param library: library be filled only for z/os. + :type library: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_job_path_with_http_info(job_path, **kwargs) # noqa: E501 + + def delete_job_path_with_http_info(self, job_path, **kwargs): # noqa: E501 + """delete a job # noqa: E501 + + Delete a job # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_job_path_with_http_info(job_path, async_req=True) + >>> result = thread.get() + + :param job_path: The name of the required jobPath. (required) + :type job_path: str + :param server: The name of the Control-M in which the job are deployed. + :type server: str + :param library: library be filled only for z/os. + :type library: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_path', + 'server', + 'library' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) - def delete_local_connection_profile( - self, server, agent, type, name, **kwargs - ): # noqa: E501 + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_job_path" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_path' is set + if self.api_client.client_side_validation and ('job_path' not in local_var_params or # noqa: E501 + local_var_params['job_path'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_path` when calling `delete_job_path`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_path' in local_var_params: + path_params['jobPath'] = local_var_params['job_path'] # noqa: E501 + + query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/job/{jobPath}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_local_connection_profile(self, server, agent, type, name, **kwargs): # noqa: E501 """Delete Local Connection Profile # noqa: E501 Delete Local Connection Profile # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_local_connection_profile(server, agent, type, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The name of the Control-M in which the connection profile is deployed. (required) - :param str agent: The name of the agent the connection profile is deployed on. (required) - :param str type: The type of connection profile to delete. (required) - :param str name: Name of the Connection Profile (required) - :return: SuccessData + :param server: The name of the Control-M in which the connection profile is deployed. (required) + :type server: str + :param agent: The name of the agent the connection profile is deployed on. (required) + :type agent: str + :param type: The type of connection profile to delete. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_local_connection_profile_with_http_info( - server, agent, type, name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_local_connection_profile_with_http_info( - server, agent, type, name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_local_connection_profile_with_http_info(server, agent, type, name, **kwargs) # noqa: E501 - def delete_local_connection_profile_with_http_info( - self, server, agent, type, name, **kwargs - ): # noqa: E501 + def delete_local_connection_profile_with_http_info(self, server, agent, type, name, **kwargs): # noqa: E501 """Delete Local Connection Profile # noqa: E501 Delete Local Connection Profile # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_local_connection_profile_with_http_info(server, agent, type, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The name of the Control-M in which the connection profile is deployed. (required) - :param str agent: The name of the agent the connection profile is deployed on. (required) - :param str type: The type of connection profile to delete. (required) - :param str name: Name of the Connection Profile (required) - :return: SuccessData + :param server: The name of the Control-M in which the connection profile is deployed. (required) + :type server: str + :param agent: The name of the agent the connection profile is deployed on. (required) + :type agent: str + :param type: The type of connection profile to delete. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "agent", "type", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'agent', + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_local_connection_profile" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_local_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_local_connection_profile`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `delete_local_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `delete_local_connection_profile`") # noqa: E501 # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `delete_local_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `delete_local_connection_profile`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_local_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_local_connection_profile`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "agent" in params: - path_params["agent"] = params["agent"] # noqa: E501 - if "type" in params: - path_params["type"] = params["type"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofile/local/{server}/{agent}/{type}/{name}", - "DELETE", + '/deploy/connectionprofile/local/{server}/{agent}/{type}/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def delete_shared_connection_profile(self, type, name, **kwargs): # noqa: E501 """Delete centralized Connection Profile # noqa: E501 @@ -550,1667 +853,4290 @@ def delete_shared_connection_profile(self, type, name, **kwargs): # noqa: E501 Delete centralized Connection Profile # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_shared_connection_profile(type, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type of connection profile to delete. (required) - :param str name: Name of the Connection Profile (required) - :return: SuccessData + :param type: The type of connection profile to delete. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_shared_connection_profile_with_http_info( - type, name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_shared_connection_profile_with_http_info( - type, name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_shared_connection_profile_with_http_info(type, name, **kwargs) # noqa: E501 - def delete_shared_connection_profile_with_http_info( - self, type, name, **kwargs - ): # noqa: E501 + def delete_shared_connection_profile_with_http_info(self, type, name, **kwargs): # noqa: E501 """Delete centralized Connection Profile # noqa: E501 Delete centralized Connection Profile # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_shared_connection_profile_with_http_info(type, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type of connection profile to delete. (required) - :param str name: Name of the Connection Profile (required) - :return: SuccessData + :param type: The type of connection profile to delete. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["type", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_shared_connection_profile" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `delete_shared_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `delete_shared_connection_profile`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_shared_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_shared_connection_profile`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/connectionprofile/centralized/{type}/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_site_standard(self, site_standard_name, **kwargs): # noqa: E501 + """Delete a Site Standard. # noqa: E501 + + Delete a Site Standard. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_site_standard(site_standard_name, async_req=True) + >>> result = thread.get() + + :param site_standard_name: The name of the Site Standard to be deleted. (required) + :type site_standard_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_site_standard_with_http_info(site_standard_name, **kwargs) # noqa: E501 + + def delete_site_standard_with_http_info(self, site_standard_name, **kwargs): # noqa: E501 + """Delete a Site Standard. # noqa: E501 + + Delete a Site Standard. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_site_standard_with_http_info(site_standard_name, async_req=True) + >>> result = thread.get() + + :param site_standard_name: The name of the Site Standard to be deleted. (required) + :type site_standard_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_standard_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_site_standard" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_standard_name' is set + if self.api_client.client_side_validation and ('site_standard_name' not in local_var_params or # noqa: E501 + local_var_params['site_standard_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_name` when calling `delete_site_standard`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'site_standard_name' in local_var_params: + path_params['siteStandardName'] = local_var_params['site_standard_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/sitestandard/{siteStandardName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_site_standard_policy(self, site_standard_policy_name, **kwargs): # noqa: E501 + """Delete a Site Standard Policy. # noqa: E501 + + Delete a Site Standard Policy. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_site_standard_policy(site_standard_policy_name, async_req=True) + >>> result = thread.get() + + :param site_standard_policy_name: The name of the Site Standard Policy to be deleted. (required) + :type site_standard_policy_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_site_standard_policy_with_http_info(site_standard_policy_name, **kwargs) # noqa: E501 + + def delete_site_standard_policy_with_http_info(self, site_standard_policy_name, **kwargs): # noqa: E501 + """Delete a Site Standard Policy. # noqa: E501 + + Delete a Site Standard Policy. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_site_standard_policy_with_http_info(site_standard_policy_name, async_req=True) + >>> result = thread.get() + + :param site_standard_policy_name: The name of the Site Standard Policy to be deleted. (required) + :type site_standard_policy_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_standard_policy_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_site_standard_policy" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_standard_policy_name' is set + if self.api_client.client_side_validation and ('site_standard_policy_name' not in local_var_params or # noqa: E501 + local_var_params['site_standard_policy_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_policy_name` when calling `delete_site_standard_policy`") # noqa: E501 collection_formats = {} path_params = {} - if "type" in params: - path_params["type"] = params["type"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'site_standard_policy_name' in local_var_params: + path_params['siteStandardPolicyName'] = local_var_params['site_standard_policy_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofile/centralized/{type}/{name}", - "DELETE", + '/deploy/sitestandardpolicy/{siteStandardPolicyName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_sub_folder(self, sub_folder_path, **kwargs): # noqa: E501 + """delete a sub folder # noqa: E501 + + Delete a sub folder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_sub_folder(sub_folder_path, async_req=True) + >>> result = thread.get() + + :param sub_folder_path: The name of the required subFolderPath. (required) + :type sub_folder_path: str + :param server: The name of the Control-M in which the sub folder are deployed. + :type server: str + :param library: library be filled only for z/os. + :type library: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_sub_folder_with_http_info(sub_folder_path, **kwargs) # noqa: E501 + + def delete_sub_folder_with_http_info(self, sub_folder_path, **kwargs): # noqa: E501 + """delete a sub folder # noqa: E501 + + Delete a sub folder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_sub_folder_with_http_info(sub_folder_path, async_req=True) + >>> result = thread.get() + + :param sub_folder_path: The name of the required subFolderPath. (required) + :type sub_folder_path: str + :param server: The name of the Control-M in which the sub folder are deployed. + :type server: str + :param library: library be filled only for z/os. + :type library: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'sub_folder_path', + 'server', + 'library' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_sub_folder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'sub_folder_path' is set + if self.api_client.client_side_validation and ('sub_folder_path' not in local_var_params or # noqa: E501 + local_var_params['sub_folder_path'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sub_folder_path` when calling `delete_sub_folder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'sub_folder_path' in local_var_params: + path_params['subFolderPath'] = local_var_params['sub_folder_path'] # noqa: E501 + + query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/subfolder/{subFolderPath}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def deploy_ai_jobtype(self, ctm, agent, job_type_id, **kwargs): # noqa: E501 """Deploy of Application Integrator job type. # noqa: E501 - Deploy an exsiting Application Integrator job type to agent in order to allow it to run # noqa: E501 + Deploy an existing Application Integrator job type to agent in order to allow it to run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.deploy_ai_jobtype(ctm, agent, job_type_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: (required) - :param str agent: (required) - :param str job_type_id: (required) - :return: AiDeployResponse + :param ctm: (required) + :type ctm: str + :param agent: (required) + :type agent: str + :param job_type_id: (required) + :type job_type_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: AiDeployResponse """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.deploy_ai_jobtype_with_http_info( - ctm, agent, job_type_id, **kwargs - ) # noqa: E501 - else: - (data) = self.deploy_ai_jobtype_with_http_info( - ctm, agent, job_type_id, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.deploy_ai_jobtype_with_http_info(ctm, agent, job_type_id, **kwargs) # noqa: E501 - def deploy_ai_jobtype_with_http_info( - self, ctm, agent, job_type_id, **kwargs - ): # noqa: E501 + def deploy_ai_jobtype_with_http_info(self, ctm, agent, job_type_id, **kwargs): # noqa: E501 """Deploy of Application Integrator job type. # noqa: E501 - Deploy an exsiting Application Integrator job type to agent in order to allow it to run # noqa: E501 + Deploy an existing Application Integrator job type to agent in order to allow it to run # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.deploy_ai_jobtype_with_http_info(ctm, agent, job_type_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: (required) - :param str agent: (required) - :param str job_type_id: (required) - :return: AiDeployResponse + :param ctm: (required) + :type ctm: str + :param agent: (required) + :type agent: str + :param job_type_id: (required) + :type job_type_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(AiDeployResponse, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["ctm", "agent", "job_type_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm', + 'agent', + 'job_type_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method deploy_ai_jobtype" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'ctm' is set - if self.api_client.client_side_validation and ( - "ctm" not in params or params["ctm"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `ctm` when calling `deploy_ai_jobtype`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('ctm' not in local_var_params or # noqa: E501 + local_var_params['ctm'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `ctm` when calling `deploy_ai_jobtype`") # noqa: E501 # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `deploy_ai_jobtype`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `deploy_ai_jobtype`") # noqa: E501 # verify the required parameter 'job_type_id' is set - if self.api_client.client_side_validation and ( - "job_type_id" not in params or params["job_type_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_type_id` when calling `deploy_ai_jobtype`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_type_id' not in local_var_params or # noqa: E501 + local_var_params['job_type_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_type_id` when calling `deploy_ai_jobtype`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 + if 'job_type_id' in local_var_params and local_var_params['job_type_id'] is not None: # noqa: E501 + query_params.append(('jobTypeId', local_var_params['job_type_id'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AiDeployResponse", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/ai/jobtype', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def deploy_file(self, definitions_file, **kwargs): # noqa: E501 + """Deploy definitions file # noqa: E501 + + Deploy the provided definition file (JSON, XML or zip) to Control-M # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_file(definitions_file, async_req=True) + >>> result = thread.get() + + :param definitions_file: A file that contains definitions to be deployed to the server. Can be either a JSON definition file, an XML definition file, or a zip file that contains multiple JSON or XML definition files. (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param additional_configuration: additionalConfiguration to enable skip testing for local connection profile + :type additional_configuration: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[DeploymentFileResults] + """ + kwargs['_return_http_data_only'] = True + return self.deploy_file_with_http_info(definitions_file, **kwargs) # noqa: E501 + + def deploy_file_with_http_info(self, definitions_file, **kwargs): # noqa: E501 + """Deploy definitions file # noqa: E501 + + Deploy the provided definition file (JSON, XML or zip) to Control-M # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_file_with_http_info(definitions_file, async_req=True) + >>> result = thread.get() + + :param definitions_file: A file that contains definitions to be deployed to the server. Can be either a JSON definition file, an XML definition file, or a zip file that contains multiple JSON or XML definition files. (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param additional_configuration: additionalConfiguration to enable skip testing for local connection profile + :type additional_configuration: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[DeploymentFileResults], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'definitions_file', + 'deploy_descriptor_file', + 'additional_configuration' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method deploy_file" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'definitions_file' is set + if self.api_client.client_side_validation and ('definitions_file' not in local_var_params or # noqa: E501 + local_var_params['definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `definitions_file` when calling `deploy_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'definitions_file' in local_var_params: + local_var_files['definitionsFile'] = local_var_params['definitions_file'] # noqa: E501 + if 'deploy_descriptor_file' in local_var_params: + local_var_files['deployDescriptorFile'] = local_var_params['deploy_descriptor_file'] # noqa: E501 + if 'additional_configuration' in local_var_params: + local_var_files['additionalConfiguration'] = local_var_params['additional_configuration'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[DeploymentFileResults]", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def deploy_jobtype_file(self, definitions_file, **kwargs): # noqa: E501 + """Deploy jobtype # noqa: E501 + + Deploy the provided jobtype to AI server, EM server, and Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_jobtype_file(definitions_file, async_req=True) + >>> result = thread.get() + + :param definitions_file: A .ctmai file that contains definitions of jobtype to be deployed to the server. (required) + :type definitions_file: file + :param agent: + :type agent: str + :param server: + :type server: str + :param payload_file: A JSON file that contains specifications of an agent. + :type payload_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: DeployJobtypeResponse + """ + kwargs['_return_http_data_only'] = True + return self.deploy_jobtype_file_with_http_info(definitions_file, **kwargs) # noqa: E501 + + def deploy_jobtype_file_with_http_info(self, definitions_file, **kwargs): # noqa: E501 + """Deploy jobtype # noqa: E501 + + Deploy the provided jobtype to AI server, EM server, and Agent. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_jobtype_file_with_http_info(definitions_file, async_req=True) + >>> result = thread.get() + + :param definitions_file: A .ctmai file that contains definitions of jobtype to be deployed to the server. (required) + :type definitions_file: file + :param agent: + :type agent: str + :param server: + :type server: str + :param payload_file: A JSON file that contains specifications of an agent. + :type payload_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DeployJobtypeResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'definitions_file', + 'agent', + 'server', + 'payload_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method deploy_jobtype_file" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'definitions_file' is set + if self.api_client.client_side_validation and ('definitions_file' not in local_var_params or # noqa: E501 + local_var_params['definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `definitions_file` when calling `deploy_jobtype_file`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'definitions_file' in local_var_params: + local_var_files['definitionsFile'] = local_var_params['definitions_file'] # noqa: E501 + if 'payload_file' in local_var_params: + local_var_files['payloadFile'] = local_var_params['payload_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "DeployJobtypeResponse", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/jobtype', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def deploy_site_standard_policies(self, site_standard_policies_file, **kwargs): # noqa: E501 + """Deploy Site Standard Policies. # noqa: E501 + + Deploy Site Standard Policies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_site_standard_policies(site_standard_policies_file, async_req=True) + >>> result = thread.get() + + :param site_standard_policies_file: A file that contains definitions of Site Standard Policies (required) + :type site_standard_policies_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SiteStandardPoliciesFileResults + """ + kwargs['_return_http_data_only'] = True + return self.deploy_site_standard_policies_with_http_info(site_standard_policies_file, **kwargs) # noqa: E501 + + def deploy_site_standard_policies_with_http_info(self, site_standard_policies_file, **kwargs): # noqa: E501 + """Deploy Site Standard Policies. # noqa: E501 + + Deploy Site Standard Policies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.deploy_site_standard_policies_with_http_info(site_standard_policies_file, async_req=True) + >>> result = thread.get() + + :param site_standard_policies_file: A file that contains definitions of Site Standard Policies (required) + :type site_standard_policies_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SiteStandardPoliciesFileResults, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'site_standard_policies_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method deploy_site_standard_policies" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_standard_policies_file' is set + if self.api_client.client_side_validation and ('site_standard_policies_file' not in local_var_params or # noqa: E501 + local_var_params['site_standard_policies_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_policies_file` when calling `deploy_site_standard_policies`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'site_standard_policies_file' in local_var_params: + local_var_files['siteStandardPoliciesFile'] = local_var_params['site_standard_policies_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SiteStandardPoliciesFileResults", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/sitestandardpolicies', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_connection_profiles_deployment_status(self, type, name, **kwargs): # noqa: E501 + """Get deployed connection profiles deployment status # noqa: E501 + + Get currently deployed connection profiles deployment status according to the search query as JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_connection_profiles_deployment_status(type, name, async_req=True) + >>> result = thread.get() + + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ConnectionProfilesDeploymentStatusResult + """ + kwargs['_return_http_data_only'] = True + return self.get_connection_profiles_deployment_status_with_http_info(type, name, **kwargs) # noqa: E501 + + def get_connection_profiles_deployment_status_with_http_info(self, type, name, **kwargs): # noqa: E501 + """Get deployed connection profiles deployment status # noqa: E501 + + Get currently deployed connection profiles deployment status according to the search query as JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_connection_profiles_deployment_status_with_http_info(type, name, async_req=True) + >>> result = thread.get() + + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ConnectionProfilesDeploymentStatusResult, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_connection_profiles_deployment_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `get_connection_profiles_deployment_status`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_connection_profiles_deployment_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ConnectionProfilesDeploymentStatusResult", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/connectionprofile/centralized/deploymentstatus/{type}/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_ctm_ai_job_type_plugin(self, job_type_name, **kwargs): # noqa: E501 + """Get AI based job type content # noqa: E501 + + Get AI based job type content. When used with CLI content is saved as a .ctmai file. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_ai_job_type_plugin(job_type_name, async_req=True) + >>> result = thread.get() + + :param job_type_name: The job type name (required) + :type job_type_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.get_ctm_ai_job_type_plugin_with_http_info(job_type_name, **kwargs) # noqa: E501 + + def get_ctm_ai_job_type_plugin_with_http_info(self, job_type_name, **kwargs): # noqa: E501 + """Get AI based job type content # noqa: E501 + + Get AI based job type content. When used with CLI content is saved as a .ctmai file. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_ctm_ai_job_type_plugin_with_http_info(job_type_name, async_req=True) + >>> result = thread.get() + + :param job_type_name: The job type name (required) + :type job_type_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_type_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ctm_ai_job_type_plugin" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_type_name' is set + if self.api_client.client_side_validation and ('job_type_name' not in local_var_params or # noqa: E501 + local_var_params['job_type_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_type_name` when calling `get_ctm_ai_job_type_plugin`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'job_type_name' in local_var_params and local_var_params['job_type_name'] is not None: # noqa: E501 + query_params.append(('jobTypeName', local_var_params['job_type_name'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/jobtype', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_deployed_ai_jobtypes(self, **kwargs): # noqa: E501 + """Get Application Integrator job types # noqa: E501 + + Get deployed Application Integrator job types that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_ai_jobtypes(async_req=True) + >>> result = thread.get() + + :param job_type_name: Job type display name ( or partial name ) for query. It accepts * as wildcard. + :type job_type_name: str + :param job_type_id: Job type id ( or partial name ) for query. It accepts * as wildcard. + :type job_type_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AiJobtypeList + """ + kwargs['_return_http_data_only'] = True + return self.get_deployed_ai_jobtypes_with_http_info(**kwargs) # noqa: E501 + + def get_deployed_ai_jobtypes_with_http_info(self, **kwargs): # noqa: E501 + """Get Application Integrator job types # noqa: E501 + + Get deployed Application Integrator job types that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_ai_jobtypes_with_http_info(async_req=True) + >>> result = thread.get() + + :param job_type_name: Job type display name ( or partial name ) for query. It accepts * as wildcard. + :type job_type_name: str + :param job_type_id: Job type id ( or partial name ) for query. It accepts * as wildcard. + :type job_type_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AiJobtypeList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_type_name', + 'job_type_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deployed_ai_jobtypes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'job_type_name' in local_var_params and local_var_params['job_type_name'] is not None: # noqa: E501 + query_params.append(('jobTypeName', local_var_params['job_type_name'])) # noqa: E501 + if 'job_type_id' in local_var_params and local_var_params['job_type_id'] is not None: # noqa: E501 + query_params.append(('jobTypeId', local_var_params['job_type_id'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "AiJobtypeList", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/ai/jobtypes', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_deployed_calendars(self, **kwargs): # noqa: E501 + """Get deployed calendars that match the search criteria. # noqa: E501 + + Get definition of calendars as json code that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_calendars(async_req=True) + >>> result = thread.get() + + :param name: + :type name: str + :param server: + :type server: str + :param type: Calendar type. + :type type: str + :param alias: Calendar alias name for z/OS servers. + :type alias: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.get_deployed_calendars_with_http_info(**kwargs) # noqa: E501 + + def get_deployed_calendars_with_http_info(self, **kwargs): # noqa: E501 + """Get deployed calendars that match the search criteria. # noqa: E501 + + Get definition of calendars as json code that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_calendars_with_http_info(async_req=True) + >>> result = thread.get() + + :param name: + :type name: str + :param server: + :type server: str + :param type: Calendar type. + :type type: str + :param alias: Calendar alias name for z/OS servers. + :type alias: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'server', + 'type', + 'alias' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deployed_calendars" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'alias' in local_var_params and local_var_params['alias'] is not None: # noqa: E501 + query_params.append(('alias', local_var_params['alias'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/calendars', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_deployed_connection_profiles(self, agent, type, **kwargs): # noqa: E501 + """Get local deployed connection profiles # noqa: E501 + + Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_connection_profiles(agent, type, async_req=True) + >>> result = thread.get() + + :param agent: The name of the agent the connection profile is deployed on (required) + :type agent: str + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) + :type type: str + :param ctm: The name of the Control-M in which the connection profile is deployed on + :type ctm: str + :param server: The name of the Control-M in which the connection profile is deployed on + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + return self.get_deployed_connection_profiles_with_http_info(agent, type, **kwargs) # noqa: E501 + + def get_deployed_connection_profiles_with_http_info(self, agent, type, **kwargs): # noqa: E501 + """Get local deployed connection profiles # noqa: E501 + + Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_connection_profiles_with_http_info(agent, type, async_req=True) + >>> result = thread.get() + + :param agent: The name of the agent the connection profile is deployed on (required) + :type agent: str + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) + :type type: str + :param ctm: The name of the Control-M in which the connection profile is deployed on + :type ctm: str + :param server: The name of the Control-M in which the connection profile is deployed on + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'agent', + 'type', + 'ctm', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deployed_connection_profiles" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_deployed_connection_profiles`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `get_deployed_connection_profiles`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/connectionprofiles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_deployed_connection_profiles_status(self, **kwargs): # noqa: E501 + """Get deployed connection profiles status # noqa: E501 + + Get currently deployed connection profiles status according to the search query as JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_connection_profiles_status(async_req=True) + >>> result = thread.get() + + :param limit: number to limit the returned connection profiles. If missed - get all + :type limit: int + :param name: conn profile name (support *, ?, and comma, default is * for all). + :type name: str + :param type: conn profile type (default is * for accounts from all CMs). + :type type: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ConnectionProfilesStatusResult + """ + kwargs['_return_http_data_only'] = True + return self.get_deployed_connection_profiles_status_with_http_info(**kwargs) # noqa: E501 + + def get_deployed_connection_profiles_status_with_http_info(self, **kwargs): # noqa: E501 + """Get deployed connection profiles status # noqa: E501 + + Get currently deployed connection profiles status according to the search query as JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_connection_profiles_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param limit: number to limit the returned connection profiles. If missed - get all + :type limit: int + :param name: conn profile name (support *, ?, and comma, default is * for all). + :type name: str + :param type: conn profile type (default is * for accounts from all CMs). + :type type: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ConnectionProfilesStatusResult, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'limit', + 'name', + 'type' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deployed_connection_profiles_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ConnectionProfilesStatusResult", + 206: "ConnectionProfilesStatusResult", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/connectionprofiles/centralized/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_deployed_folders(self, **kwargs): # noqa: E501 + """Get deployed folders that match the search criteria. # noqa: E501 + + Get definition of folders that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_folders(async_req=True) + >>> result = thread.get() + + :param folder: + :type folder: str + :param server: + :type server: str + :param library: library be filled only for z/os. + :type library: str + :param folder_type: filter by simpleFolder + :type folder_type: str + :param site_standard: filter by siteStandard + :type site_standard: str + :param application: filter by application + :type application: str + :param sub_application: filter by subApplication + :type sub_application: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: object + """ + kwargs['_return_http_data_only'] = True + return self.get_deployed_folders_with_http_info(**kwargs) # noqa: E501 + + def get_deployed_folders_with_http_info(self, **kwargs): # noqa: E501 + """Get deployed folders that match the search criteria. # noqa: E501 + + Get definition of folders that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_folders_with_http_info(async_req=True) + >>> result = thread.get() + + :param folder: + :type folder: str + :param server: + :type server: str + :param library: library be filled only for z/os. + :type library: str + :param folder_type: filter by simpleFolder + :type folder_type: str + :param site_standard: filter by siteStandard + :type site_standard: str + :param application: filter by application + :type application: str + :param sub_application: filter by subApplication + :type sub_application: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'folder', + 'server', + 'library', + 'folder_type', + 'site_standard', + 'application', + 'sub_application' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deployed_folders" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'folder' in local_var_params and local_var_params['folder'] is not None: # noqa: E501 + query_params.append(('folder', local_var_params['folder'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + if 'folder_type' in local_var_params and local_var_params['folder_type'] is not None: # noqa: E501 + query_params.append(('folderType', local_var_params['folder_type'])) # noqa: E501 + if 'site_standard' in local_var_params and local_var_params['site_standard'] is not None: # noqa: E501 + query_params.append(('siteStandard', local_var_params['site_standard'])) # noqa: E501 + if 'application' in local_var_params and local_var_params['application'] is not None: # noqa: E501 + query_params.append(('application', local_var_params['application'])) # noqa: E501 + if 'sub_application' in local_var_params and local_var_params['sub_application'] is not None: # noqa: E501 + query_params.append(('subApplication', local_var_params['sub_application'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "object", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/deploy/folders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_deployed_folders_new(self, **kwargs): # noqa: E501 + """Get deployed jobs that match the search criteria. # noqa: E501 + + Get definition of jobs and folders (in the desired format - JSON or XML) that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_folders_new(async_req=True) + >>> result = thread.get() + + :param format: Output format (json or xml) + :type format: str + :param folder: + :type folder: str + :param job: + :type job: str + :param ctm: + :type ctm: str + :param server: + :type server: str + :param use_array_format: When set to true, the jobs in the json response will always be arranged in arrays + :type use_array_format: bool + :param library: library be filled only for z/os. + :type library: str + :param flow_data: When set to true, only data cache will be return + :type flow_data: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: object + """ + kwargs['_return_http_data_only'] = True + return self.get_deployed_folders_new_with_http_info(**kwargs) # noqa: E501 + + def get_deployed_folders_new_with_http_info(self, **kwargs): # noqa: E501 + """Get deployed jobs that match the search criteria. # noqa: E501 + + Get definition of jobs and folders (in the desired format - JSON or XML) that match the requested search criteria. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_deployed_folders_new_with_http_info(async_req=True) + >>> result = thread.get() + + :param format: Output format (json or xml) + :type format: str + :param folder: + :type folder: str + :param job: + :type job: str + :param ctm: + :type ctm: str + :param server: + :type server: str + :param use_array_format: When set to true, the jobs in the json response will always be arranged in arrays + :type use_array_format: bool + :param library: library be filled only for z/os. + :type library: str + :param flow_data: When set to true, only data cache will be return + :type flow_data: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'format', + 'folder', + 'job', + 'ctm', + 'server', + 'use_array_format', + 'library', + 'flow_data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_deployed_folders_new" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - if "job_type_id" in params: - query_params.append(("jobTypeId", params["job_type_id"])) # noqa: E501 - - header_params = {} + if 'format' in local_var_params and local_var_params['format'] is not None: # noqa: E501 + query_params.append(('format', local_var_params['format'])) # noqa: E501 + if 'folder' in local_var_params and local_var_params['folder'] is not None: # noqa: E501 + query_params.append(('folder', local_var_params['folder'])) # noqa: E501 + if 'job' in local_var_params and local_var_params['job'] is not None: # noqa: E501 + query_params.append(('job', local_var_params['job'])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'use_array_format' in local_var_params and local_var_params['use_array_format'] is not None: # noqa: E501 + query_params.append(('useArrayFormat', local_var_params['use_array_format'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + if 'flow_data' in local_var_params and local_var_params['flow_data'] is not None: # noqa: E501 + query_params.append(('flowData', local_var_params['flow_data'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "object", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/ai/jobtype", - "POST", + '/deploy/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AiDeployResponse", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def deploy_file(self, definitions_file, **kwargs): # noqa: E501 - """Deploy definitions file # noqa: E501 + def get_local_connection_profiles(self, agent, type, **kwargs): # noqa: E501 + """Get local deployed connection profiles # noqa: E501 - Deploy the provided definition file (JSON, XML or zip) to Control-M # noqa: E501 + Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.deploy_file(definitions_file, async_req=True) + + >>> thread = api.get_local_connection_profiles(agent, type, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions to be deployed to the server. Can be either a JSON definition file, an XML definition file, or a zip file that contains multiple JSON or XML definition files. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :param file additional_configuration: additionalConfiguration to enable skip testing for local connection profile - :return: list[DeploymentFileResults] + :param agent: The name of the agent the connection profile is deployed on (required) + :type agent: str + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) + :type type: str + :param ctm: The name of the Control-M in which the connection profile is deployed on + :type ctm: str + :param server: The name of the Control-M in which the connection profile is deployed on + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.deploy_file_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - else: - (data) = self.deploy_file_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_local_connection_profiles_with_http_info(agent, type, **kwargs) # noqa: E501 - def deploy_file_with_http_info(self, definitions_file, **kwargs): # noqa: E501 - """Deploy definitions file # noqa: E501 + def get_local_connection_profiles_with_http_info(self, agent, type, **kwargs): # noqa: E501 + """Get local deployed connection profiles # noqa: E501 - Deploy the provided definition file (JSON, XML or zip) to Control-M # noqa: E501 + Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.deploy_file_with_http_info(definitions_file, async_req=True) + + >>> thread = api.get_local_connection_profiles_with_http_info(agent, type, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions to be deployed to the server. Can be either a JSON definition file, an XML definition file, or a zip file that contains multiple JSON or XML definition files. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :param file additional_configuration: additionalConfiguration to enable skip testing for local connection profile - :return: list[DeploymentFileResults] + :param agent: The name of the agent the connection profile is deployed on (required) + :type agent: str + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) + :type type: str + :param ctm: The name of the Control-M in which the connection profile is deployed on + :type ctm: str + :param server: The name of the Control-M in which the connection profile is deployed on + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "definitions_file", - "deploy_descriptor_file", - "additional_configuration", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): + 'agent', + 'type', + 'ctm', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method deploy_file" % key + " to method get_local_connection_profiles" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'definitions_file' is set - if self.api_client.client_side_validation and ( - "definitions_file" not in params or params["definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `definitions_file` when calling `deploy_file`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `get_local_connection_profiles`") # noqa: E501 + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `get_local_connection_profiles`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "definitions_file" in params: - local_var_files["definitionsFile"] = params[ - "definitions_file" - ] # noqa: E501 - if "deploy_descriptor_file" in params: - local_var_files["deployDescriptorFile"] = params[ - "deploy_descriptor_file" - ] # noqa: E501 - if "additional_configuration" in params: - local_var_files["additionalConfiguration"] = params[ - "additional_configuration" - ] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy", - "POST", + '/deploy/connectionprofiles/local', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[DeploymentFileResults]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def deploy_jobtype_file(self, definitions_file, **kwargs): # noqa: E501 - """Deploy jobtype # noqa: E501 + def get_shared_connection_profiles(self, type, **kwargs): # noqa: E501 + """Get centralized deployed connection profile # noqa: E501 - Deploy the provided jobtype to AI server, EM server, and Agent. # noqa: E501 + Get currently centralized deployed connection profiles according to the search query as JSON. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.deploy_jobtype_file(definitions_file, async_req=True) + + >>> thread = api.get_shared_connection_profiles(type, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A .ctmai file that contains definitions of jobtype to be deployed to the server. (required) - :param file payload_file: A JSON file that contains specifications of an agent. - :param str agent: - :param str server: - :return: DeployJobtypeResponse + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. Use * to get all types (required) + :type type: str + :param name: The name of centralized connection profile. Supports for *, ?, and comma. By default is * + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.deploy_jobtype_file_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - else: - (data) = self.deploy_jobtype_file_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_shared_connection_profiles_with_http_info(type, **kwargs) # noqa: E501 - def deploy_jobtype_file_with_http_info( - self, definitions_file, **kwargs - ): # noqa: E501 - """Deploy jobtype # noqa: E501 + def get_shared_connection_profiles_with_http_info(self, type, **kwargs): # noqa: E501 + """Get centralized deployed connection profile # noqa: E501 - Deploy the provided jobtype to AI server, EM server, and Agent. # noqa: E501 + Get currently centralized deployed connection profiles according to the search query as JSON. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.deploy_jobtype_file_with_http_info(definitions_file, async_req=True) + + >>> thread = api.get_shared_connection_profiles_with_http_info(type, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A .ctmai file that contains definitions of jobtype to be deployed to the server. (required) - :param file payload_file: A JSON file that contains specifications of an agent. - :param str agent: - :param str server: - :return: DeployJobtypeResponse + :param type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. Use * to get all types (required) + :type type: str + :param name: The name of centralized connection profile. Supports for *, ?, and comma. By default is * + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "definitions_file", - "payload_file", - "agent", - "server", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): + 'type', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method deploy_jobtype_file" % key + " to method get_shared_connection_profiles" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'definitions_file' is set - if self.api_client.client_side_validation and ( - "definitions_file" not in params or params["definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `definitions_file` when calling `deploy_jobtype_file`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `get_shared_connection_profiles`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "definitions_file" in params: - local_var_files["definitionsFile"] = params[ - "definitions_file" - ] # noqa: E501 - if "payload_file" in params: - local_var_files["payloadFile"] = params["payload_file"] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/jobtype", - "POST", + '/deploy/connectionprofiles/centralized', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="DeployJobtypeResponse", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_connection_profiles_deployment_status( - self, type, name, **kwargs - ): # noqa: E501 - """Get deployed connection profiles deployment status # noqa: E501 + def get_site_standard_field_restrictions(self, standard_name, field_name, **kwargs): # noqa: E501 + """Get the allowed values for the specified field in the specified site standard. # noqa: E501 - Get currently deployed connection profiles deployment status according to the search query as JSON. # noqa: E501 + Get the allowed values for the specified field in the specified site standard. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_connection_profiles_deployment_status(type, name, async_req=True) + + >>> thread = api.get_site_standard_field_restrictions(standard_name, field_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) - :param str name: Name of the Connection Profile (required) - :return: ConnectionProfilesDeploymentStatusResult + :param standard_name: (required) + :type standard_name: str + :param field_name: (required) + :type field_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_connection_profiles_deployment_status_with_http_info( - type, name, **kwargs - ) # noqa: E501 - else: - (data) = self.get_connection_profiles_deployment_status_with_http_info( - type, name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_site_standard_field_restrictions_with_http_info(standard_name, field_name, **kwargs) # noqa: E501 - def get_connection_profiles_deployment_status_with_http_info( - self, type, name, **kwargs - ): # noqa: E501 - """Get deployed connection profiles deployment status # noqa: E501 + def get_site_standard_field_restrictions_with_http_info(self, standard_name, field_name, **kwargs): # noqa: E501 + """Get the allowed values for the specified field in the specified site standard. # noqa: E501 - Get currently deployed connection profiles deployment status according to the search query as JSON. # noqa: E501 + Get the allowed values for the specified field in the specified site standard. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_connection_profiles_deployment_status_with_http_info(type, name, async_req=True) + + >>> thread = api.get_site_standard_field_restrictions_with_http_info(standard_name, field_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) - :param str name: Name of the Connection Profile (required) - :return: ConnectionProfilesDeploymentStatusResult + :param standard_name: (required) + :type standard_name: str + :param field_name: (required) + :type field_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["type", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'standard_name', + 'field_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_connection_profiles_deployment_status" % key + " to method get_site_standard_field_restrictions" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `get_connection_profiles_deployment_status`" - ) # noqa: E501 - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `get_connection_profiles_deployment_status`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'standard_name' is set + if self.api_client.client_side_validation and ('standard_name' not in local_var_params or # noqa: E501 + local_var_params['standard_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `standard_name` when calling `get_site_standard_field_restrictions`") # noqa: E501 + # verify the required parameter 'field_name' is set + if self.api_client.client_side_validation and ('field_name' not in local_var_params or # noqa: E501 + local_var_params['field_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `field_name` when calling `get_site_standard_field_restrictions`") # noqa: E501 collection_formats = {} path_params = {} - if "type" in params: - path_params["type"] = params["type"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'standard_name' in local_var_params: + path_params['standardName'] = local_var_params['standard_name'] # noqa: E501 + if 'field_name' in local_var_params: + path_params['fieldName'] = local_var_params['field_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofile/centralized/deploymentstatus/{type}/{name}", - "GET", + '/deploy/sitestandard/{standardName}/fieldRestriction/{fieldName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ConnectionProfilesDeploymentStatusResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_deployed_ai_jobtypes(self, **kwargs): # noqa: E501 - """Get Application Integrator job types # noqa: E501 + def get_site_standard_policies(self, **kwargs): # noqa: E501 + """Get definitions of deployed Site Standard Policies that match the search criteria. # noqa: E501 - Get deployed Application Integrator job types that match the requested search criteria. # noqa: E501 + Get definitions of deployed Site Standard Policies that match the search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_ai_jobtypes(async_req=True) + + >>> thread = api.get_site_standard_policies(async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_type_name: Job type display name ( or partial name ) for query. It accepts * as wildcard. - :param str job_type_id: Job type id ( or partial name ) for query. It accepts * as wildcard. - :return: AiJobtypeList + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_deployed_ai_jobtypes_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_deployed_ai_jobtypes_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_site_standard_policies_with_http_info(**kwargs) # noqa: E501 - def get_deployed_ai_jobtypes_with_http_info(self, **kwargs): # noqa: E501 - """Get Application Integrator job types # noqa: E501 + def get_site_standard_policies_with_http_info(self, **kwargs): # noqa: E501 + """Get definitions of deployed Site Standard Policies that match the search criteria. # noqa: E501 - Get deployed Application Integrator job types that match the requested search criteria. # noqa: E501 + Get definitions of deployed Site Standard Policies that match the search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_ai_jobtypes_with_http_info(async_req=True) + + >>> thread = api.get_site_standard_policies_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_type_name: Job type display name ( or partial name ) for query. It accepts * as wildcard. - :param str job_type_id: Job type id ( or partial name ) for query. It accepts * as wildcard. - :return: AiJobtypeList + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_type_name", "job_type_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_deployed_ai_jobtypes" % key + " to method get_site_standard_policies" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "job_type_name" in params: - query_params.append(("jobTypeName", params["job_type_name"])) # noqa: E501 - if "job_type_id" in params: - query_params.append(("jobTypeId", params["job_type_id"])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/ai/jobtypes", - "GET", + '/deploy/sitestandardpolicies', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="AiJobtypeList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_deployed_calendars(self, **kwargs): # noqa: E501 - """Get deployed calendars that match the search criteria. # noqa: E501 + def get_site_standard_policies_details(self, **kwargs): # noqa: E501 + """Get details of deployed Site Standard Policies that match the search criteria. # noqa: E501 - Get definition of calendars as json code that match the requested search criteria. # noqa: E501 + Get details of deployed Site Standard Policies that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_calendars(async_req=True) + + >>> thread = api.get_site_standard_policies_details(async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: - :param str server: - :param str type: Calendar type. - :param str alias: Calendar alias name for z/OS servers. - :return: str + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SiteStandardPolicyDetailsList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_deployed_calendars_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_deployed_calendars_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_site_standard_policies_details_with_http_info(**kwargs) # noqa: E501 - def get_deployed_calendars_with_http_info(self, **kwargs): # noqa: E501 - """Get deployed calendars that match the search criteria. # noqa: E501 + def get_site_standard_policies_details_with_http_info(self, **kwargs): # noqa: E501 + """Get details of deployed Site Standard Policies that match the search criteria. # noqa: E501 - Get definition of calendars as json code that match the requested search criteria. # noqa: E501 + Get details of deployed Site Standard Policies that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_calendars_with_http_info(async_req=True) + + >>> thread = api.get_site_standard_policies_details_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: - :param str server: - :param str type: Calendar type. - :param str alias: Calendar alias name for z/OS servers. - :return: str + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SiteStandardPolicyDetailsList, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "server", "type", "alias"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_deployed_calendars" % key + " to method get_site_standard_policies_details" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "type" in params: - query_params.append(("type", params["type"])) # noqa: E501 - if "alias" in params: - query_params.append(("alias", params["alias"])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SiteStandardPolicyDetailsList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/calendars", - "GET", + '/deploy/sitestandardpolicies/details', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_deployed_connection_profiles(self, agent, type, **kwargs): # noqa: E501 - """Get local deployed connection profiles # noqa: E501 + def get_site_standards(self, **kwargs): # noqa: E501 + """Get definitions of deployed Site Standards that match the search criteria. # noqa: E501 - Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 + Get definitions of deployed Site Standards that match the search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_connection_profiles(agent, type, async_req=True) + + >>> thread = api.get_site_standards(async_req=True) >>> result = thread.get() - :param async_req bool - :param str agent: The name of the agent the connection profile is deployed on (required) - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) - :param str ctm: The name of the Control-M in which the connection profile is deployed on - :param str server: The name of the Control-M in which the connection profile is deployed on - :return: str + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_deployed_connection_profiles_with_http_info( - agent, type, **kwargs - ) # noqa: E501 - else: - (data) = self.get_deployed_connection_profiles_with_http_info( - agent, type, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_site_standards_with_http_info(**kwargs) # noqa: E501 - def get_deployed_connection_profiles_with_http_info( - self, agent, type, **kwargs - ): # noqa: E501 - """Get local deployed connection profiles # noqa: E501 + def get_site_standards_with_http_info(self, **kwargs): # noqa: E501 + """Get definitions of deployed Site Standards that match the search criteria. # noqa: E501 - Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 + Get definitions of deployed Site Standards that match the search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_connection_profiles_with_http_info(agent, type, async_req=True) + + >>> thread = api.get_site_standards_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str agent: The name of the agent the connection profile is deployed on (required) - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) - :param str ctm: The name of the Control-M in which the connection profile is deployed on - :param str server: The name of the Control-M in which the connection profile is deployed on - :return: str + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["agent", "type", "ctm", "server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_deployed_connection_profiles" % key + " to method get_site_standards" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_deployed_connection_profiles`" - ) # noqa: E501 - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `get_deployed_connection_profiles`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - if "type" in params: - query_params.append(("type", params["type"])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofiles", - "GET", + '/deploy/sitestandards', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_deployed_connection_profiles_status(self, **kwargs): # noqa: E501 - """Get deployed connection profiles status # noqa: E501 + def get_site_standards_details(self, **kwargs): # noqa: E501 + """Get details of deployed Site Standards that match the search criteria. # noqa: E501 - Get currently deployed connection profiles status according to the search query as JSON. # noqa: E501 + Get details of deployed Site Standards that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_connection_profiles_status(async_req=True) + + >>> thread = api.get_site_standards_details(async_req=True) >>> result = thread.get() - :param async_req bool - :param int limit: number to limit the returned connection profiles. If missed - get all - :param str name: conn profile name (support *, ?, and comma, default is * for all). - :param str type: conn profile type (default is * for accounts from all CMs). - :return: ConnectionProfilesStatusResult + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SiteStandardDetailsList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_deployed_connection_profiles_status_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_deployed_connection_profiles_status_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_site_standards_details_with_http_info(**kwargs) # noqa: E501 - def get_deployed_connection_profiles_status_with_http_info( - self, **kwargs - ): # noqa: E501 - """Get deployed connection profiles status # noqa: E501 + def get_site_standards_details_with_http_info(self, **kwargs): # noqa: E501 + """Get details of deployed Site Standards that match the search criteria. # noqa: E501 - Get currently deployed connection profiles status according to the search query as JSON. # noqa: E501 + Get details of deployed Site Standards that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_connection_profiles_status_with_http_info(async_req=True) + + >>> thread = api.get_site_standards_details_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param int limit: number to limit the returned connection profiles. If missed - get all - :param str name: conn profile name (support *, ?, and comma, default is * for all). - :param str type: conn profile type (default is * for accounts from all CMs). - :return: ConnectionProfilesStatusResult + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SiteStandardDetailsList, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["limit", "name", "type"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_deployed_connection_profiles_status" % key + " to method get_site_standards_details" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "limit" in params: - query_params.append(("limit", params["limit"])) # noqa: E501 - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - if "type" in params: - query_params.append(("type", params["type"])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SiteStandardDetailsList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofiles/centralized/status", - "GET", + '/deploy/sitestandards/details', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ConnectionProfilesStatusResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_deployed_folders_new(self, **kwargs): # noqa: E501 - """Get deployed jobs that match the search criteria. # noqa: E501 + def poll_deploy_results(self, poll_id, **kwargs): # noqa: E501 + """Get the deploy result # noqa: E501 - Get definition of jobs and folders (in the desired format - JSON or XML) that match the requested search criteria. # noqa: E501 + Get the deploy result # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_folders_new(async_req=True) + + >>> thread = api.poll_deploy_results(poll_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str format: Output format (json or xml) - :param str folder: - :param str ctm: - :param str server: - :return: str + :param poll_id: deploy request identification (required) + :type poll_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: DeploymentFileResults """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_deployed_folders_new_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_deployed_folders_new_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.poll_deploy_results_with_http_info(poll_id, **kwargs) # noqa: E501 - def get_deployed_folders_new_with_http_info(self, **kwargs): # noqa: E501 - """Get deployed jobs that match the search criteria. # noqa: E501 + def poll_deploy_results_with_http_info(self, poll_id, **kwargs): # noqa: E501 + """Get the deploy result # noqa: E501 - Get definition of jobs and folders (in the desired format - JSON or XML) that match the requested search criteria. # noqa: E501 + Get the deploy result # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_deployed_folders_new_with_http_info(async_req=True) + + >>> thread = api.poll_deploy_results_with_http_info(poll_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str format: Output format (json or xml) - :param str folder: - :param str ctm: - :param str server: - :return: str + :param poll_id: deploy request identification (required) + :type poll_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(DeploymentFileResults, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["format", "folder", "ctm", "server", "useArrayFormat"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'poll_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_deployed_folders_new" % key + " to method poll_deploy_results" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'poll_id' is set + if self.api_client.client_side_validation and ('poll_id' not in local_var_params or # noqa: E501 + local_var_params['poll_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `poll_id` when calling `poll_deploy_results`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if "format" in params: - query_params.append(("format", params["format"])) # noqa: E501 - if "folder" in params: - query_params.append(("folder", params["folder"])) # noqa: E501 - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "useArrayFormat" in params: - query_params.append(("useArrayFormat", params["useArrayFormat"])) # noqa: E501 - - header_params = {} + if 'poll_id' in local_var_params and local_var_params['poll_id'] is not None: # noqa: E501 + query_params.append(('pollId', local_var_params['poll_id'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "DeploymentFileResults", + 202: "object", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/jobs", - "GET", + '/deploy/poll', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_local_connection_profiles(self, agent, type, **kwargs): # noqa: E501 - """Get local deployed connection profiles # noqa: E501 + def rename_site_standard(self, site_standard_name, site_standard_new_name, **kwargs): # noqa: E501 + """Rename deployed Site Standard. # noqa: E501 - Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 + Rename deployed Site Standard. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_local_connection_profiles(agent, type, async_req=True) + + >>> thread = api.rename_site_standard(site_standard_name, site_standard_new_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str agent: The name of the agent the connection profile is deployed on (required) - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) - :param str ctm: The name of the Control-M in which the connection profile is deployed on - :param str server: The name of the Control-M in which the connection profile is deployed on - :return: str + :param site_standard_name: (required) + :type site_standard_name: str + :param site_standard_new_name: (required) + :type site_standard_new_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_local_connection_profiles_with_http_info( - agent, type, **kwargs - ) # noqa: E501 - else: - (data) = self.get_local_connection_profiles_with_http_info( - agent, type, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.rename_site_standard_with_http_info(site_standard_name, site_standard_new_name, **kwargs) # noqa: E501 - def get_local_connection_profiles_with_http_info( - self, agent, type, **kwargs - ): # noqa: E501 - """Get local deployed connection profiles # noqa: E501 + def rename_site_standard_with_http_info(self, site_standard_name, site_standard_new_name, **kwargs): # noqa: E501 + """Rename deployed Site Standard. # noqa: E501 - Get currently local deployed connection profiles according to the search query as JSON. # noqa: E501 + Rename deployed Site Standard. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_local_connection_profiles_with_http_info(agent, type, async_req=True) + + >>> thread = api.rename_site_standard_with_http_info(site_standard_name, site_standard_new_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str agent: The name of the agent the connection profile is deployed on (required) - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. (required) - :param str ctm: The name of the Control-M in which the connection profile is deployed on - :param str server: The name of the Control-M in which the connection profile is deployed on - :return: str + :param site_standard_name: (required) + :type site_standard_name: str + :param site_standard_new_name: (required) + :type site_standard_new_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["agent", "type", "ctm", "server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'site_standard_name', + 'site_standard_new_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_local_connection_profiles" % key + " to method rename_site_standard" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'agent' is set - if self.api_client.client_side_validation and ( - "agent" not in params or params["agent"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `agent` when calling `get_local_connection_profiles`" - ) # noqa: E501 - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `get_local_connection_profiles`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_standard_name' is set + if self.api_client.client_side_validation and ('site_standard_name' not in local_var_params or # noqa: E501 + local_var_params['site_standard_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_name` when calling `rename_site_standard`") # noqa: E501 + # verify the required parameter 'site_standard_new_name' is set + if self.api_client.client_side_validation and ('site_standard_new_name' not in local_var_params or # noqa: E501 + local_var_params['site_standard_new_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_new_name` when calling `rename_site_standard`") # noqa: E501 collection_formats = {} path_params = {} + if 'site_standard_name' in local_var_params: + path_params['siteStandardName'] = local_var_params['site_standard_name'] # noqa: E501 query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - if "type" in params: - query_params.append(("type", params["type"])) # noqa: E501 + if 'site_standard_new_name' in local_var_params and local_var_params['site_standard_new_name'] is not None: # noqa: E501 + query_params.append(('siteStandardNewName', local_var_params['site_standard_new_name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofiles/local", - "GET", + '/deploy/sitestandard/{siteStandardName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_shared_connection_profiles(self, type, **kwargs): # noqa: E501 - """Get centralized deployed connection profile # noqa: E501 + def rename_site_standard_policy(self, site_standard_policy_name, site_standard_policy_new_name, **kwargs): # noqa: E501 + """Rename deployed Site Standard Policy. # noqa: E501 - Get currently centralized deployed connection profiles according to the search query as JSON. # noqa: E501 + Rename deployed Site Standard Policy. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_shared_connection_profiles(type, async_req=True) + + >>> thread = api.rename_site_standard_policy(site_standard_policy_name, site_standard_policy_new_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. Use * to get all types (required) - :param str name: The name of centralized connection profile. Supports for *, ?, and comma. By default is * - :return: str + :param site_standard_policy_name: (required) + :type site_standard_policy_name: str + :param site_standard_policy_new_name: (required) + :type site_standard_policy_new_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_shared_connection_profiles_with_http_info( - type, **kwargs - ) # noqa: E501 - else: - (data) = self.get_shared_connection_profiles_with_http_info( - type, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.rename_site_standard_policy_with_http_info(site_standard_policy_name, site_standard_policy_new_name, **kwargs) # noqa: E501 - def get_shared_connection_profiles_with_http_info( - self, type, **kwargs - ): # noqa: E501 - """Get centralized deployed connection profile # noqa: E501 + def rename_site_standard_policy_with_http_info(self, site_standard_policy_name, site_standard_policy_new_name, **kwargs): # noqa: E501 + """Rename deployed Site Standard Policy. # noqa: E501 - Get currently centralized deployed connection profiles according to the search query as JSON. # noqa: E501 + Rename deployed Site Standard Policy. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_shared_connection_profiles_with_http_info(type, async_req=True) + + >>> thread = api.rename_site_standard_policy_with_http_info(site_standard_policy_name, site_standard_policy_new_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type of connection profile such as Database, FileTransfer, Hadoop, Informatica, SAP. Use * to get all types (required) - :param str name: The name of centralized connection profile. Supports for *, ?, and comma. By default is * - :return: str + :param site_standard_policy_name: (required) + :type site_standard_policy_name: str + :param site_standard_policy_new_name: (required) + :type site_standard_policy_new_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["type", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'site_standard_policy_name', + 'site_standard_policy_new_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_shared_connection_profiles" % key + " to method rename_site_standard_policy" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ( - "type" not in params or params["type"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `type` when calling `get_shared_connection_profiles`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'site_standard_policy_name' is set + if self.api_client.client_side_validation and ('site_standard_policy_name' not in local_var_params or # noqa: E501 + local_var_params['site_standard_policy_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_policy_name` when calling `rename_site_standard_policy`") # noqa: E501 + # verify the required parameter 'site_standard_policy_new_name' is set + if self.api_client.client_side_validation and ('site_standard_policy_new_name' not in local_var_params or # noqa: E501 + local_var_params['site_standard_policy_new_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `site_standard_policy_new_name` when calling `rename_site_standard_policy`") # noqa: E501 collection_formats = {} path_params = {} + if 'site_standard_policy_name' in local_var_params: + path_params['siteStandardPolicyName'] = local_var_params['site_standard_policy_name'] # noqa: E501 query_params = [] - if "type" in params: - query_params.append(("type", params["type"])) # noqa: E501 - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 + if 'site_standard_policy_new_name' in local_var_params and local_var_params['site_standard_policy_new_name'] is not None: # noqa: E501 + query_params.append(('siteStandardPolicyNewName', local_var_params['site_standard_policy_new_name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 403: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofiles/centralized", - "GET", + '/deploy/sitestandardpolicy/{siteStandardPolicyName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_site_standard_field_restrictions( - self, standard_name, field_name, **kwargs - ): # noqa: E501 - """Get the allowed values for the specified field in the specified site standard. # noqa: E501 + def set_site_standard_field_restrictions(self, standard_name, field_name, values_file, **kwargs): # noqa: E501 + """Replace the allowed values for the specified field in the specified site standard. # noqa: E501 - Get the allowed values for the specified field in the specified site standard. # noqa: E501 + Replace the allowed values for the specified field in the specified site standard. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_site_standard_field_restrictions(standard_name, field_name, async_req=True) + + >>> thread = api.set_site_standard_field_restrictions(standard_name, field_name, values_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str standard_name: (required) - :param str field_name: (required) - :return: str + :param standard_name: (required) + :type standard_name: str + :param field_name: (required) + :type field_name: str + :param values_file: The JSON file with the allowed values (required) + :type values_file: FieldValues + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_site_standard_field_restrictions_with_http_info( - standard_name, field_name, **kwargs - ) # noqa: E501 - else: - (data) = self.get_site_standard_field_restrictions_with_http_info( - standard_name, field_name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_site_standard_field_restrictions_with_http_info(standard_name, field_name, values_file, **kwargs) # noqa: E501 - def get_site_standard_field_restrictions_with_http_info( - self, standard_name, field_name, **kwargs - ): # noqa: E501 - """Get the allowed values for the specified field in the specified site standard. # noqa: E501 + def set_site_standard_field_restrictions_with_http_info(self, standard_name, field_name, values_file, **kwargs): # noqa: E501 + """Replace the allowed values for the specified field in the specified site standard. # noqa: E501 - Get the allowed values for the specified field in the specified site standard. # noqa: E501 + Replace the allowed values for the specified field in the specified site standard. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_site_standard_field_restrictions_with_http_info(standard_name, field_name, async_req=True) + + >>> thread = api.set_site_standard_field_restrictions_with_http_info(standard_name, field_name, values_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param str standard_name: (required) - :param str field_name: (required) - :return: str + :param standard_name: (required) + :type standard_name: str + :param field_name: (required) + :type field_name: str + :param values_file: The JSON file with the allowed values (required) + :type values_file: FieldValues + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["standard_name", "field_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'standard_name', + 'field_name', + 'values_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_site_standard_field_restrictions" % key + " to method set_site_standard_field_restrictions" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'standard_name' is set - if self.api_client.client_side_validation and ( - "standard_name" not in params or params["standard_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `standard_name` when calling `get_site_standard_field_restrictions`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('standard_name' not in local_var_params or # noqa: E501 + local_var_params['standard_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `standard_name` when calling `set_site_standard_field_restrictions`") # noqa: E501 # verify the required parameter 'field_name' is set - if self.api_client.client_side_validation and ( - "field_name" not in params or params["field_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `field_name` when calling `get_site_standard_field_restrictions`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('field_name' not in local_var_params or # noqa: E501 + local_var_params['field_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `field_name` when calling `set_site_standard_field_restrictions`") # noqa: E501 + # verify the required parameter 'values_file' is set + if self.api_client.client_side_validation and ('values_file' not in local_var_params or # noqa: E501 + local_var_params['values_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `values_file` when calling `set_site_standard_field_restrictions`") # noqa: E501 collection_formats = {} path_params = {} - if "standard_name" in params: - path_params["standardName"] = params["standard_name"] # noqa: E501 - if "field_name" in params: - path_params["fieldName"] = params["field_name"] # noqa: E501 + if 'standard_name' in local_var_params: + path_params['standardName'] = local_var_params['standard_name'] # noqa: E501 + if 'field_name' in local_var_params: + path_params['fieldName'] = local_var_params['field_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'values_file' in local_var_params: + body_params = local_var_params['values_file'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/sitestandard/{standardName}/fieldRestriction/{fieldName}", - "GET", + '/deploy/sitestandard/{standardName}/fieldRestriction/{fieldName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def set_site_standard_field_restrictions( - self, standard_name, field_name, values_file, **kwargs - ): # noqa: E501 - """Replace the allowed values for the specified field in the specified site standard. # noqa: E501 + def test_centralized_connection_profile(self, type, name, server, agent, **kwargs): # noqa: E501 + """Test connection profile centralized on agent # noqa: E501 - Replace the allowed values for the specified field in the specified site standard. # noqa: E501 + Test connection profile centralized on agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_site_standard_field_restrictions(standard_name, field_name, values_file, async_req=True) + + >>> thread = api.test_centralized_connection_profile(type, name, server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str standard_name: (required) - :param str field_name: (required) - :param FieldValues values_file: The JSON file with the allowed values (required) - :return: SuccessData + :param type: The type of connection profile. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param server: The ctm of connection profile. (required) + :type server: str + :param agent: (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.set_site_standard_field_restrictions_with_http_info( - standard_name, field_name, values_file, **kwargs - ) # noqa: E501 - else: - (data) = self.set_site_standard_field_restrictions_with_http_info( - standard_name, field_name, values_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.test_centralized_connection_profile_with_http_info(type, name, server, agent, **kwargs) # noqa: E501 - def set_site_standard_field_restrictions_with_http_info( - self, standard_name, field_name, values_file, **kwargs - ): # noqa: E501 - """Replace the allowed values for the specified field in the specified site standard. # noqa: E501 + def test_centralized_connection_profile_with_http_info(self, type, name, server, agent, **kwargs): # noqa: E501 + """Test connection profile centralized on agent # noqa: E501 - Replace the allowed values for the specified field in the specified site standard. # noqa: E501 + Test connection profile centralized on agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_site_standard_field_restrictions_with_http_info(standard_name, field_name, values_file, async_req=True) + + >>> thread = api.test_centralized_connection_profile_with_http_info(type, name, server, agent, async_req=True) >>> result = thread.get() - :param async_req bool - :param str standard_name: (required) - :param str field_name: (required) - :param FieldValues values_file: The JSON file with the allowed values (required) - :return: SuccessData + :param type: The type of connection profile. (required) + :type type: str + :param name: Name of the Connection Profile (required) + :type name: str + :param server: The ctm of connection profile. (required) + :type server: str + :param agent: (required) + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["standard_name", "field_name", "values_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'type', + 'name', + 'server', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method set_site_standard_field_restrictions" % key + " to method test_centralized_connection_profile" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'standard_name' is set - if self.api_client.client_side_validation and ( - "standard_name" not in params or params["standard_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `standard_name` when calling `set_site_standard_field_restrictions`" - ) # noqa: E501 - # verify the required parameter 'field_name' is set - if self.api_client.client_side_validation and ( - "field_name" not in params or params["field_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `field_name` when calling `set_site_standard_field_restrictions`" - ) # noqa: E501 - # verify the required parameter 'values_file' is set - if self.api_client.client_side_validation and ( - "values_file" not in params or params["values_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `values_file` when calling `set_site_standard_field_restrictions`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'type' is set + if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 + local_var_params['type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `type` when calling `test_centralized_connection_profile`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `test_centralized_connection_profile`") # noqa: E501 + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `test_centralized_connection_profile`") # noqa: E501 + # verify the required parameter 'agent' is set + if self.api_client.client_side_validation and ('agent' not in local_var_params or # noqa: E501 + local_var_params['agent'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `agent` when calling `test_centralized_connection_profile`") # noqa: E501 collection_formats = {} path_params = {} - if "standard_name" in params: - path_params["standardName"] = params["standard_name"] # noqa: E501 - if "field_name" in params: - path_params["fieldName"] = params["field_name"] # noqa: E501 + if 'type' in local_var_params: + path_params['type'] = local_var_params['type'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'agent' in local_var_params: + path_params['agent'] = local_var_params['agent'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "values_file" in params: - body_params = params["values_file"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/sitestandard/{standardName}/fieldRestriction/{fieldName}", - "POST", + '/deploy/connectionprofile/centralized/test/{type}/{name}/{server}/{agent}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def test_connection_profile(self, definitions_file, **kwargs): # noqa: E501 """Test connection profile on agent # noqa: E501 @@ -2218,202 +5144,265 @@ def test_connection_profile(self, definitions_file, **kwargs): # noqa: E501 Test connection profile on agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_connection_profile(definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions of the connection profile to be tested (required) - :param str ctm: - :param str agent: - :return: SuccessData + :param definitions_file: A file that contains definitions of the connection profile to be tested (required) + :type definitions_file: file + :param ctm: + :type ctm: str + :param agent: + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.test_connection_profile_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - else: - (data) = self.test_connection_profile_with_http_info( - definitions_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.test_connection_profile_with_http_info(definitions_file, **kwargs) # noqa: E501 - def test_connection_profile_with_http_info( - self, definitions_file, **kwargs - ): # noqa: E501 + def test_connection_profile_with_http_info(self, definitions_file, **kwargs): # noqa: E501 """Test connection profile on agent # noqa: E501 Test connection profile on agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_connection_profile_with_http_info(definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions of the connection profile to be tested (required) - :param str ctm: - :param str agent: - :return: SuccessData + :param definitions_file: A file that contains definitions of the connection profile to be tested (required) + :type definitions_file: file + :param ctm: + :type ctm: str + :param agent: + :type agent: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["definitions_file", "ctm", "agent"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'definitions_file', + 'ctm', + 'agent' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method test_connection_profile" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'definitions_file' is set - if self.api_client.client_side_validation and ( - "definitions_file" not in params or params["definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `definitions_file` when calling `test_connection_profile`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('definitions_file' not in local_var_params or # noqa: E501 + local_var_params['definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `definitions_file` when calling `test_connection_profile`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "definitions_file" in params: - local_var_files["definitionsFile"] = params[ - "definitions_file" - ] # noqa: E501 + if 'definitions_file' in local_var_params: + local_var_files['definitionsFile'] = local_var_params['definitions_file'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/connectionprofile/test", - "POST", + '/deploy/connectionprofile/test', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def transform_file( - self, definitions_file, deploy_descriptor_file, **kwargs - ): # noqa: E501 + def transform_file(self, definitions_file, deploy_descriptor_file, **kwargs): # noqa: E501 """Transform a definitions file # noqa: E501 Transform the provided definitions file (JSON) according to the provided Deploy Descriptor file (JSON). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.transform_file(definitions_file, deploy_descriptor_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions to be deployed to the server. Can be either a JSON definition file, an XML definition file, or a zip file that contains multiple JSON or XML definition files. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. (required) - :return: str + :param definitions_file: A JSON file that contains definitions to be deployed to the server (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. (required) + :type deploy_descriptor_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.transform_file_with_http_info( - definitions_file, deploy_descriptor_file, **kwargs - ) # noqa: E501 - else: - (data) = self.transform_file_with_http_info( - definitions_file, deploy_descriptor_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.transform_file_with_http_info(definitions_file, deploy_descriptor_file, **kwargs) # noqa: E501 - def transform_file_with_http_info( - self, definitions_file, deploy_descriptor_file, **kwargs - ): # noqa: E501 + def transform_file_with_http_info(self, definitions_file, deploy_descriptor_file, **kwargs): # noqa: E501 """Transform a definitions file # noqa: E501 Transform the provided definitions file (JSON) according to the provided Deploy Descriptor file (JSON). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.transform_file_with_http_info(definitions_file, deploy_descriptor_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains definitions to be deployed to the server. Can be either a JSON definition file, an XML definition file, or a zip file that contains multiple JSON or XML definition files. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. (required) - :return: str + :param definitions_file: A JSON file that contains definitions to be deployed to the server (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. (required) + :type deploy_descriptor_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["definitions_file", "deploy_descriptor_file"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'definitions_file', + 'deploy_descriptor_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method transform_file" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'definitions_file' is set - if self.api_client.client_side_validation and ( - "definitions_file" not in params or params["definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `definitions_file` when calling `transform_file`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('definitions_file' not in local_var_params or # noqa: E501 + local_var_params['definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `definitions_file` when calling `transform_file`") # noqa: E501 # verify the required parameter 'deploy_descriptor_file' is set - if self.api_client.client_side_validation and ( - "deploy_descriptor_file" not in params - or params["deploy_descriptor_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `deploy_descriptor_file` when calling `transform_file`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('deploy_descriptor_file' not in local_var_params or # noqa: E501 + local_var_params['deploy_descriptor_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `deploy_descriptor_file` when calling `transform_file`") # noqa: E501 collection_formats = {} @@ -2421,49 +5410,48 @@ def transform_file_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "definitions_file" in params: - local_var_files["definitionsFile"] = params[ - "definitions_file" - ] # noqa: E501 - if "deploy_descriptor_file" in params: - local_var_files["deployDescriptorFile"] = params[ - "deploy_descriptor_file" - ] # noqa: E501 + if 'definitions_file' in local_var_params: + local_var_files['definitionsFile'] = local_var_params['definitions_file'] # noqa: E501 + if 'deploy_descriptor_file' in local_var_params: + local_var_files['deployDescriptorFile'] = local_var_params['deploy_descriptor_file'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/deploy/transform", - "POST", + '/deploy/transform', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/provision_api.py b/src/clients/ctm_api_client/api/provision_api.py index 69fdec3..cf03424 100644 --- a/src/clients/ctm_api_client/api/provision_api.py +++ b/src/clients/ctm_api_client/api/provision_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class ProvisionApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -33,219 +37,592 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def add_provision_repo(self, repo_name, location, **kwargs): # noqa: E501 + """Add a configuration of a local repository. # noqa: E501 + + Add a configuration of a local repository. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_provision_repo(repo_name, location, async_req=True) + >>> result = thread.get() + + :param repo_name: (required) + :type repo_name: str + :param location: (required) + :type location: str + :param description: + :type description: str + :param helix_repo: True means this is a Helix repository. Otherwise it is an on-prem repo. Default is on prem + :type helix_repo: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ProvisionRepo + """ + kwargs['_return_http_data_only'] = True + return self.add_provision_repo_with_http_info(repo_name, location, **kwargs) # noqa: E501 + + def add_provision_repo_with_http_info(self, repo_name, location, **kwargs): # noqa: E501 + """Add a configuration of a local repository. # noqa: E501 + + Add a configuration of a local repository. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.add_provision_repo_with_http_info(repo_name, location, async_req=True) + >>> result = thread.get() + + :param repo_name: (required) + :type repo_name: str + :param location: (required) + :type location: str + :param description: + :type description: str + :param helix_repo: True means this is a Helix repository. Otherwise it is an on-prem repo. Default is on prem + :type helix_repo: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ProvisionRepo, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'repo_name', + 'location', + 'description', + 'helix_repo' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_provision_repo" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'repo_name' is set + if self.api_client.client_side_validation and ('repo_name' not in local_var_params or # noqa: E501 + local_var_params['repo_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `repo_name` when calling `add_provision_repo`") # noqa: E501 + # verify the required parameter 'location' is set + if self.api_client.client_side_validation and ('location' not in local_var_params or # noqa: E501 + local_var_params['location'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `location` when calling `add_provision_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'repo_name' in local_var_params and local_var_params['repo_name'] is not None: # noqa: E501 + query_params.append(('repoName', local_var_params['repo_name'])) # noqa: E501 + if 'location' in local_var_params and local_var_params['location'] is not None: # noqa: E501 + query_params.append(('location', local_var_params['location'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'helix_repo' in local_var_params and local_var_params['helix_repo'] is not None: # noqa: E501 + query_params.append(('helixRepo', local_var_params['helix_repo'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ProvisionRepo", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/provision/repository', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def cancel_upgrade_activity(self, upgrade_id, **kwargs): # noqa: E501 """Cancel upgrade activity # noqa: E501 Cancel upgrade activity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_upgrade_activity(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: Id of upgrade to cancel (required) - :return: SuccessData + :param upgrade_id: Id of upgrade to cancel (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.cancel_upgrade_activity_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - else: - (data) = self.cancel_upgrade_activity_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - return data - - def cancel_upgrade_activity_with_http_info( - self, upgrade_id, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.cancel_upgrade_activity_with_http_info(upgrade_id, **kwargs) # noqa: E501 + + def cancel_upgrade_activity_with_http_info(self, upgrade_id, **kwargs): # noqa: E501 """Cancel upgrade activity # noqa: E501 Cancel upgrade activity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.cancel_upgrade_activity_with_http_info(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: Id of upgrade to cancel (required) - :return: SuccessData + :param upgrade_id: Id of upgrade to cancel (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["upgrade_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'upgrade_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method cancel_upgrade_activity" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'upgrade_id' is set - if self.api_client.client_side_validation and ( - "upgrade_id" not in params or params["upgrade_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `upgrade_id` when calling `cancel_upgrade_activity`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('upgrade_id' not in local_var_params or # noqa: E501 + local_var_params['upgrade_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upgrade_id` when calling `cancel_upgrade_activity`") # noqa: E501 collection_formats = {} path_params = {} - if "upgrade_id" in params: - path_params["upgradeId"] = params["upgrade_id"] # noqa: E501 + if 'upgrade_id' in local_var_params: + path_params['upgradeId'] = local_var_params['upgrade_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/{upgradeId}/cancel", - "POST", + '/provision/upgrade/{upgradeId}/cancel', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_provision_repo(self, repo_name, **kwargs): # noqa: E501 + """Delete configuration of a local repository # noqa: E501 + + Delete configuration of a local repository which is identified with the ID specified. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_provision_repo(repo_name, async_req=True) + >>> result = thread.get() + + :param repo_name: The name of the local repository configuratioin to be deleted. (required) + :type repo_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ProvisionReposResults + """ + kwargs['_return_http_data_only'] = True + return self.delete_provision_repo_with_http_info(repo_name, **kwargs) # noqa: E501 + + def delete_provision_repo_with_http_info(self, repo_name, **kwargs): # noqa: E501 + """Delete configuration of a local repository # noqa: E501 + + Delete configuration of a local repository which is identified with the ID specified. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_provision_repo_with_http_info(repo_name, async_req=True) + >>> result = thread.get() + + :param repo_name: The name of the local repository configuratioin to be deleted. (required) + :type repo_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ProvisionReposResults, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'repo_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_provision_repo" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'repo_name' is set + if self.api_client.client_side_validation and ('repo_name' not in local_var_params or # noqa: E501 + local_var_params['repo_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `repo_name` when calling `delete_provision_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'repo_name' in local_var_params: + path_params['repoName'] = local_var_params['repo_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ProvisionReposResults", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/provision/repository/{repoName}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def delete_upgrade_activity(self, upgrade_id, **kwargs): # noqa: E501 """Delete upgrade activity status for specific upgrade id. # noqa: E501 Delete upgrade activity status for specific upgrade id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_upgrade_activity(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: The upgrade id. (required) - :return: SuccessData + :param upgrade_id: The upgrade id. (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_upgrade_activity_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_upgrade_activity_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - return data - - def delete_upgrade_activity_with_http_info( - self, upgrade_id, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.delete_upgrade_activity_with_http_info(upgrade_id, **kwargs) # noqa: E501 + + def delete_upgrade_activity_with_http_info(self, upgrade_id, **kwargs): # noqa: E501 """Delete upgrade activity status for specific upgrade id. # noqa: E501 Delete upgrade activity status for specific upgrade id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_upgrade_activity_with_http_info(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: The upgrade id. (required) - :return: SuccessData + :param upgrade_id: The upgrade id. (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["upgrade_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'upgrade_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_upgrade_activity" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'upgrade_id' is set - if self.api_client.client_side_validation and ( - "upgrade_id" not in params or params["upgrade_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `upgrade_id` when calling `delete_upgrade_activity`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('upgrade_id' not in local_var_params or # noqa: E501 + local_var_params['upgrade_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upgrade_id` when calling `delete_upgrade_activity`") # noqa: E501 collection_formats = {} path_params = {} - if "upgrade_id" in params: - path_params["upgradeId"] = params["upgrade_id"] # noqa: E501 + if 'upgrade_id' in local_var_params: + path_params['upgradeId'] = local_var_params['upgrade_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/{upgradeId}", - "DELETE", + '/provision/upgrade/{upgradeId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_all_upgrade_activities_status(self, **kwargs): # noqa: E501 """Get all upgrade activities status. # noqa: E501 @@ -253,32 +630,43 @@ def get_all_upgrade_activities_status(self, **kwargs): # noqa: E501 Get all upgrade activities status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_upgrade_activities_status(async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: The Control-M server name - :param str server: The Control-M server name - :param str agent: The Control-M Agent name - :param str from_version: Current product version - :param str to_version: Upgrade to version - :param str activity: Activity type (Install, Uninstall) - :param str status: Upgrade activity status (Cancel, Running, Completed, TransferCompleted, Failed, Unavailable) - :param str activity_name: Name of the upgrade activity - :return: UpgradeRecordList + :param ctm: The Control-M server name + :type ctm: str + :param server: The Control-M server name + :type server: str + :param agent: The Control-M Agent name + :type agent: str + :param from_version: Current product version + :type from_version: str + :param to_version: Upgrade to version + :type to_version: str + :param activity: Activity type (Install, Uninstall) + :type activity: str + :param status: Upgrade activity status (Cancel, Running, Completed, TransferCompleted, Failed, Unavailable) + :type status: str + :param activity_name: Name of the upgrade activity + :type activity_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UpgradeRecordList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_all_upgrade_activities_status_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_all_upgrade_activities_status_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_all_upgrade_activities_status_with_http_info(**kwargs) # noqa: E501 def get_all_upgrade_activities_status_with_http_info(self, **kwargs): # noqa: E501 """Get all upgrade activities status. # noqa: E501 @@ -286,101 +674,140 @@ def get_all_upgrade_activities_status_with_http_info(self, **kwargs): # noqa: E Get all upgrade activities status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_upgrade_activities_status_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: The Control-M server name - :param str server: The Control-M server name - :param str agent: The Control-M Agent name - :param str from_version: Current product version - :param str to_version: Upgrade to version - :param str activity: Activity type (Install, Uninstall) - :param str status: Upgrade activity status (Cancel, Running, Completed, TransferCompleted, Failed, Unavailable) - :param str activity_name: Name of the upgrade activity - :return: UpgradeRecordList + :param ctm: The Control-M server name + :type ctm: str + :param server: The Control-M server name + :type server: str + :param agent: The Control-M Agent name + :type agent: str + :param from_version: Current product version + :type from_version: str + :param to_version: Upgrade to version + :type to_version: str + :param activity: Activity type (Install, Uninstall) + :type activity: str + :param status: Upgrade activity status (Cancel, Running, Completed, TransferCompleted, Failed, Unavailable) + :type status: str + :param activity_name: Name of the upgrade activity + :type activity_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UpgradeRecordList, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "ctm", - "server", - "agent", - "from_version", - "to_version", - "activity", - "status", - "activity_name", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): + 'ctm', + 'server', + 'agent', + 'from_version', + 'to_version', + 'activity', + 'status', + 'activity_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_all_upgrade_activities_status" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "agent" in params: - query_params.append(("agent", params["agent"])) # noqa: E501 - if "from_version" in params: - query_params.append(("fromVersion", params["from_version"])) # noqa: E501 - if "to_version" in params: - query_params.append(("toVersion", params["to_version"])) # noqa: E501 - if "activity" in params: - query_params.append(("activity", params["activity"])) # noqa: E501 - if "status" in params: - query_params.append(("status", params["status"])) # noqa: E501 - if "activity_name" in params: - query_params.append(("activityName", params["activity_name"])) # noqa: E501 - - header_params = {} + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'agent' in local_var_params and local_var_params['agent'] is not None: # noqa: E501 + query_params.append(('agent', local_var_params['agent'])) # noqa: E501 + if 'from_version' in local_var_params and local_var_params['from_version'] is not None: # noqa: E501 + query_params.append(('fromVersion', local_var_params['from_version'])) # noqa: E501 + if 'to_version' in local_var_params and local_var_params['to_version'] is not None: # noqa: E501 + query_params.append(('toVersion', local_var_params['to_version'])) # noqa: E501 + if 'activity' in local_var_params and local_var_params['activity'] is not None: # noqa: E501 + query_params.append(('activity', local_var_params['activity'])) # noqa: E501 + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'activity_name' in local_var_params and local_var_params['activity_name'] is not None: # noqa: E501 + query_params.append(('activityName', local_var_params['activity_name'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UpgradeRecordList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrades", - "GET", + '/provision/upgrades', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="UpgradeRecordList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_deploy_versions(self, **kwargs): # noqa: E501 """Get available versions for upgrade. # noqa: E501 @@ -388,20 +815,27 @@ def get_deploy_versions(self, **kwargs): # noqa: E501 Get available versions for upgrade # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_deploy_versions(async_req=True) >>> result = thread.get() - :param async_req bool - :return: list[UpgradeInfo] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[UpgradeInfo] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_deploy_versions_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_deploy_versions_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_deploy_versions_with_http_info(**kwargs) # noqa: E501 def get_deploy_versions_with_http_info(self, **kwargs): # noqa: E501 """Get available versions for upgrade. # noqa: E501 @@ -409,30 +843,58 @@ def get_deploy_versions_with_http_info(self, **kwargs): # noqa: E501 Get available versions for upgrade # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_deploy_versions_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :return: list[UpgradeInfo] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[UpgradeInfo], status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_deploy_versions" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -440,37 +902,40 @@ def get_deploy_versions_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[UpgradeInfo]", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrades/versions", - "GET", + '/provision/upgrades/versions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="list[UpgradeInfo]", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_eligible_agents_for_upgrade(self, **kwargs): # noqa: E501 """Get eligible agents for upgrade that match the requested search criteria. # noqa: E501 @@ -478,26 +943,33 @@ def get_eligible_agents_for_upgrade(self, **kwargs): # noqa: E501 Get eligible agents for upgrade that match the requested search criteria from Control-M server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_eligible_agents_for_upgrade(async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type (Agent, MFT, AppPack). - :param str version: The version. - :return: UpgradeAgentInfoList + :param type: The type (Agent, MFT, AppPack). + :type type: str + :param version: The version. + :type version: str + :param show_ineligible_agents: Flag to return agents ineligible for upgrade. + :type show_ineligible_agents: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[UpgradeAgentInfo] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_eligible_agents_for_upgrade_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_eligible_agents_for_upgrade_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_eligible_agents_for_upgrade_with_http_info(**kwargs) # noqa: E501 def get_eligible_agents_for_upgrade_with_http_info(self, **kwargs): # noqa: E501 """Get eligible agents for upgrade that match the requested search criteria. # noqa: E501 @@ -505,74 +977,115 @@ def get_eligible_agents_for_upgrade_with_http_info(self, **kwargs): # noqa: E50 Get eligible agents for upgrade that match the requested search criteria from Control-M server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_eligible_agents_for_upgrade_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str type: The type (Agent, MFT, AppPack). - :param str version: The version. - :return: UpgradeAgentInfoList + :param type: The type (Agent, MFT, AppPack). + :type type: str + :param version: The version. + :type version: str + :param show_ineligible_agents: Flag to return agents ineligible for upgrade. + :type show_ineligible_agents: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[UpgradeAgentInfo], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["type", "version"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'type', + 'version', + 'show_ineligible_agents' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_eligible_agents_for_upgrade" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "type" in params: - query_params.append(("type", params["type"])) # noqa: E501 - if "version" in params: - query_params.append(("version", params["version"])) # noqa: E501 + if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 + query_params.append(('type', local_var_params['type'])) # noqa: E501 + if 'version' in local_var_params and local_var_params['version'] is not None: # noqa: E501 + query_params.append(('version', local_var_params['version'])) # noqa: E501 + if 'show_ineligible_agents' in local_var_params and local_var_params['show_ineligible_agents'] is not None: # noqa: E501 + query_params.append(('showIneligibleAgents', local_var_params['show_ineligible_agents'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[UpgradeAgentInfo]", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrades/agents", - "GET", + '/provision/upgrades/agents', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="UpgradeAgentInfoList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_images(self, os, **kwargs): # noqa: E501 """get list of available images for the requested OS # noqa: E501 @@ -580,22 +1093,31 @@ def get_images(self, os, **kwargs): # noqa: E501 Get a list of the images in the system for the requested OS. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_images(os, async_req=True) >>> result = thread.get() - :param async_req bool - :param str os: The OS name of the requested images. (required) - :param str version: filter according to specific version. - :return: StringListResult + :param os: The OS name of the requested images. (required) + :type os: str + :param version: filter according to specific version. + :type version: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[str] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_images_with_http_info(os, **kwargs) # noqa: E501 - else: - (data) = self.get_images_with_http_info(os, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_images_with_http_info(os, **kwargs) # noqa: E501 def get_images_with_http_info(self, os, **kwargs): # noqa: E501 """get list of available images for the requested OS # noqa: E501 @@ -603,323 +1125,691 @@ def get_images_with_http_info(self, os, **kwargs): # noqa: E501 Get a list of the images in the system for the requested OS. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_images_with_http_info(os, async_req=True) >>> result = thread.get() - :param async_req bool - :param str os: The OS name of the requested images. (required) - :param str version: filter according to specific version. - :return: StringListResult + :param os: The OS name of the requested images. (required) + :type os: str + :param version: filter according to specific version. + :type version: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["os", "version"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'os', + 'version' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_images" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'os' is set - if self.api_client.client_side_validation and ( - "os" not in params or params["os"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `os` when calling `get_images`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('os' not in local_var_params or # noqa: E501 + local_var_params['os'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `os` when calling `get_images`") # noqa: E501 collection_formats = {} path_params = {} - if "os" in params: - path_params["os"] = params["os"] # noqa: E501 + if 'os' in local_var_params: + path_params['os'] = local_var_params['os'] # noqa: E501 query_params = [] - if "version" in params: - query_params.append(("version", params["version"])) # noqa: E501 + if 'version' in local_var_params and local_var_params['version'] is not None: # noqa: E501 + query_params.append(('version', local_var_params['version'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/images/{os}", - "GET", + '/provision/images/{os}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="StringListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_provision_repo(self, repo_name, **kwargs): # noqa: E501 + """Get the configuration of the local repo from EM # noqa: E501 + + Get the configuration of the local repo from EM # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_provision_repo(repo_name, async_req=True) + >>> result = thread.get() + + :param repo_name: Local repo configuration name (required) + :type repo_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ProvisionRepo + """ + kwargs['_return_http_data_only'] = True + return self.get_provision_repo_with_http_info(repo_name, **kwargs) # noqa: E501 + + def get_provision_repo_with_http_info(self, repo_name, **kwargs): # noqa: E501 + """Get the configuration of the local repo from EM # noqa: E501 + + Get the configuration of the local repo from EM # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_provision_repo_with_http_info(repo_name, async_req=True) + >>> result = thread.get() + + :param repo_name: Local repo configuration name (required) + :type repo_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ProvisionRepo, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'repo_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_provision_repo" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'repo_name' is set + if self.api_client.client_side_validation and ('repo_name' not in local_var_params or # noqa: E501 + local_var_params['repo_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `repo_name` when calling `get_provision_repo`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'repo_name' in local_var_params: + path_params['repoName'] = local_var_params['repo_name'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ProvisionRepo", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/provision/repository/{repoName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def get_upgrade_activity_log(self, upgrade_id, **kwargs): # noqa: E501 """Returns log of upgrade activity. # noqa: E501 Returns log of upgrade activity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_upgrade_activity_log(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: The upgrade id. (required) - :return: str + :param upgrade_id: The upgrade id. (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_upgrade_activity_log_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - else: - (data) = self.get_upgrade_activity_log_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - return data - - def get_upgrade_activity_log_with_http_info( - self, upgrade_id, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.get_upgrade_activity_log_with_http_info(upgrade_id, **kwargs) # noqa: E501 + + def get_upgrade_activity_log_with_http_info(self, upgrade_id, **kwargs): # noqa: E501 """Returns log of upgrade activity. # noqa: E501 Returns log of upgrade activity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_upgrade_activity_log_with_http_info(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: The upgrade id. (required) - :return: str + :param upgrade_id: The upgrade id. (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["upgrade_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'upgrade_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_upgrade_activity_log" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'upgrade_id' is set - if self.api_client.client_side_validation and ( - "upgrade_id" not in params or params["upgrade_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `upgrade_id` when calling `get_upgrade_activity_log`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('upgrade_id' not in local_var_params or # noqa: E501 + local_var_params['upgrade_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upgrade_id` when calling `get_upgrade_activity_log`") # noqa: E501 collection_formats = {} path_params = {} - if "upgrade_id" in params: - path_params["upgradeId"] = params["upgrade_id"] # noqa: E501 + if 'upgrade_id' in local_var_params: + path_params['upgradeId'] = local_var_params['upgrade_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/{upgradeId}/output", - "GET", + '/provision/upgrade/{upgradeId}/output', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_upgrade_activity_status_per_upgrade_id( - self, upgrade_id, **kwargs - ): # noqa: E501 + def get_upgrade_activity_status_per_upgrade_id(self, upgrade_id, **kwargs): # noqa: E501 """Get upgrade activity status for specific upgrade id. # noqa: E501 Get upgrade activity status for specific upgrade id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_upgrade_activity_status_per_upgrade_id(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: The upgrade id. (required) - :return: UpgradeRecord + :param upgrade_id: The upgrade id. (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UpgradeRecord """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_upgrade_activity_status_per_upgrade_id_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - else: - (data) = self.get_upgrade_activity_status_per_upgrade_id_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - return data - - def get_upgrade_activity_status_per_upgrade_id_with_http_info( - self, upgrade_id, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.get_upgrade_activity_status_per_upgrade_id_with_http_info(upgrade_id, **kwargs) # noqa: E501 + + def get_upgrade_activity_status_per_upgrade_id_with_http_info(self, upgrade_id, **kwargs): # noqa: E501 """Get upgrade activity status for specific upgrade id. # noqa: E501 Get upgrade activity status for specific upgrade id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_upgrade_activity_status_per_upgrade_id_with_http_info(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: The upgrade id. (required) - :return: UpgradeRecord + :param upgrade_id: The upgrade id. (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UpgradeRecord, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["upgrade_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'upgrade_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_upgrade_activity_status_per_upgrade_id" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'upgrade_id' is set - if self.api_client.client_side_validation and ( - "upgrade_id" not in params or params["upgrade_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `upgrade_id` when calling `get_upgrade_activity_status_per_upgrade_id`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('upgrade_id' not in local_var_params or # noqa: E501 + local_var_params['upgrade_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upgrade_id` when calling `get_upgrade_activity_status_per_upgrade_id`") # noqa: E501 collection_formats = {} path_params = {} - if "upgrade_id" in params: - path_params["upgradeId"] = params["upgrade_id"] # noqa: E501 + if 'upgrade_id' in local_var_params: + path_params['upgradeId'] = local_var_params['upgrade_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UpgradeRecord", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/{upgradeId}", - "GET", + '/provision/upgrade/{upgradeId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="UpgradeRecord", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_provision_repos(self, **kwargs): # noqa: E501 + """Get the configuration of all the local repos from EM # noqa: E501 + + Get the configuration of all the local repos from EM # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_provision_repos(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ProvisionReposResults + """ + kwargs['_return_http_data_only'] = True + return self.list_provision_repos_with_http_info(**kwargs) # noqa: E501 + + def list_provision_repos_with_http_info(self, **kwargs): # noqa: E501 + """Get the configuration of all the local repos from EM # noqa: E501 + + Get the configuration of all the local repos from EM # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_provision_repos_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ProvisionReposResults, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_provision_repos" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ProvisionReposResults", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/provision/repositories', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def retry_upgrade_activity(self, upgrade_id, **kwargs): # noqa: E501 """Retry upgrade activity # noqa: E501 Retry upgrade activity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.retry_upgrade_activity(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: Id of upgrade to retry (required) - :return: SuccessData + :param upgrade_id: Id of upgrade to retry (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.retry_upgrade_activity_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - else: - (data) = self.retry_upgrade_activity_with_http_info( - upgrade_id, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.retry_upgrade_activity_with_http_info(upgrade_id, **kwargs) # noqa: E501 def retry_upgrade_activity_with_http_info(self, upgrade_id, **kwargs): # noqa: E501 """Retry upgrade activity # noqa: E501 @@ -927,78 +1817,110 @@ def retry_upgrade_activity_with_http_info(self, upgrade_id, **kwargs): # noqa: Retry upgrade activity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.retry_upgrade_activity_with_http_info(upgrade_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str upgrade_id: Id of upgrade to retry (required) - :return: SuccessData + :param upgrade_id: Id of upgrade to retry (required) + :type upgrade_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["upgrade_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'upgrade_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method retry_upgrade_activity" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'upgrade_id' is set - if self.api_client.client_side_validation and ( - "upgrade_id" not in params or params["upgrade_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `upgrade_id` when calling `retry_upgrade_activity`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('upgrade_id' not in local_var_params or # noqa: E501 + local_var_params['upgrade_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upgrade_id` when calling `retry_upgrade_activity`") # noqa: E501 collection_formats = {} path_params = {} - if "upgrade_id" in params: - path_params["upgradeId"] = params["upgrade_id"] # noqa: E501 + if 'upgrade_id' in local_var_params: + path_params['upgradeId'] = local_var_params['upgrade_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/{upgradeId}/retry", - "POST", + '/provision/upgrade/{upgradeId}/retry', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def transfer_and_install_product(self, upgrade_request, **kwargs): # noqa: E501 """Transfer and install a product on an agent # noqa: E501 @@ -1006,66 +1928,95 @@ def transfer_and_install_product(self, upgrade_request, **kwargs): # noqa: E501 Transfer and install a product on an agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.transfer_and_install_product(upgrade_request, async_req=True) >>> result = thread.get() - :param async_req bool - :param UpgradeRequest upgrade_request: Upgrade request details (required) - :return: UpgradeResponse + :param upgrade_request: Upgrade request details (required) + :type upgrade_request: UpgradeRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UpgradeResponse """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.transfer_and_install_product_with_http_info( - upgrade_request, **kwargs - ) # noqa: E501 - else: - (data) = self.transfer_and_install_product_with_http_info( - upgrade_request, **kwargs - ) # noqa: E501 - return data - - def transfer_and_install_product_with_http_info( - self, upgrade_request, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.transfer_and_install_product_with_http_info(upgrade_request, **kwargs) # noqa: E501 + + def transfer_and_install_product_with_http_info(self, upgrade_request, **kwargs): # noqa: E501 """Transfer and install a product on an agent # noqa: E501 Transfer and install a product on an agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.transfer_and_install_product_with_http_info(upgrade_request, async_req=True) >>> result = thread.get() - :param async_req bool - :param UpgradeRequest upgrade_request: Upgrade request details (required) - :return: UpgradeResponse + :param upgrade_request: Upgrade request details (required) + :type upgrade_request: UpgradeRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UpgradeResponse, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["upgrade_request"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'upgrade_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method transfer_and_install_product" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'upgrade_request' is set - if self.api_client.client_side_validation and ( - "upgrade_request" not in params or params["upgrade_request"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `upgrade_request` when calling `transfer_and_install_product`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('upgrade_request' not in local_var_params or # noqa: E501 + local_var_params['upgrade_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upgrade_request` when calling `transfer_and_install_product`") # noqa: E501 collection_formats = {} @@ -1073,39 +2024,43 @@ def transfer_and_install_product_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "upgrade_request" in params: - body_params = params["upgrade_request"] + if 'upgrade_request' in local_var_params: + body_params = local_var_params['upgrade_request'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UpgradeResponse", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/install", - "POST", + '/provision/upgrade/install', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="UpgradeResponse", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def uninstall_product(self, rollback_request, **kwargs): # noqa: E501 """Uninstall a product from an agent # noqa: E501 @@ -1113,66 +2068,95 @@ def uninstall_product(self, rollback_request, **kwargs): # noqa: E501 Uninstall a product from an agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.uninstall_product(rollback_request, async_req=True) >>> result = thread.get() - :param async_req bool - :param UpgradeRequest rollback_request: Rollback request details (required) - :return: UpgradeResponse + :param rollback_request: Rollback request details (required) + :type rollback_request: UpgradeRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: UpgradeResponse """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.uninstall_product_with_http_info( - rollback_request, **kwargs - ) # noqa: E501 - else: - (data) = self.uninstall_product_with_http_info( - rollback_request, **kwargs - ) # noqa: E501 - return data - - def uninstall_product_with_http_info( - self, rollback_request, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.uninstall_product_with_http_info(rollback_request, **kwargs) # noqa: E501 + + def uninstall_product_with_http_info(self, rollback_request, **kwargs): # noqa: E501 """Uninstall a product from an agent # noqa: E501 Uninstall a product from an agent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.uninstall_product_with_http_info(rollback_request, async_req=True) >>> result = thread.get() - :param async_req bool - :param UpgradeRequest rollback_request: Rollback request details (required) - :return: UpgradeResponse + :param rollback_request: Rollback request details (required) + :type rollback_request: UpgradeRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(UpgradeResponse, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["rollback_request"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'rollback_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method uninstall_product" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'rollback_request' is set - if self.api_client.client_side_validation and ( - "rollback_request" not in params or params["rollback_request"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `rollback_request` when calling `uninstall_product`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('rollback_request' not in local_var_params or # noqa: E501 + local_var_params['rollback_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `rollback_request` when calling `uninstall_product`") # noqa: E501 collection_formats = {} @@ -1180,36 +2164,40 @@ def uninstall_product_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "rollback_request" in params: - body_params = params["rollback_request"] + if 'rollback_request' in local_var_params: + body_params = local_var_params['rollback_request'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "UpgradeResponse", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/provision/upgrade/uninstall", - "POST", + '/provision/upgrade/uninstall', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="UpgradeResponse", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/reporting_api.py b/src/clients/ctm_api_client/api/reporting_api.py index b95ad3d..8c868df 100644 --- a/src/clients/ctm_api_client/api/reporting_api.py +++ b/src/clients/ctm_api_client/api/reporting_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class ReportingApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -33,112 +37,294 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_report_by_name(self, name, **kwargs): # noqa: E501 + def download_report_by_name(self, **kwargs): # noqa: E501 + """Download report by ID # noqa: E501 + + Downloads a report with a given ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.download_report_by_name(async_req=True) + >>> result = thread.get() + + :param report_id: The ID of the report to download + :type report_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: InputStreamResource + """ + kwargs['_return_http_data_only'] = True + return self.download_report_by_name_with_http_info(**kwargs) # noqa: E501 + + def download_report_by_name_with_http_info(self, **kwargs): # noqa: E501 + """Download report by ID # noqa: E501 + + Downloads a report with a given ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.download_report_by_name_with_http_info(async_req=True) + >>> result = thread.get() + + :param report_id: The ID of the report to download + :type report_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(InputStreamResource, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'report_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_report_by_name" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'report_id' in local_var_params and local_var_params['report_id'] is not None: # noqa: E501 + query_params.append(('reportId', local_var_params['report_id'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "InputStreamResource", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/reporting/download', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_report_by_name(self, name, format, **kwargs): # noqa: E501 """Retrieves a report by name. # noqa: E501 Retrieves a report by name in the desired format (CSV,PDF ,EXCEL). If the report is shared, add [shared:] before the name. This REST API command will be deprecated soon. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_report_by_name(name, async_req=True) + + >>> thread = api.get_report_by_name(name, format, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The report name. (required) - :param str format: - :return: ReportResult + :param name: The report name. (required) + :type name: str + :param format: (required) + :type format: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: ReportResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_report_by_name_with_http_info(name, **kwargs) # noqa: E501 - else: - (data) = self.get_report_by_name_with_http_info( - name, **kwargs - ) # noqa: E501 - return data - - def get_report_by_name_with_http_info(self, name, **kwargs): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.get_report_by_name_with_http_info(name, format, **kwargs) # noqa: E501 + + def get_report_by_name_with_http_info(self, name, format, **kwargs): # noqa: E501 """Retrieves a report by name. # noqa: E501 Retrieves a report by name in the desired format (CSV,PDF ,EXCEL). If the report is shared, add [shared:] before the name. This REST API command will be deprecated soon. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_report_by_name_with_http_info(name, async_req=True) + + >>> thread = api.get_report_by_name_with_http_info(name, format, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The report name. (required) - :param str format: - :return: ReportResult + :param name: The report name. (required) + :type name: str + :param format: (required) + :type format: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(ReportResult, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name", "format"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name', + 'format' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_report_by_name" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `get_report_by_name`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_report_by_name`") # noqa: E501 + # verify the required parameter 'format' is set + if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 + local_var_params['format'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `format` when calling `get_report_by_name`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if "format" in params: - query_params.append(("format", params["format"])) # noqa: E501 + if 'format' in local_var_params and local_var_params['format'] is not None: # noqa: E501 + query_params.append(('format', local_var_params['format'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ReportResult", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/reporting/report/{name}", - "GET", + '/reporting/report/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ReportResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_report_filters(self, name, **kwargs): # noqa: E501 """Retrieves report filters # noqa: E501 @@ -146,23 +332,29 @@ def get_report_filters(self, name, **kwargs): # noqa: E501 Retrieves report filters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_report_filters(name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The report name (required) - :return: RunReport + :param name: The report name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunReport """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_report_filters_with_http_info(name, **kwargs) # noqa: E501 - else: - (data) = self.get_report_filters_with_http_info( - name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_report_filters_with_http_info(name, **kwargs) # noqa: E501 def get_report_filters_with_http_info(self, name, **kwargs): # noqa: E501 """Retrieves report filters # noqa: E501 @@ -170,78 +362,109 @@ def get_report_filters_with_http_info(self, name, **kwargs): # noqa: E501 Retrieves report filters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_report_filters_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: The report name (required) - :return: RunReport + :param name: The report name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunReport, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_report_filters" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `get_report_filters`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_report_filters`") # noqa: E501 collection_formats = {} path_params = {} - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunReport", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/reporting/reportFilters/{name}", - "GET", + '/reporting/reportFilters/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunReport", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_report_status(self, report_id, **kwargs): # noqa: E501 """Retrieves status information for a report generation request based on the report ID # noqa: E501 @@ -249,25 +472,29 @@ def get_report_status(self, report_id, **kwargs): # noqa: E501 Retrieves status information for a report generation request based on the report ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_report_status(report_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str report_id: The ID of the report (required) - :return: RunReportInfo + :param report_id: The ID of the report (required) + :type report_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunReportInfo """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_report_status_with_http_info( - report_id, **kwargs - ) # noqa: E501 - else: - (data) = self.get_report_status_with_http_info( - report_id, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_report_status_with_http_info(report_id, **kwargs) # noqa: E501 def get_report_status_with_http_info(self, report_id, **kwargs): # noqa: E501 """Retrieves status information for a report generation request based on the report ID # noqa: E501 @@ -275,78 +502,109 @@ def get_report_status_with_http_info(self, report_id, **kwargs): # noqa: E501 Retrieves status information for a report generation request based on the report ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_report_status_with_http_info(report_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str report_id: The ID of the report (required) - :return: RunReportInfo + :param report_id: The ID of the report (required) + :type report_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunReportInfo, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["report_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'report_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_report_status" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'report_id' is set - if self.api_client.client_side_validation and ( - "report_id" not in params or params["report_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `report_id` when calling `get_report_status`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('report_id' not in local_var_params or # noqa: E501 + local_var_params['report_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `report_id` when calling `get_report_status`") # noqa: E501 collection_formats = {} path_params = {} - if "report_id" in params: - path_params["reportId"] = params["report_id"] # noqa: E501 + if 'report_id' in local_var_params: + path_params['reportId'] = local_var_params['report_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunReportInfo", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/reporting/status/{reportId}", - "GET", + '/reporting/status/{reportId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunReportInfo", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def run_report(self, report_run, **kwargs): # noqa: E501 """Run a report # noqa: E501 @@ -354,21 +612,29 @@ def run_report(self, report_run, **kwargs): # noqa: E501 Sends a request to generate a report asynchronously and returns the request status. If the report is shared, add [shared:] before the name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.run_report(report_run, async_req=True) >>> result = thread.get() - :param async_req bool - :param RunReport report_run: The report generation parameters (required) - :return: RunReportInfo + :param report_run: The report generation parameters (required) + :type report_run: RunReport + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunReportInfo """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.run_report_with_http_info(report_run, **kwargs) # noqa: E501 - else: - (data) = self.run_report_with_http_info(report_run, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.run_report_with_http_info(report_run, **kwargs) # noqa: E501 def run_report_with_http_info(self, report_run, **kwargs): # noqa: E501 """Run a report # noqa: E501 @@ -376,38 +642,65 @@ def run_report_with_http_info(self, report_run, **kwargs): # noqa: E501 Sends a request to generate a report asynchronously and returns the request status. If the report is shared, add [shared:] before the name. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.run_report_with_http_info(report_run, async_req=True) >>> result = thread.get() - :param async_req bool - :param RunReport report_run: The report generation parameters (required) - :return: RunReportInfo + :param report_run: The report generation parameters (required) + :type report_run: RunReport + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunReportInfo, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["report_run"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'report_run' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method run_report" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'report_run' is set - if self.api_client.client_side_validation and ( - "report_run" not in params or params["report_run"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `report_run` when calling `run_report`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('report_run' not in local_var_params or # noqa: E501 + local_var_params['report_run'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `report_run` when calling `run_report`") # noqa: E501 collection_formats = {} @@ -415,36 +708,41 @@ def run_report_with_http_info(self, report_run, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "report_run" in params: - body_params = params["report_run"] + if 'report_run' in local_var_params: + body_params = local_var_params['report_run'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunReportInfo", + 401: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/reporting/report", - "POST", + '/reporting/report', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunReportInfo", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/run_api.py b/src/clients/ctm_api_client/api/run_api.py index a3202cf..ef2a30e 100644 --- a/src/clients/ctm_api_client/api/run_api.py +++ b/src/clients/ctm_api_client/api/run_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class RunApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -39,27 +43,33 @@ def activate_workload_policy(self, policy, **kwargs): # noqa: E501 Activate a workload policy, supports wildcard in names # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.activate_workload_policy(policy, async_req=True) >>> result = thread.get() - :param async_req bool - :param str policy: The policy name to be activated. Case sensitive. Wildcards can be used. (required) - :param str ctm: Optional Control-M Server filter. - :param str server: Optional Control-M Server filter. - :return: WorkloadPolicyStateList + :param policy: The policy name to be activated. Case sensitive. Wildcards can be used. (required) + :type policy: str + :param ctm: Optional Control-M Server filter. + :type ctm: str + :param server: Optional Control-M Server filter. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: WorkloadPolicyStateList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.activate_workload_policy_with_http_info( - policy, **kwargs - ) # noqa: E501 - else: - (data) = self.activate_workload_policy_with_http_info( - policy, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.activate_workload_policy_with_http_info(policy, **kwargs) # noqa: E501 def activate_workload_policy_with_http_info(self, policy, **kwargs): # noqa: E501 """activate workload policy # noqa: E501 @@ -67,84 +77,119 @@ def activate_workload_policy_with_http_info(self, policy, **kwargs): # noqa: E5 Activate a workload policy, supports wildcard in names # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.activate_workload_policy_with_http_info(policy, async_req=True) >>> result = thread.get() - :param async_req bool - :param str policy: The policy name to be activated. Case sensitive. Wildcards can be used. (required) - :param str ctm: Optional Control-M Server filter. - :param str server: Optional Control-M Server filter. - :return: WorkloadPolicyStateList + :param policy: The policy name to be activated. Case sensitive. Wildcards can be used. (required) + :type policy: str + :param ctm: Optional Control-M Server filter. + :type ctm: str + :param server: Optional Control-M Server filter. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(WorkloadPolicyStateList, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["policy", "ctm", "server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'policy', + 'ctm', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method activate_workload_policy" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'policy' is set - if self.api_client.client_side_validation and ( - "policy" not in params or params["policy"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `policy` when calling `activate_workload_policy`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('policy' not in local_var_params or # noqa: E501 + local_var_params['policy'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `policy` when calling `activate_workload_policy`") # noqa: E501 collection_formats = {} path_params = {} - if "policy" in params: - path_params["policy"] = params["policy"] # noqa: E501 + if 'policy' in local_var_params: + path_params['policy'] = local_var_params['policy'] # noqa: E501 query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "WorkloadPolicyStateList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/workloadpolicy/{policy}/activate", - "POST", + '/run/workloadpolicy/{policy}/activate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="WorkloadPolicyStateList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def add_event(self, server, event, **kwargs): # noqa: E501 """Add a new event. # noqa: E501 @@ -152,24 +197,31 @@ def add_event(self, server, event, **kwargs): # noqa: E501 Add a new event. date may be of format MMDD, ODAT to set current controlm date, STAT to set no date. default value is ODAT. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_event(server, event, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the event. (required) - :param EventParam event: The defined event name. (required) - :return: SuccessData + :param server: The Control-M Server hosting the event. (required) + :type server: str + :param event: The defined event name. (required) + :type event: EventParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_event_with_http_info(server, event, **kwargs) # noqa: E501 - else: - (data) = self.add_event_with_http_info( - server, event, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_event_with_http_info(server, event, **kwargs) # noqa: E501 def add_event_with_http_info(self, server, event, **kwargs): # noqa: E501 """Add a new event. # noqa: E501 @@ -177,88 +229,118 @@ def add_event_with_http_info(self, server, event, **kwargs): # noqa: E501 Add a new event. date may be of format MMDD, ODAT to set current controlm date, STAT to set no date. default value is ODAT. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_event_with_http_info(server, event, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the event. (required) - :param EventParam event: The defined event name. (required) - :return: SuccessData + :param server: The Control-M Server hosting the event. (required) + :type server: str + :param event: The defined event name. (required) + :type event: EventParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "event"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'event' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_event" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_event`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_event`") # noqa: E501 # verify the required parameter 'event' is set - if self.api_client.client_side_validation and ( - "event" not in params or params["event"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `event` when calling `add_event`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('event' not in local_var_params or # noqa: E501 + local_var_params['event'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `event` when calling `add_event`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "event" in params: - body_params = params["event"] + if 'event' in local_var_params: + body_params = local_var_params['event'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/event/{server}", - "POST", + '/run/event/{server}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def add_resource(self, server, resource, **kwargs): # noqa: E501 """Add a new pool resource. # noqa: E501 @@ -266,26 +348,31 @@ def add_resource(self, server, resource, **kwargs): # noqa: E501 Add a new pool resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_resource(server, resource, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the resource. (required) - :param ResourceParam resource: The defined resource name. (required) - :return: SuccessData + :param server: The Control-M Server hosting the resource. (required) + :type server: str + :param resource: The defined resource name. (required) + :type resource: ResourceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_resource_with_http_info( - server, resource, **kwargs - ) # noqa: E501 - else: - (data) = self.add_resource_with_http_info( - server, resource, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.add_resource_with_http_info(server, resource, **kwargs) # noqa: E501 def add_resource_with_http_info(self, server, resource, **kwargs): # noqa: E501 """Add a new pool resource. # noqa: E501 @@ -293,88 +380,118 @@ def add_resource_with_http_info(self, server, resource, **kwargs): # noqa: E501 Add a new pool resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_resource_with_http_info(server, resource, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the resource. (required) - :param ResourceParam resource: The defined resource name. (required) - :return: SuccessData + :param server: The Control-M Server hosting the resource. (required) + :type server: str + :param resource: The defined resource name. (required) + :type resource: ResourceParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "resource"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'resource' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_resource" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `add_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `add_resource`") # noqa: E501 # verify the required parameter 'resource' is set - if self.api_client.client_side_validation and ( - "resource" not in params or params["resource"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `resource` when calling `add_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('resource' not in local_var_params or # noqa: E501 + local_var_params['resource'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `resource` when calling `add_resource`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "resource" in params: - body_params = params["resource"] + if 'resource' in local_var_params: + body_params = local_var_params['resource'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/resource/{server}", - "POST", + '/run/resource/{server}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def add_workload_policies(self, workloadpoliciesfile, **kwargs): # noqa: E501 """Add workload policies from definitions file # noqa: E501 @@ -382,67 +499,95 @@ def add_workload_policies(self, workloadpoliciesfile, **kwargs): # noqa: E501 Add workload policies from json definitions file to Control-M # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_workload_policies(workloadpoliciesfile, async_req=True) >>> result = thread.get() - :param async_req bool - :param file workloadpoliciesfile: A file that contains definitions of workload policies (required) - :return: WorkloadPoliciesFileResults + :param workloadpoliciesfile: A file that contains definitions of workload policies (required) + :type workloadpoliciesfile: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: WorkloadPoliciesFileResults """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.add_workload_policies_with_http_info( - workloadpoliciesfile, **kwargs - ) # noqa: E501 - else: - (data) = self.add_workload_policies_with_http_info( - workloadpoliciesfile, **kwargs - ) # noqa: E501 - return data - - def add_workload_policies_with_http_info( - self, workloadpoliciesfile, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.add_workload_policies_with_http_info(workloadpoliciesfile, **kwargs) # noqa: E501 + + def add_workload_policies_with_http_info(self, workloadpoliciesfile, **kwargs): # noqa: E501 """Add workload policies from definitions file # noqa: E501 Add workload policies from json definitions file to Control-M # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_workload_policies_with_http_info(workloadpoliciesfile, async_req=True) >>> result = thread.get() - :param async_req bool - :param file workloadpoliciesfile: A file that contains definitions of workload policies (required) - :return: WorkloadPoliciesFileResults + :param workloadpoliciesfile: A file that contains definitions of workload policies (required) + :type workloadpoliciesfile: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(WorkloadPoliciesFileResults, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["workloadpoliciesfile"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'workloadpoliciesfile' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method add_workload_policies" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'workloadpoliciesfile' is set - if self.api_client.client_side_validation and ( - "workloadpoliciesfile" not in params - or params["workloadpoliciesfile"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `workloadpoliciesfile` when calling `add_workload_policies`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('workloadpoliciesfile' not in local_var_params or # noqa: E501 + local_var_params['workloadpoliciesfile'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `workloadpoliciesfile` when calling `add_workload_policies`") # noqa: E501 collection_formats = {} @@ -450,70 +595,229 @@ def add_workload_policies_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "workloadpoliciesfile" in params: - local_var_files["workloadpoliciesfile"] = params[ - "workloadpoliciesfile" - ] # noqa: E501 + if 'workloadpoliciesfile' in local_var_params: + local_var_files['workloadpoliciesfile'] = local_var_params['workloadpoliciesfile'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "WorkloadPoliciesFileResults", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/workloadpolicies", - "POST", + '/run/workloadpolicies', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="WorkloadPoliciesFileResults", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def bypass(self, job_id, bypass_option, **kwargs): # noqa: E501 + """Bypass scheduling criterias definition # noqa: E501 + + Bypass scheduling criterias definition # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.bypass(job_id, bypass_option, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param bypass_option: The JSON file that contains definitions of bypass option attributes. (required) + :type bypass_option: BypassOptionAttributes + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.bypass_with_http_info(job_id, bypass_option, **kwargs) # noqa: E501 + + def bypass_with_http_info(self, job_id, bypass_option, **kwargs): # noqa: E501 + """Bypass scheduling criterias definition # noqa: E501 + + Bypass scheduling criterias definition # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.bypass_with_http_info(job_id, bypass_option, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param bypass_option: The JSON file that contains definitions of bypass option attributes. (required) + :type bypass_option: BypassOptionAttributes + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_id', + 'bypass_option' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method bypass" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `bypass`") # noqa: E501 + # verify the required parameter 'bypass_option' is set + if self.api_client.client_side_validation and ('bypass_option' not in local_var_params or # noqa: E501 + local_var_params['bypass_option'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bypass_option` when calling `bypass`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'bypass_option' in local_var_params: + body_params = local_var_params['bypass_option'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/job/{jobId}/bypass', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def confirm_job(self, job_id, **kwargs): # noqa: E501 """confirm a job # noqa: E501 confirm a job that waits for confirmation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.confirm_job(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.confirm_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.confirm_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.confirm_job_with_http_info(job_id, **kwargs) # noqa: E501 def confirm_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """confirm a job # noqa: E501 @@ -521,78 +825,109 @@ def confirm_job_with_http_info(self, job_id, **kwargs): # noqa: E501 confirm a job that waits for confirmation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.confirm_job_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method confirm_job" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `confirm_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `confirm_job`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/confirm", - "POST", + '/run/job/{jobId}/confirm', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def deactivate_workload_policy(self, policy, **kwargs): # noqa: E501 """deactivate a workload policy # noqa: E501 @@ -600,27 +935,33 @@ def deactivate_workload_policy(self, policy, **kwargs): # noqa: E501 Deactivate a workload policy, supports wildcard in names # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.deactivate_workload_policy(policy, async_req=True) >>> result = thread.get() - :param async_req bool - :param str policy: The policy name to be deactivated. Case sensitive. Wildcards can be used. (required) - :param str ctm: Optional Control-M Server filter. - :param str server: Optional Control-M Server filter. - :return: WorkloadPolicyStateList + :param policy: The policy name to be deactivated. Case sensitive. Wildcards can be used. (required) + :type policy: str + :param ctm: Optional Control-M Server filter. + :type ctm: str + :param server: Optional Control-M Server filter. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: WorkloadPolicyStateList """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.deactivate_workload_policy_with_http_info( - policy, **kwargs - ) # noqa: E501 - else: - (data) = self.deactivate_workload_policy_with_http_info( - policy, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.deactivate_workload_policy_with_http_info(policy, **kwargs) # noqa: E501 def deactivate_workload_policy_with_http_info(self, policy, **kwargs): # noqa: E501 """deactivate a workload policy # noqa: E501 @@ -628,211 +969,281 @@ def deactivate_workload_policy_with_http_info(self, policy, **kwargs): # noqa: Deactivate a workload policy, supports wildcard in names # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.deactivate_workload_policy_with_http_info(policy, async_req=True) >>> result = thread.get() - :param async_req bool - :param str policy: The policy name to be deactivated. Case sensitive. Wildcards can be used. (required) - :param str ctm: Optional Control-M Server filter. - :param str server: Optional Control-M Server filter. - :return: WorkloadPolicyStateList + :param policy: The policy name to be deactivated. Case sensitive. Wildcards can be used. (required) + :type policy: str + :param ctm: Optional Control-M Server filter. + :type ctm: str + :param server: Optional Control-M Server filter. + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(WorkloadPolicyStateList, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["policy", "ctm", "server"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'policy', + 'ctm', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method deactivate_workload_policy" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'policy' is set - if self.api_client.client_side_validation and ( - "policy" not in params or params["policy"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `policy` when calling `deactivate_workload_policy`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('policy' not in local_var_params or # noqa: E501 + local_var_params['policy'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `policy` when calling `deactivate_workload_policy`") # noqa: E501 collection_formats = {} path_params = {} - if "policy" in params: - path_params["policy"] = params["policy"] # noqa: E501 + if 'policy' in local_var_params: + path_params['policy'] = local_var_params['policy'] # noqa: E501 query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "WorkloadPolicyStateList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/workloadpolicy/{policy}/deactivate", - "POST", + '/run/workloadpolicy/{policy}/deactivate', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="WorkloadPolicyStateList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def delete_event(self, server, name, _date, **kwargs): # noqa: E501 + def delete_event(self, server, name, date, **kwargs): # noqa: E501 """Delete a event. # noqa: E501 Delete a event. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_event(server, name, _date, async_req=True) + + >>> thread = api.delete_event(server, name, date, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the event. (required) - :param str name: event name (required) - :param str _date: event date (required) - :return: SuccessData + :param server: The Control-M Server hosting the event. (required) + :type server: str + :param name: event name (required) + :type name: str + :param date: event date (required) + :type date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_event_with_http_info( - server, name, _date, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_event_with_http_info( - server, name, _date, **kwargs - ) # noqa: E501 - return data - - def delete_event_with_http_info(self, server, name, _date, **kwargs): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.delete_event_with_http_info(server, name, date, **kwargs) # noqa: E501 + + def delete_event_with_http_info(self, server, name, date, **kwargs): # noqa: E501 """Delete a event. # noqa: E501 Delete a event. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_event_with_http_info(server, name, _date, async_req=True) + + >>> thread = api.delete_event_with_http_info(server, name, date, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the event. (required) - :param str name: event name (required) - :param str _date: event date (required) - :return: SuccessData + :param server: The Control-M Server hosting the event. (required) + :type server: str + :param name: event name (required) + :type name: str + :param date: event date (required) + :type date: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "name", "_date"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'name', + 'date' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_event" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_event`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_event`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_event`" - ) # noqa: E501 - # verify the required parameter '_date' is set - if self.api_client.client_side_validation and ( - "_date" not in params or params["_date"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `_date` when calling `delete_event`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_event`") # noqa: E501 + # verify the required parameter 'date' is set + if self.api_client.client_side_validation and ('date' not in local_var_params or # noqa: E501 + local_var_params['date'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `date` when calling `delete_event`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 - if "_date" in params: - path_params["date"] = params["_date"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'date' in local_var_params: + path_params['date'] = local_var_params['date'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/event/{server}/{name}/{date}", - "DELETE", + '/run/event/{server}/{name}/{date}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def delete_job(self, job_id, **kwargs): # noqa: E501 """mark job as deleted # noqa: E501 @@ -840,21 +1251,29 @@ def delete_job(self, job_id, **kwargs): # noqa: E501 mark delete as deleted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_job(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_job_with_http_info(job_id, **kwargs) # noqa: E501 def delete_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """mark job as deleted # noqa: E501 @@ -862,78 +1281,109 @@ def delete_job_with_http_info(self, job_id, **kwargs): # noqa: E501 mark delete as deleted # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_job_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_job" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `delete_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `delete_job`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/delete", - "POST", + '/run/job/{jobId}/delete', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def delete_resource(self, server, name, **kwargs): # noqa: E501 """Delete a pool resource. # noqa: E501 @@ -941,26 +1391,31 @@ def delete_resource(self, server, name, **kwargs): # noqa: E501 Delete a pool resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_resource(server, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the resource. (required) - :param str name: Resource name (required) - :return: SuccessData + :param server: The Control-M Server hosting the resource. (required) + :type server: str + :param name: Resource name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_resource_with_http_info( - server, name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_resource_with_http_info( - server, name, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.delete_resource_with_http_info(server, name, **kwargs) # noqa: E501 def delete_resource_with_http_info(self, server, name, **kwargs): # noqa: E501 """Delete a pool resource. # noqa: E501 @@ -968,197 +1423,409 @@ def delete_resource_with_http_info(self, server, name, **kwargs): # noqa: E501 Delete a pool resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_resource_with_http_info(server, name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the resource. (required) - :param str name: Resource name (required) - :return: SuccessData + :param server: The Control-M Server hosting the resource. (required) + :type server: str + :param name: Resource name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'server', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_resource" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `delete_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_resource`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `delete_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_resource`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/resource/{server}/{name}", - "DELETE", + '/run/resource/{server}/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_variables(self, server, variable_names, **kwargs): # noqa: E501 + """Delete variables from the server. # noqa: E501 + + Delete variables from the server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_variables(server, variable_names, async_req=True) + >>> result = thread.get() + + :param server: The server that hosts the variables. (required) + :type server: str + :param variable_names: Variables definition file. (required) + :type variable_names: VariableNames + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.delete_variables_with_http_info(server, variable_names, **kwargs) # noqa: E501 + + def delete_variables_with_http_info(self, server, variable_names, **kwargs): # noqa: E501 + """Delete variables from the server. # noqa: E501 + + Delete variables from the server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_variables_with_http_info(server, variable_names, async_req=True) + >>> result = thread.get() + + :param server: The server that hosts the variables. (required) + :type server: str + :param variable_names: Variables definition file. (required) + :type variable_names: VariableNames + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'variable_names' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_variables" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `delete_variables`") # noqa: E501 + # verify the required parameter 'variable_names' is set + if self.api_client.client_side_validation and ('variable_names' not in local_var_params or # noqa: E501 + local_var_params['variable_names'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `variable_names` when calling `delete_variables`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'variable_names' in local_var_params: + body_params = local_var_params['variable_names'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/variables/{server}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def delete_workload_policy(self, workloadpolicy_name, **kwargs): # noqa: E501 """delete workloadpolicy # noqa: E501 Delete workloadpolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_workload_policy(workloadpolicy_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str workloadpolicy_name: The name of the workloadPolicy to be deleted. (required) - :return: SuccessData + :param workloadpolicy_name: The name of the workloadPolicy to be deleted. (required) + :type workloadpolicy_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.delete_workload_policy_with_http_info( - workloadpolicy_name, **kwargs - ) # noqa: E501 - else: - (data) = self.delete_workload_policy_with_http_info( - workloadpolicy_name, **kwargs - ) # noqa: E501 - return data - - def delete_workload_policy_with_http_info( - self, workloadpolicy_name, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.delete_workload_policy_with_http_info(workloadpolicy_name, **kwargs) # noqa: E501 + + def delete_workload_policy_with_http_info(self, workloadpolicy_name, **kwargs): # noqa: E501 """delete workloadpolicy # noqa: E501 Delete workloadpolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_workload_policy_with_http_info(workloadpolicy_name, async_req=True) >>> result = thread.get() - :param async_req bool - :param str workloadpolicy_name: The name of the workloadPolicy to be deleted. (required) - :return: SuccessData + :param workloadpolicy_name: The name of the workloadPolicy to be deleted. (required) + :type workloadpolicy_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["workloadpolicy_name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'workloadpolicy_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method delete_workload_policy" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'workloadpolicy_name' is set - if self.api_client.client_side_validation and ( - "workloadpolicy_name" not in params or params["workloadpolicy_name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `workloadpolicy_name` when calling `delete_workload_policy`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('workloadpolicy_name' not in local_var_params or # noqa: E501 + local_var_params['workloadpolicy_name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `workloadpolicy_name` when calling `delete_workload_policy`") # noqa: E501 collection_formats = {} path_params = {} - if "workloadpolicy_name" in params: - path_params["workloadpolicyName"] = params[ - "workloadpolicy_name" - ] # noqa: E501 + if 'workloadpolicy_name' in local_var_params: + path_params['workloadpolicyName'] = local_var_params['workloadpolicy_name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/workloadpolicy/{workloadpolicyName}", - "DELETE", + '/run/workloadpolicy/{workloadpolicyName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def free_job(self, job_id, **kwargs): # noqa: E501 """free an already held the job # noqa: E501 @@ -1166,21 +1833,29 @@ def free_job(self, job_id, **kwargs): # noqa: E501 free the job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.free_job(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.free_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.free_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.free_job_with_http_info(job_id, **kwargs) # noqa: E501 def free_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """free an already held the job # noqa: E501 @@ -1188,78 +1863,109 @@ def free_job_with_http_info(self, job_id, **kwargs): # noqa: E501 free the job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.free_job_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method free_job" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `free_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `free_job`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/free", - "POST", + '/run/job/{jobId}/free', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_active_job(self, job_id, **kwargs): # noqa: E501 """get active job # noqa: E501 @@ -1267,21 +1973,29 @@ def get_active_job(self, job_id, **kwargs): # noqa: E501 get the active job's data by job's order ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_active_job(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_active_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.get_active_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_active_job_with_http_info(job_id, **kwargs) # noqa: E501 def get_active_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """get active job # noqa: E501 @@ -1289,78 +2003,109 @@ def get_active_job_with_http_info(self, job_id, **kwargs): # noqa: E501 get the active job's data by job's order ID # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_active_job_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_active_job" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_active_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_active_job`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/get", - "GET", + '/run/job/{jobId}/get', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_active_services(self, **kwargs): # noqa: E501 """Get SLA active services # noqa: E501 @@ -1368,20 +2113,27 @@ def get_active_services(self, **kwargs): # noqa: E501 Get all SLA active services # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_active_services(async_req=True) >>> result = thread.get() - :param async_req bool - :return: ActiveServices + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: ActiveServices """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_active_services_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_active_services_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_active_services_with_http_info(**kwargs) # noqa: E501 def get_active_services_with_http_info(self, **kwargs): # noqa: E501 """Get SLA active services # noqa: E501 @@ -1389,30 +2141,58 @@ def get_active_services_with_http_info(self, **kwargs): # noqa: E501 Get all SLA active services # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_active_services_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :return: ActiveServices + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(ActiveServices, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_active_services" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -1420,37 +2200,40 @@ def get_active_services_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ActiveServices", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/services/sla", - "GET", + '/run/services/sla', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ActiveServices", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_detailed_workload_policies(self, **kwargs): # noqa: E501 """get full workLoad policies data that match the search criteria. # noqa: E501 @@ -1458,25 +2241,29 @@ def get_detailed_workload_policies(self, **kwargs): # noqa: E501 get full workLoad policies data as json code that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_detailed_workload_policies(async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: - :return: str + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_detailed_workload_policies_with_http_info( - **kwargs - ) # noqa: E501 - else: - (data) = self.get_detailed_workload_policies_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_detailed_workload_policies_with_http_info(**kwargs) # noqa: E501 def get_detailed_workload_policies_with_http_info(self, **kwargs): # noqa: E501 """get full workLoad policies data that match the search criteria. # noqa: E501 @@ -1484,71 +2271,105 @@ def get_detailed_workload_policies_with_http_info(self, **kwargs): # noqa: E501 get full workLoad policies data as json code that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_detailed_workload_policies_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str name: - :return: str + :param name: + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_detailed_workload_policies" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/workloadpolicies/detailed", - "GET", + '/run/workloadpolicies/detailed', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_events(self, **kwargs): # noqa: E501 """Get all events records for specific search. # noqa: E501 @@ -1556,25 +2377,37 @@ def get_events(self, **kwargs): # noqa: E501 Get all events records for specific search. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_events(async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: Control-M Server filter. - :param str server: Control-M Server filter. - :param str name: The event name filter. - :param str _date: The event date filter. - :param int limit: maximum events to fetch (default 1000). - :return: EventSet + :param ctm: Control-M Server filter. + :type ctm: str + :param server: Control-M Server filter. + :type server: str + :param name: The event name filter. + :type name: str + :param date: The event date filter. + :type date: str + :param limit: maximum events to fetch (default 1000). + :type limit: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[Event] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_events_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_events_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_events_with_http_info(**kwargs) # noqa: E501 def get_events_with_http_info(self, **kwargs): # noqa: E501 """Get all events records for specific search. # noqa: E501 @@ -1582,105 +2415,348 @@ def get_events_with_http_info(self, **kwargs): # noqa: E501 Get all events records for specific search. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_events_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: Control-M Server filter. - :param str server: Control-M Server filter. - :param str name: The event name filter. - :param str _date: The event date filter. - :param int limit: maximum events to fetch (default 1000). - :return: EventSet + :param ctm: Control-M Server filter. + :type ctm: str + :param server: Control-M Server filter. + :type server: str + :param name: The event name filter. + :type name: str + :param date: The event date filter. + :type date: str + :param limit: maximum events to fetch (default 1000). + :type limit: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[Event], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["ctm", "server", "name", "_date", "limit"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'ctm', + 'server', + 'name', + 'date', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_events" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - if "_date" in params: - query_params.append(("date", params["_date"])) # noqa: E501 - if "limit" in params: - query_params.append(("limit", params["limit"])) # noqa: E501 - - header_params = {} + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'date' in local_var_params and local_var_params['date'] is not None: # noqa: E501 + query_params.append(('date', local_var_params['date'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[Event]", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/events", - "GET", + '/run/events', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="EventSet", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_forecast_timeline(self, **kwargs): # noqa: E501 + """Sends a request to get the schedule and returns a poll ID to track the status of the request. # noqa: E501 + + Sends a request to get the schedule and returns a poll ID to track the status of the request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_forecast_timeline(async_req=True) + >>> result = thread.get() + + :param ctm: The Control-M/server name. + :type ctm: str + :param folder: Name of the folder being requested. + :type folder: str + :param rbc: Name of the RuleBasedCalendar being requested. + :type rbc: str + :param jobs: Specifies the job(s) within the folder. Defaults to all jobs if not specified. Use '*' as a wildcard for multiple jobs. + :type jobs: str + :param library: The name of the z/OS library that contains the jobs. + :type library: str + :param filter_type: The type of filter to apply. Options are 'year' or 'relativeMonths'. Defaults to 'relativeMonths'. + :type filter_type: str + :param year: Used only when filterType is 'year'. Specifies a particular year and returns a five-year schedule centered around the given year (e.g., input 2024 returns 2022-2026). Defaults to the current year. + :type year: int + :param _from: Used only when filterType is 'relativeMonths'. Specifies the start of the range in months relative to the current month. Minimum value is -24. Defaults to 0 (current month). + :type _from: int + :param to: Used only when filterType is 'relativeMonths'. Specifies the end of the range in months relative to the current month. Minimum value is +24. Defaults to 11. + :type to: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ForecastTimelineResults + """ + kwargs['_return_http_data_only'] = True + return self.get_forecast_timeline_with_http_info(**kwargs) # noqa: E501 + + def get_forecast_timeline_with_http_info(self, **kwargs): # noqa: E501 + """Sends a request to get the schedule and returns a poll ID to track the status of the request. # noqa: E501 + + Sends a request to get the schedule and returns a poll ID to track the status of the request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_forecast_timeline_with_http_info(async_req=True) + >>> result = thread.get() + + :param ctm: The Control-M/server name. + :type ctm: str + :param folder: Name of the folder being requested. + :type folder: str + :param rbc: Name of the RuleBasedCalendar being requested. + :type rbc: str + :param jobs: Specifies the job(s) within the folder. Defaults to all jobs if not specified. Use '*' as a wildcard for multiple jobs. + :type jobs: str + :param library: The name of the z/OS library that contains the jobs. + :type library: str + :param filter_type: The type of filter to apply. Options are 'year' or 'relativeMonths'. Defaults to 'relativeMonths'. + :type filter_type: str + :param year: Used only when filterType is 'year'. Specifies a particular year and returns a five-year schedule centered around the given year (e.g., input 2024 returns 2022-2026). Defaults to the current year. + :type year: int + :param _from: Used only when filterType is 'relativeMonths'. Specifies the start of the range in months relative to the current month. Minimum value is -24. Defaults to 0 (current month). + :type _from: int + :param to: Used only when filterType is 'relativeMonths'. Specifies the end of the range in months relative to the current month. Minimum value is +24. Defaults to 11. + :type to: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ForecastTimelineResults, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'ctm', + 'folder', + 'rbc', + 'jobs', + 'library', + 'filter_type', + 'year', + '_from', + 'to' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_forecast_timeline" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'folder' in local_var_params and local_var_params['folder'] is not None: # noqa: E501 + query_params.append(('folder', local_var_params['folder'])) # noqa: E501 + if 'rbc' in local_var_params and local_var_params['rbc'] is not None: # noqa: E501 + query_params.append(('rbc', local_var_params['rbc'])) # noqa: E501 + if 'jobs' in local_var_params and local_var_params['jobs'] is not None: # noqa: E501 + query_params.append(('jobs', local_var_params['jobs'])) # noqa: E501 + if 'library' in local_var_params and local_var_params['library'] is not None: # noqa: E501 + query_params.append(('library', local_var_params['library'])) # noqa: E501 + if 'filter_type' in local_var_params and local_var_params['filter_type'] is not None: # noqa: E501 + query_params.append(('filterType', local_var_params['filter_type'])) # noqa: E501 + if 'year' in local_var_params and local_var_params['year'] is not None: # noqa: E501 + query_params.append(('year', local_var_params['year'])) # noqa: E501 + if '_from' in local_var_params and local_var_params['_from'] is not None: # noqa: E501 + query_params.append(('from', local_var_params['_from'])) # noqa: E501 + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('to', local_var_params['to'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "ForecastTimelineResults", + 403: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/forecast/timeline', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def get_job_log(self, job_id, **kwargs): # noqa: E501 """Get job's log # noqa: E501 Get the job execution log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_log(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_job_log_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.get_job_log_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_job_log_with_http_info(job_id, **kwargs) # noqa: E501 def get_job_log_with_http_info(self, job_id, **kwargs): # noqa: E501 """Get job's log # noqa: E501 @@ -1688,78 +2764,109 @@ def get_job_log_with_http_info(self, job_id, **kwargs): # noqa: E501 Get the job execution log. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_log_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_job_log" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_job_log`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_job_log`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/log", - "GET", + '/run/job/{jobId}/log', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_job_output(self, job_id, **kwargs): # noqa: E501 """Get job output # noqa: E501 @@ -1767,22 +2874,31 @@ def get_job_output(self, job_id, **kwargs): # noqa: E501 Get the output returned from a job. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_output(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param int run_no: The execution number in case of multiple executions (0 will get the last execution's output) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param run_no: The execution number in case of multiple executions (0 will get the last execution's output) + :type run_no: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_job_output_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.get_job_output_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_job_output_with_http_info(job_id, **kwargs) # noqa: E501 def get_job_output_with_http_info(self, job_id, **kwargs): # noqa: E501 """Get job output # noqa: E501 @@ -1790,81 +2906,114 @@ def get_job_output_with_http_info(self, job_id, **kwargs): # noqa: E501 Get the output returned from a job. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_output_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param int run_no: The execution number in case of multiple executions (0 will get the last execution's output) - :return: str + :param job_id: The job ID (required) + :type job_id: str + :param run_no: The execution number in case of multiple executions (0 will get the last execution's output) + :type run_no: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id", "run_no"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'job_id', + 'run_no' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_job_output" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_job_output`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_job_output`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - if "run_no" in params: - query_params.append(("runNo", params["run_no"])) # noqa: E501 + if 'run_no' in local_var_params and local_var_params['run_no'] is not None: # noqa: E501 + query_params.append(('runNo', local_var_params['run_no'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "str", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/output", - "GET", + '/run/job/{jobId}/output', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="str", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_job_statistics(self, job_id, **kwargs): # noqa: E501 """Get job statistics # noqa: E501 @@ -1872,25 +3021,29 @@ def get_job_statistics(self, job_id, **kwargs): # noqa: E501 Get the statistics from a job. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_statistics(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: Statistics + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: Statistics """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_job_statistics_with_http_info( - job_id, **kwargs - ) # noqa: E501 - else: - (data) = self.get_job_statistics_with_http_info( - job_id, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_job_statistics_with_http_info(job_id, **kwargs) # noqa: E501 def get_job_statistics_with_http_info(self, job_id, **kwargs): # noqa: E501 """Get job statistics # noqa: E501 @@ -1898,78 +3051,109 @@ def get_job_statistics_with_http_info(self, job_id, **kwargs): # noqa: E501 Get the statistics from a job. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_statistics_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: Statistics + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(Statistics, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_job_statistics" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_job_statistics`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_job_statistics`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "text/plain"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "Statistics", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/statistics", - "GET", + '/run/job/{jobId}/statistics', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="Statistics", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_job_status(self, job_id, **kwargs): # noqa: E501 """Get status of a job # noqa: E501 @@ -1977,21 +3161,29 @@ def get_job_status(self, job_id, **kwargs): # noqa: E501 Get the job status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_status(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: Job ID returned from the run status action. (required) - :return: JobRunStatus + :param job_id: Job ID returned from the run status action. (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: JobRunStatus """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_job_status_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.get_job_status_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_job_status_with_http_info(job_id, **kwargs) # noqa: E501 def get_job_status_with_http_info(self, job_id, **kwargs): # noqa: E501 """Get status of a job # noqa: E501 @@ -1999,78 +3191,109 @@ def get_job_status_with_http_info(self, job_id, **kwargs): # noqa: E501 Get the job status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_job_status_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: Job ID returned from the run status action. (required) - :return: JobRunStatus + :param job_id: Job ID returned from the run status action. (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(JobRunStatus, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_job_status" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_job_status`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_job_status`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "JobRunStatus", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/status", - "GET", + '/run/job/{jobId}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="JobRunStatus", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_jobs_status(self, run_id, **kwargs): # noqa: E501 """Get status of running jobs # noqa: E501 @@ -2078,22 +3301,31 @@ def get_jobs_status(self, run_id, **kwargs): # noqa: E501 Run status of jobs started with the Run service. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_jobs_status(run_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str run_id: Run ID returned from the run action. (required) - :param int start_index: The index of the job status from which to start. returning results - :return: JobStatusResult + :param run_id: Run ID returned from the run action. (required) + :type run_id: str + :param start_index: The index of the job status from which to start. returning results + :type start_index: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: JobStatusResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_jobs_status_with_http_info(run_id, **kwargs) # noqa: E501 - else: - (data) = self.get_jobs_status_with_http_info(run_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_jobs_status_with_http_info(run_id, **kwargs) # noqa: E501 def get_jobs_status_with_http_info(self, run_id, **kwargs): # noqa: E501 """Get status of running jobs # noqa: E501 @@ -2101,81 +3333,115 @@ def get_jobs_status_with_http_info(self, run_id, **kwargs): # noqa: E501 Run status of jobs started with the Run service. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_jobs_status_with_http_info(run_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str run_id: Run ID returned from the run action. (required) - :param int start_index: The index of the job status from which to start. returning results - :return: JobStatusResult + :param run_id: Run ID returned from the run action. (required) + :type run_id: str + :param start_index: The index of the job status from which to start. returning results + :type start_index: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(JobStatusResult, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["run_id", "start_index"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'run_id', + 'start_index' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_jobs_status" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'run_id' is set - if self.api_client.client_side_validation and ( - "run_id" not in params or params["run_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `run_id` when calling `get_jobs_status`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('run_id' not in local_var_params or # noqa: E501 + local_var_params['run_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `run_id` when calling `get_jobs_status`") # noqa: E501 collection_formats = {} path_params = {} - if "run_id" in params: - path_params["runId"] = params["run_id"] # noqa: E501 + if 'run_id' in local_var_params: + path_params['runId'] = local_var_params['run_id'] # noqa: E501 query_params = [] - if "start_index" in params: - query_params.append(("startIndex", params["start_index"])) # noqa: E501 + if 'start_index' in local_var_params and local_var_params['start_index'] is not None: # noqa: E501 + query_params.append(('startIndex', local_var_params['start_index'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "JobStatusResult", + 404: "ErrorList", + 500: "ErrorList", + 503: "ErrorList", + } return self.api_client.call_api( - "/run/status/{runId}", - "GET", + '/run/status/{runId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="JobStatusResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def get_jobs_status_by_filter(self, **kwargs): # noqa: E501 """Get jobs that match the search criteria. # noqa: E501 @@ -2183,56 +3449,105 @@ def get_jobs_status_by_filter(self, **kwargs): # noqa: E501 Get status of jobs that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_jobs_status_by_filter(async_req=True) >>> result = thread.get() - :param async_req bool - :param int limit: maximum jobs status to fetch (default 1000). - :param str jobname: - :param str ctm: - :param str server: - :param str application: - :param str sub_application: - :param str host: - :param str status: - :param str folder: - :param str description: - :param str jobid: - :param str neighborhood: - :param int depth: - :param str direction: - :param str order_date_from: - :param str order_date_to: - :param str from_time: - :param str to_time: - :param str folder_library: - :param str host_group: - :param str run_as: - :param str command: - :param str file_path: - :param str file_name: - :param str workload_policy: - :param str rule_based_calendar: - :param str resource_mutex: - :param str resource_semaphore: - :param str resource_lock: - :param str resource_pool: - :param bool held: - :param bool folder_held: - :param bool cyclic: - :param bool deleted: - :return: JobStatusResult + :param limit: maximum jobs status to fetch (default 1000). + :type limit: int + :param jobname: + :type jobname: str + :param ctm: + :type ctm: str + :param server: + :type server: str + :param application: + :type application: str + :param sub_application: + :type sub_application: str + :param host: + :type host: str + :param status: + :type status: str + :param folder: + :type folder: str + :param description: + :type description: str + :param jobid: + :type jobid: str + :param neighborhood: + :type neighborhood: str + :param depth: + :type depth: int + :param direction: + :type direction: str + :param order_date_from: + :type order_date_from: str + :param order_date_to: + :type order_date_to: str + :param history_run_date: + :type history_run_date: str + :param from_time: + :type from_time: str + :param to_time: + :type to_time: str + :param folder_library: + :type folder_library: str + :param host_group: + :type host_group: str + :param run_as: + :type run_as: str + :param command: + :type command: str + :param file_path: + :type file_path: str + :param file_name: + :type file_name: str + :param workload_policy: + :type workload_policy: str + :param rule_based_calendar: + :type rule_based_calendar: str + :param resource_mutex: + :type resource_mutex: str + :param resource_semaphore: + :type resource_semaphore: str + :param resource_lock: + :type resource_lock: str + :param resource_pool: + :type resource_pool: str + :param held: + :type held: bool + :param folder_held: + :type folder_held: bool + :param cyclic: + :type cyclic: bool + :param deleted: + :type deleted: bool + :param event_date: + :type event_date: str + :param event_name: + :type event_name: str + :param wait_for_event_date: + :type wait_for_event_date: str + :param wait_for_event_name: + :type wait_for_event_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: JobStatusResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_jobs_status_by_filter_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_jobs_status_by_filter_with_http_info( - **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_jobs_status_by_filter_with_http_info(**kwargs) # noqa: E501 def get_jobs_status_by_filter_with_http_info(self, **kwargs): # noqa: E501 """Get jobs that match the search criteria. # noqa: E501 @@ -2240,942 +3555,2012 @@ def get_jobs_status_by_filter_with_http_info(self, **kwargs): # noqa: E501 Get status of jobs that match the requested search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_jobs_status_by_filter_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param int limit: maximum jobs status to fetch (default 1000). - :param str jobname: - :param str ctm: - :param str server: - :param str application: - :param str sub_application: - :param str host: - :param str status: - :param str folder: - :param str description: - :param str jobid: - :param str neighborhood: - :param int depth: - :param str direction: - :param str order_date_from: - :param str order_date_to: - :param str from_time: - :param str to_time: - :param str folder_library: - :param str host_group: - :param str run_as: - :param str command: - :param str file_path: - :param str file_name: - :param str workload_policy: - :param str rule_based_calendar: - :param str resource_mutex: - :param str resource_semaphore: - :param str resource_lock: - :param str resource_pool: - :param bool held: - :param bool folder_held: - :param bool cyclic: - :param bool deleted: - :return: JobStatusResult + :param limit: maximum jobs status to fetch (default 1000). + :type limit: int + :param jobname: + :type jobname: str + :param ctm: + :type ctm: str + :param server: + :type server: str + :param application: + :type application: str + :param sub_application: + :type sub_application: str + :param host: + :type host: str + :param status: + :type status: str + :param folder: + :type folder: str + :param description: + :type description: str + :param jobid: + :type jobid: str + :param neighborhood: + :type neighborhood: str + :param depth: + :type depth: int + :param direction: + :type direction: str + :param order_date_from: + :type order_date_from: str + :param order_date_to: + :type order_date_to: str + :param history_run_date: + :type history_run_date: str + :param from_time: + :type from_time: str + :param to_time: + :type to_time: str + :param folder_library: + :type folder_library: str + :param host_group: + :type host_group: str + :param run_as: + :type run_as: str + :param command: + :type command: str + :param file_path: + :type file_path: str + :param file_name: + :type file_name: str + :param workload_policy: + :type workload_policy: str + :param rule_based_calendar: + :type rule_based_calendar: str + :param resource_mutex: + :type resource_mutex: str + :param resource_semaphore: + :type resource_semaphore: str + :param resource_lock: + :type resource_lock: str + :param resource_pool: + :type resource_pool: str + :param held: + :type held: bool + :param folder_held: + :type folder_held: bool + :param cyclic: + :type cyclic: bool + :param deleted: + :type deleted: bool + :param event_date: + :type event_date: str + :param event_name: + :type event_name: str + :param wait_for_event_date: + :type wait_for_event_date: str + :param wait_for_event_name: + :type wait_for_event_name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(JobStatusResult, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "limit", - "jobname", - "ctm", - "server", - "application", - "sub_application", - "host", - "status", - "folder", - "description", - "jobid", - "neighborhood", - "depth", - "direction", - "order_date_from", - "order_date_to", - "from_time", - "to_time", - "folder_library", - "host_group", - "run_as", - "command", - "file_path", - "file_name", - "workload_policy", - "rule_based_calendar", - "resource_mutex", - "resource_semaphore", - "resource_lock", - "resource_pool", - "held", - "folder_held", - "cyclic", - "deleted", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): + 'limit', + 'jobname', + 'ctm', + 'server', + 'application', + 'sub_application', + 'host', + 'status', + 'folder', + 'description', + 'jobid', + 'neighborhood', + 'depth', + 'direction', + 'order_date_from', + 'order_date_to', + 'history_run_date', + 'from_time', + 'to_time', + 'folder_library', + 'host_group', + 'run_as', + 'command', + 'file_path', + 'file_name', + 'workload_policy', + 'rule_based_calendar', + 'resource_mutex', + 'resource_semaphore', + 'resource_lock', + 'resource_pool', + 'held', + 'folder_held', + 'cyclic', + 'deleted', + 'event_date', + 'event_name', + 'wait_for_event_date', + 'wait_for_event_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_jobs_status_by_filter" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "limit" in params: - query_params.append(("limit", params["limit"])) # noqa: E501 - if "jobname" in params: - query_params.append(("jobname", params["jobname"])) # noqa: E501 - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "application" in params: - query_params.append(("application", params["application"])) # noqa: E501 - if "sub_application" in params: - query_params.append( - ("subApplication", params["sub_application"]) - ) # noqa: E501 - if "host" in params: - query_params.append(("host", params["host"])) # noqa: E501 - if "status" in params: - query_params.append(("status", params["status"])) # noqa: E501 - if "folder" in params: - query_params.append(("folder", params["folder"])) # noqa: E501 - if "description" in params: - query_params.append(("description", params["description"])) # noqa: E501 - if "jobid" in params: - query_params.append(("jobid", params["jobid"])) # noqa: E501 - if "neighborhood" in params: - query_params.append(("neighborhood", params["neighborhood"])) # noqa: E501 - if "depth" in params: - query_params.append(("depth", params["depth"])) # noqa: E501 - if "direction" in params: - query_params.append(("direction", params["direction"])) # noqa: E501 - if "order_date_from" in params: - query_params.append( - ("orderDateFrom", params["order_date_from"]) - ) # noqa: E501 - if "order_date_to" in params: - query_params.append(("orderDateTo", params["order_date_to"])) # noqa: E501 - if "from_time" in params: - query_params.append(("fromTime", params["from_time"])) # noqa: E501 - if "to_time" in params: - query_params.append(("toTime", params["to_time"])) # noqa: E501 - if "folder_library" in params: - query_params.append( - ("folderLibrary", params["folder_library"]) - ) # noqa: E501 - if "host_group" in params: - query_params.append(("hostGroup", params["host_group"])) # noqa: E501 - if "run_as" in params: - query_params.append(("runAs", params["run_as"])) # noqa: E501 - if "command" in params: - query_params.append(("command", params["command"])) # noqa: E501 - if "file_path" in params: - query_params.append(("filePath", params["file_path"])) # noqa: E501 - if "file_name" in params: - query_params.append(("fileName", params["file_name"])) # noqa: E501 - if "workload_policy" in params: - query_params.append( - ("workloadPolicy", params["workload_policy"]) - ) # noqa: E501 - if "rule_based_calendar" in params: - query_params.append( - ("ruleBasedCalendar", params["rule_based_calendar"]) - ) # noqa: E501 - if "resource_mutex" in params: - query_params.append( - ("resourceMutex", params["resource_mutex"]) - ) # noqa: E501 - if "resource_semaphore" in params: - query_params.append( - ("resourceSemaphore", params["resource_semaphore"]) - ) # noqa: E501 - if "resource_lock" in params: - query_params.append(("resourceLock", params["resource_lock"])) # noqa: E501 - if "resource_pool" in params: - query_params.append(("resourcePool", params["resource_pool"])) # noqa: E501 - if "held" in params: - query_params.append(("held", params["held"])) # noqa: E501 - if "folder_held" in params: - query_params.append(("folderHeld", params["folder_held"])) # noqa: E501 - if "cyclic" in params: - query_params.append(("cyclic", params["cyclic"])) # noqa: E501 - if "deleted" in params: - query_params.append(("deleted", params["deleted"])) # noqa: E501 - - header_params = {} + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'jobname' in local_var_params and local_var_params['jobname'] is not None: # noqa: E501 + query_params.append(('jobname', local_var_params['jobname'])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'application' in local_var_params and local_var_params['application'] is not None: # noqa: E501 + query_params.append(('application', local_var_params['application'])) # noqa: E501 + if 'sub_application' in local_var_params and local_var_params['sub_application'] is not None: # noqa: E501 + query_params.append(('subApplication', local_var_params['sub_application'])) # noqa: E501 + if 'host' in local_var_params and local_var_params['host'] is not None: # noqa: E501 + query_params.append(('host', local_var_params['host'])) # noqa: E501 + if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 + query_params.append(('status', local_var_params['status'])) # noqa: E501 + if 'folder' in local_var_params and local_var_params['folder'] is not None: # noqa: E501 + query_params.append(('folder', local_var_params['folder'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'jobid' in local_var_params and local_var_params['jobid'] is not None: # noqa: E501 + query_params.append(('jobid', local_var_params['jobid'])) # noqa: E501 + if 'neighborhood' in local_var_params and local_var_params['neighborhood'] is not None: # noqa: E501 + query_params.append(('neighborhood', local_var_params['neighborhood'])) # noqa: E501 + if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 + query_params.append(('depth', local_var_params['depth'])) # noqa: E501 + if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 + query_params.append(('direction', local_var_params['direction'])) # noqa: E501 + if 'order_date_from' in local_var_params and local_var_params['order_date_from'] is not None: # noqa: E501 + query_params.append(('orderDateFrom', local_var_params['order_date_from'])) # noqa: E501 + if 'order_date_to' in local_var_params and local_var_params['order_date_to'] is not None: # noqa: E501 + query_params.append(('orderDateTo', local_var_params['order_date_to'])) # noqa: E501 + if 'history_run_date' in local_var_params and local_var_params['history_run_date'] is not None: # noqa: E501 + query_params.append(('historyRunDate', local_var_params['history_run_date'])) # noqa: E501 + if 'from_time' in local_var_params and local_var_params['from_time'] is not None: # noqa: E501 + query_params.append(('fromTime', local_var_params['from_time'])) # noqa: E501 + if 'to_time' in local_var_params and local_var_params['to_time'] is not None: # noqa: E501 + query_params.append(('toTime', local_var_params['to_time'])) # noqa: E501 + if 'folder_library' in local_var_params and local_var_params['folder_library'] is not None: # noqa: E501 + query_params.append(('folderLibrary', local_var_params['folder_library'])) # noqa: E501 + if 'host_group' in local_var_params and local_var_params['host_group'] is not None: # noqa: E501 + query_params.append(('hostGroup', local_var_params['host_group'])) # noqa: E501 + if 'run_as' in local_var_params and local_var_params['run_as'] is not None: # noqa: E501 + query_params.append(('runAs', local_var_params['run_as'])) # noqa: E501 + if 'command' in local_var_params and local_var_params['command'] is not None: # noqa: E501 + query_params.append(('command', local_var_params['command'])) # noqa: E501 + if 'file_path' in local_var_params and local_var_params['file_path'] is not None: # noqa: E501 + query_params.append(('filePath', local_var_params['file_path'])) # noqa: E501 + if 'file_name' in local_var_params and local_var_params['file_name'] is not None: # noqa: E501 + query_params.append(('fileName', local_var_params['file_name'])) # noqa: E501 + if 'workload_policy' in local_var_params and local_var_params['workload_policy'] is not None: # noqa: E501 + query_params.append(('workloadPolicy', local_var_params['workload_policy'])) # noqa: E501 + if 'rule_based_calendar' in local_var_params and local_var_params['rule_based_calendar'] is not None: # noqa: E501 + query_params.append(('ruleBasedCalendar', local_var_params['rule_based_calendar'])) # noqa: E501 + if 'resource_mutex' in local_var_params and local_var_params['resource_mutex'] is not None: # noqa: E501 + query_params.append(('resourceMutex', local_var_params['resource_mutex'])) # noqa: E501 + if 'resource_semaphore' in local_var_params and local_var_params['resource_semaphore'] is not None: # noqa: E501 + query_params.append(('resourceSemaphore', local_var_params['resource_semaphore'])) # noqa: E501 + if 'resource_lock' in local_var_params and local_var_params['resource_lock'] is not None: # noqa: E501 + query_params.append(('resourceLock', local_var_params['resource_lock'])) # noqa: E501 + if 'resource_pool' in local_var_params and local_var_params['resource_pool'] is not None: # noqa: E501 + query_params.append(('resourcePool', local_var_params['resource_pool'])) # noqa: E501 + if 'held' in local_var_params and local_var_params['held'] is not None: # noqa: E501 + query_params.append(('held', local_var_params['held'])) # noqa: E501 + if 'folder_held' in local_var_params and local_var_params['folder_held'] is not None: # noqa: E501 + query_params.append(('folderHeld', local_var_params['folder_held'])) # noqa: E501 + if 'cyclic' in local_var_params and local_var_params['cyclic'] is not None: # noqa: E501 + query_params.append(('cyclic', local_var_params['cyclic'])) # noqa: E501 + if 'deleted' in local_var_params and local_var_params['deleted'] is not None: # noqa: E501 + query_params.append(('deleted', local_var_params['deleted'])) # noqa: E501 + if 'event_date' in local_var_params and local_var_params['event_date'] is not None: # noqa: E501 + query_params.append(('eventDate', local_var_params['event_date'])) # noqa: E501 + if 'event_name' in local_var_params and local_var_params['event_name'] is not None: # noqa: E501 + query_params.append(('eventName', local_var_params['event_name'])) # noqa: E501 + if 'wait_for_event_date' in local_var_params and local_var_params['wait_for_event_date'] is not None: # noqa: E501 + query_params.append(('waitForEventDate', local_var_params['wait_for_event_date'])) # noqa: E501 + if 'wait_for_event_name' in local_var_params and local_var_params['wait_for_event_name'] is not None: # noqa: E501 + query_params.append(('waitForEventName', local_var_params['wait_for_event_name'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "JobStatusResult", + 206: "JobStatusResult", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/jobs/status", - "GET", + '/run/jobs/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="JobStatusResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_resources(self, **kwargs): # noqa: E501 - """Get all resources records matching search. # noqa: E501 + def get_list_of_un_ordered_jobs_for_specified_user_daily(self, poll, **kwargs): # noqa: E501 + """Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 - Get all resources records matching search. # noqa: E501 + Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_resources(async_req=True) + + >>> thread = api.get_list_of_un_ordered_jobs_for_specified_user_daily(poll, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: Control-M Server filter. - :param str server: Control-M Server filter. - :param str name: The resource name filter. - :return: ResourceSet + :param poll: (required) + :type poll: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CtmudchkJobsResults """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_resources_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_resources_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_list_of_un_ordered_jobs_for_specified_user_daily_with_http_info(poll, **kwargs) # noqa: E501 - def get_resources_with_http_info(self, **kwargs): # noqa: E501 - """Get all resources records matching search. # noqa: E501 + def get_list_of_un_ordered_jobs_for_specified_user_daily_with_http_info(self, poll, **kwargs): # noqa: E501 + """Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 - Get all resources records matching search. # noqa: E501 + Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_resources_with_http_info(async_req=True) + + >>> thread = api.get_list_of_un_ordered_jobs_for_specified_user_daily_with_http_info(poll, async_req=True) >>> result = thread.get() - :param async_req bool - :param str ctm: Control-M Server filter. - :param str server: Control-M Server filter. - :param str name: The resource name filter. - :return: ResourceSet + :param poll: (required) + :type poll: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CtmudchkJobsResults, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["ctm", "server", "name"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'poll' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_resources" % key + " to method get_list_of_un_ordered_jobs_for_specified_user_daily" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'poll' is set + if self.api_client.client_side_validation and ('poll' not in local_var_params or # noqa: E501 + local_var_params['poll'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `poll` when calling `get_list_of_un_ordered_jobs_for_specified_user_daily`") # noqa: E501 collection_formats = {} path_params = {} + if 'poll' in local_var_params: + path_params['poll'] = local_var_params['poll'] # noqa: E501 query_params = [] - if "ctm" in params: - query_params.append(("ctm", params["ctm"])) # noqa: E501 - if "server" in params: - query_params.append(("server", params["server"])) # noqa: E501 - if "name" in params: - query_params.append(("name", params["name"])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtmudchkJobsResults", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/resources", - "GET", + '/run/userDaily/missing/poll/{poll}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="ResourceSet", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_waiting_info(self, job_id, **kwargs): # noqa: E501 - """get job's waiting information # noqa: E501 + def get_related_job_services(self, job_id, **kwargs): # noqa: E501 + """Get related services # noqa: E501 - get the reason why the job is in waiting status # noqa: E501 + Get related services to the job, according to job id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_waiting_info(job_id, async_req=True) + + >>> thread = api.get_related_job_services(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: StringListResult + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: JobRelatedServicesData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_waiting_info_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.get_waiting_info_with_http_info( - job_id, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_related_job_services_with_http_info(job_id, **kwargs) # noqa: E501 - def get_waiting_info_with_http_info(self, job_id, **kwargs): # noqa: E501 - """get job's waiting information # noqa: E501 + def get_related_job_services_with_http_info(self, job_id, **kwargs): # noqa: E501 + """Get related services # noqa: E501 - get the reason why the job is in waiting status # noqa: E501 + Get related services to the job, according to job id. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_waiting_info_with_http_info(job_id, async_req=True) + + >>> thread = api.get_related_job_services_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: StringListResult + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(JobRelatedServicesData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_waiting_info" % key + " to method get_related_job_services" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `get_waiting_info`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_related_job_services`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "JobRelatedServicesData", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/waitingInfo", - "GET", + '/run/job/{jobId}/related', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="StringListResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def get_workload_policies(self, **kwargs): # noqa: E501 - """get workload policies # noqa: E501 + def get_resources(self, **kwargs): # noqa: E501 + """Get all resources records matching search. # noqa: E501 - Get all the workload policies. # noqa: E501 + Get all resources records matching search. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_workload_policies(async_req=True) + + >>> thread = api.get_resources(async_req=True) >>> result = thread.get() - :param async_req bool - :param str state: Optionally state filter. Available values Active, Inactive - :return: WorkloadPolicyList + :param ctm: Control-M Server filter. + :type ctm: str + :param server: Control-M Server filter. + :type server: str + :param name: The resource name filter. + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: list[ResourceObj] """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.get_workload_policies_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_workload_policies_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_resources_with_http_info(**kwargs) # noqa: E501 - def get_workload_policies_with_http_info(self, **kwargs): # noqa: E501 - """get workload policies # noqa: E501 + def get_resources_with_http_info(self, **kwargs): # noqa: E501 + """Get all resources records matching search. # noqa: E501 - Get all the workload policies. # noqa: E501 + Get all resources records matching search. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_workload_policies_with_http_info(async_req=True) + + >>> thread = api.get_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str state: Optionally state filter. Available values Active, Inactive - :return: WorkloadPolicyList + :param ctm: Control-M Server filter. + :type ctm: str + :param server: Control-M Server filter. + :type server: str + :param name: The resource name filter. + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(list[ResourceObj], status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["state"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'ctm', + 'server', + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_workload_policies" % key + " to method get_resources" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] - if "state" in params: - query_params.append(("state", params["state"])) # noqa: E501 + if 'ctm' in local_var_params and local_var_params['ctm'] is not None: # noqa: E501 + query_params.append(('ctm', local_var_params['ctm'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[ResourceObj]", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/workloadpolicies", - "GET", + '/run/resources', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="WorkloadPolicyList", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def hold_job(self, job_id, **kwargs): # noqa: E501 - """hold the job so it will not start untill it is freed # noqa: E501 + def get_un_ordered_jobs_for_specified_user_daily(self, user_daily, **kwargs): # noqa: E501 + """Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 - hold the job # noqa: E501 + Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.hold_job(job_id, async_req=True) + + >>> thread = api.get_un_ordered_jobs_for_specified_user_daily(user_daily, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param user_daily: (required) + :type user_daily: str + :param server: + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CtmudchkResults """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.hold_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.hold_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_un_ordered_jobs_for_specified_user_daily_with_http_info(user_daily, **kwargs) # noqa: E501 - def hold_job_with_http_info(self, job_id, **kwargs): # noqa: E501 - """hold the job so it will not start untill it is freed # noqa: E501 + def get_un_ordered_jobs_for_specified_user_daily_with_http_info(self, user_daily, **kwargs): # noqa: E501 + """Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 - hold the job # noqa: E501 + Enables you to get all the Jobs that were not ordered for a specified user daily. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.hold_job_with_http_info(job_id, async_req=True) + + >>> thread = api.get_un_ordered_jobs_for_specified_user_daily_with_http_info(user_daily, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param user_daily: (required) + :type user_daily: str + :param server: + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CtmudchkResults, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user_daily', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method hold_job" % key + " to method get_un_ordered_jobs_for_specified_user_daily" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `hold_job`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_daily' is set + if self.api_client.client_side_validation and ('user_daily' not in local_var_params or # noqa: E501 + local_var_params['user_daily'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_daily` when calling `get_un_ordered_jobs_for_specified_user_daily`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'user_daily' in local_var_params: + path_params['userDaily'] = local_var_params['user_daily'] # noqa: E501 query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "CtmudchkResults", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/hold", - "POST", + '/run/userDaily/{userDaily}/missing/list', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def kill_job(self, job_id, **kwargs): # noqa: E501 - """Cancel running job # noqa: E501 + def get_variables(self, **kwargs): # noqa: E501 + """Return variable values based on specified search criteria. # noqa: E501 - Abort job execution. # noqa: E501 + Return variable values based on specified search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.kill_job(job_id, async_req=True) + + >>> thread = api.get_variables(async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param pool: The pool name filter + :type pool: str + :param variable: The variable name filter + :type variable: str + :param server: The server name filter + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: Variables """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.kill_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.kill_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.get_variables_with_http_info(**kwargs) # noqa: E501 - def kill_job_with_http_info(self, job_id, **kwargs): # noqa: E501 - """Cancel running job # noqa: E501 + def get_variables_with_http_info(self, **kwargs): # noqa: E501 + """Return variable values based on specified search criteria. # noqa: E501 - Abort job execution. # noqa: E501 + Return variable values based on specified search criteria. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.kill_job_with_http_info(job_id, async_req=True) + + >>> thread = api.get_variables_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param pool: The pool name filter + :type pool: str + :param variable: The variable name filter + :type variable: str + :param server: The server name filter + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(Variables, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'pool', + 'variable', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method kill_job" % key + " to method get_variables" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `kill_job`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 query_params = [] + if 'pool' in local_var_params and local_var_params['pool'] is not None: # noqa: E501 + query_params.append(('pool', local_var_params['pool'])) # noqa: E501 + if 'variable' in local_var_params and local_var_params['variable'] is not None: # noqa: E501 + query_params.append(('variable', local_var_params['variable'])) # noqa: E501 + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "Variables", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/kill", - "POST", + '/run/variables', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_waiting_info(self, job_id, **kwargs): # noqa: E501 + """get job's waiting information # noqa: E501 + + get the reason why the job is in waiting status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_waiting_info(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[str] + """ + kwargs['_return_http_data_only'] = True + return self.get_waiting_info_with_http_info(job_id, **kwargs) # noqa: E501 + + def get_waiting_info_with_http_info(self, job_id, **kwargs): # noqa: E501 + """get job's waiting information # noqa: E501 + + get the reason why the job is in waiting status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_waiting_info_with_http_info(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_waiting_info" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `get_waiting_info`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "list[str]", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/job/{jobId}/waitingInfo', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_workload_policies(self, **kwargs): # noqa: E501 + """get workload policies # noqa: E501 + + Get all the workload policies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_workload_policies(async_req=True) + >>> result = thread.get() + + :param state: Optionally state filter. Available values Active, Inactive + :type state: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: WorkloadPolicyList + """ + kwargs['_return_http_data_only'] = True + return self.get_workload_policies_with_http_info(**kwargs) # noqa: E501 + + def get_workload_policies_with_http_info(self, **kwargs): # noqa: E501 + """get workload policies # noqa: E501 + + Get all the workload policies. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_workload_policies_with_http_info(async_req=True) + >>> result = thread.get() + + :param state: Optionally state filter. Available values Active, Inactive + :type state: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(WorkloadPolicyList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'state' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_workload_policies" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'state' in local_var_params and local_var_params['state'] is not None: # noqa: E501 + query_params.append(('state', local_var_params['state'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "WorkloadPolicyList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/workloadpolicies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def hold_job(self, job_id, **kwargs): # noqa: E501 + """hold the job so it will not start untill it is freed # noqa: E501 + + hold the job # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.hold_job(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.hold_job_with_http_info(job_id, **kwargs) # noqa: E501 + + def hold_job_with_http_info(self, job_id, **kwargs): # noqa: E501 + """hold the job so it will not start untill it is freed # noqa: E501 + + hold the job # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.hold_job_with_http_info(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method hold_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `hold_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/job/{jobId}/hold', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def kill_job(self, job_id, **kwargs): # noqa: E501 + """Cancel running job # noqa: E501 + + Abort job execution. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.kill_job(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.kill_job_with_http_info(job_id, **kwargs) # noqa: E501 + + def kill_job_with_http_info(self, job_id, **kwargs): # noqa: E501 + """Cancel running job # noqa: E501 + + Abort job execution. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.kill_job_with_http_info(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) - def modify_job(self, job_definitions_file, job_id, **kwargs): # noqa: E501 + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method kill_job" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `kill_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/job/{jobId}/kill', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def modify_job(self, job_id, job_definitions_file, **kwargs): # noqa: E501 """Modify active job # noqa: E501 Modify active job, specified by order id according to given definitions file (JSON). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_job(job_definitions_file, job_id, async_req=True) + + >>> thread = api.modify_job(job_id, job_definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file job_definitions_file: File that contains the definitions of the job to modify. It should be a JSON file. (required) - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param job_definitions_file: File that contains the definitions of the job to modify. It should be a JSON file. (required) + :type job_definitions_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.modify_job_with_http_info( - job_definitions_file, job_id, **kwargs - ) # noqa: E501 - else: - (data) = self.modify_job_with_http_info( - job_definitions_file, job_id, **kwargs - ) # noqa: E501 - return data - - def modify_job_with_http_info( - self, job_definitions_file, job_id, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.modify_job_with_http_info(job_id, job_definitions_file, **kwargs) # noqa: E501 + + def modify_job_with_http_info(self, job_id, job_definitions_file, **kwargs): # noqa: E501 """Modify active job # noqa: E501 Modify active job, specified by order id according to given definitions file (JSON). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_job_with_http_info(job_definitions_file, job_id, async_req=True) + + >>> thread = api.modify_job_with_http_info(job_id, job_definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file job_definitions_file: File that contains the definitions of the job to modify. It should be a JSON file. (required) - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param job_definitions_file: File that contains the definitions of the job to modify. It should be a JSON file. (required) + :type job_definitions_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_definitions_file", "job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id', + 'job_definitions_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method modify_job" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'job_definitions_file' is set - if self.api_client.client_side_validation and ( - "job_definitions_file" not in params - or params["job_definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_definitions_file` when calling `modify_job`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `modify_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `modify_job`") # noqa: E501 + # verify the required parameter 'job_definitions_file' is set + if self.api_client.client_side_validation and ('job_definitions_file' not in local_var_params or # noqa: E501 + local_var_params['job_definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_definitions_file` when calling `modify_job`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + if 'job_definitions_file' in local_var_params: + local_var_files['jobDefinitionsFile'] = local_var_params['job_definitions_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/job/{jobId}/modify', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def order_jobs_in_folder(self, **kwargs): # noqa: E501 + """Execute requested jobs in certain folder # noqa: E501 + + Run jobs from selected folder according to given filter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.order_jobs_in_folder(async_req=True) + >>> result = thread.get() + + :param data: parameters to select the jobs to run + :type data: OrderFolderParameters + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: RunResult + """ + kwargs['_return_http_data_only'] = True + return self.order_jobs_in_folder_with_http_info(**kwargs) # noqa: E501 + + def order_jobs_in_folder_with_http_info(self, **kwargs): # noqa: E501 + """Execute requested jobs in certain folder # noqa: E501 + + Run jobs from selected folder according to given filter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.order_jobs_in_folder_with_http_info(async_req=True) + >>> result = thread.get() + + :param data: parameters to select the jobs to run + :type data: OrderFolderParameters + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RunResult, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'data' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method order_jobs_in_folder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "job_definitions_file" in params: - local_var_files["jobDefinitionsFile"] = params[ - "job_definitions_file" - ] # noqa: E501 body_params = None + if 'data' in local_var_params: + body_params = local_var_params['data'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunResult", + 400: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/modify", - "POST", + '/run/order', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) - def order_jobs_in_folder(self, **kwargs): # noqa: E501 - """Execute requested jobs in certain folder # noqa: E501 + def poll_forecast_timeline_request(self, poll, **kwargs): # noqa: E501 + """Returns an array that contains a yearly schedule (according to the filter) when a job will run over the years. # noqa: E501 - Run jobs from selected folder according to given filter # noqa: E501 + Returns an array that contains a yearly schedule (according to the filter) when a job will run over the years. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.order_jobs_in_folder(async_req=True) + + >>> thread = api.poll_forecast_timeline_request(poll, async_req=True) >>> result = thread.get() - :param async_req bool - :param OrderFolderParameters data: parameters to select the jobs to run - :return: RunResult + :param poll: A unique ID received from the \"forecast:timeline::get\" API to retrieve the result of the timeline request. (required) + :type poll: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: PollForecastTimelineResults """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.order_jobs_in_folder_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.order_jobs_in_folder_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.poll_forecast_timeline_request_with_http_info(poll, **kwargs) # noqa: E501 - def order_jobs_in_folder_with_http_info(self, **kwargs): # noqa: E501 - """Execute requested jobs in certain folder # noqa: E501 + def poll_forecast_timeline_request_with_http_info(self, poll, **kwargs): # noqa: E501 + """Returns an array that contains a yearly schedule (according to the filter) when a job will run over the years. # noqa: E501 - Run jobs from selected folder according to given filter # noqa: E501 + Returns an array that contains a yearly schedule (according to the filter) when a job will run over the years. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.order_jobs_in_folder_with_http_info(async_req=True) + + >>> thread = api.poll_forecast_timeline_request_with_http_info(poll, async_req=True) >>> result = thread.get() - :param async_req bool - :param OrderFolderParameters data: parameters to select the jobs to run - :return: RunResult + :param poll: A unique ID received from the \"forecast:timeline::get\" API to retrieve the result of the timeline request. (required) + :type poll: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(PollForecastTimelineResults, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["data"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'poll' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method order_jobs_in_folder" % key + " to method poll_forecast_timeline_request" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'poll' is set + if self.api_client.client_side_validation and ('poll' not in local_var_params or # noqa: E501 + local_var_params['poll'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `poll` when calling `poll_forecast_timeline_request`") # noqa: E501 collection_formats = {} path_params = {} + if 'poll' in local_var_params: + path_params['poll'] = local_var_params['poll'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "data" in params: - body_params = params["data"] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "PollForecastTimelineResults", + 400: "ErrorList", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/order", - "POST", + '/run/forecast/timeline/poll/{poll}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def rerun_job(self, job_id, **kwargs): # noqa: E501 """Run job again # noqa: E501 @@ -3183,22 +5568,31 @@ def rerun_job(self, job_id, **kwargs): # noqa: E501 Run an already executed job (again). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.rerun_job(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param RerunParameters rerun_parameters: The JSON file with the restart configuration and parameters - :return: JobRunStatus + :param job_id: The job ID (required) + :type job_id: str + :param zos_job_config: The JSON file with the restart configuration and parameters + :type zos_job_config: RerunParameters + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: JobRunStatus """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.rerun_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.rerun_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.rerun_job_with_http_info(job_id, **kwargs) # noqa: E501 def rerun_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """Run job again # noqa: E501 @@ -3206,81 +5600,115 @@ def rerun_job_with_http_info(self, job_id, **kwargs): # noqa: E501 Run an already executed job (again). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.rerun_job_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :param RerunParameters rerun_parameters: The JSON file with the restart configuration and parameters - :return: JobRunStatus + :param job_id: The job ID (required) + :type job_id: str + :param zos_job_config: The JSON file with the restart configuration and parameters + :type zos_job_config: RerunParameters + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(JobRunStatus, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id", "rerun_parameters"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id', + 'zos_job_config' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method rerun_job" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `rerun_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `rerun_job`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "rerun_parameters" in params: - body_params = params["rerun_parameters"] + if 'zos_job_config' in local_var_params: + body_params = local_var_params['zos_job_config'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "JobRunStatus", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/rerun", - "POST", + '/run/job/{jobId}/rerun', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="JobRunStatus", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def run_jobs(self, job_definitions_file, **kwargs): # noqa: E501 """Run jobs # noqa: E501 @@ -3288,27 +5716,33 @@ def run_jobs(self, job_definitions_file, **kwargs): # noqa: E501 Run jobs according to given definitions file (JSON or zip). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.run_jobs(job_definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file job_definitions_file: File that contains the definitions of the jobs to run. It can be a JSON file, or a zip file that can contain one or more JSON files, as well as account(s) information. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :param file additional_configuration: additionalConfiguration to enable skip testing for local connection profile - :return: RunResult + :param job_definitions_file: File that contains the definitions of the jobs to run. It can be a JSON file, or a zip file that can contain one or more JSON files, as well as account(s) information. (required) + :type job_definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param additional_configuration: additionalConfiguration to enable skip testing for local connection profile + :type additional_configuration: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.run_jobs_with_http_info( - job_definitions_file, **kwargs - ) # noqa: E501 - else: - (data) = self.run_jobs_with_http_info( - job_definitions_file, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.run_jobs_with_http_info(job_definitions_file, **kwargs) # noqa: E501 def run_jobs_with_http_info(self, job_definitions_file, **kwargs): # noqa: E501 """Run jobs # noqa: E501 @@ -3316,45 +5750,71 @@ def run_jobs_with_http_info(self, job_definitions_file, **kwargs): # noqa: E501 Run jobs according to given definitions file (JSON or zip). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.run_jobs_with_http_info(job_definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file job_definitions_file: File that contains the definitions of the jobs to run. It can be a JSON file, or a zip file that can contain one or more JSON files, as well as account(s) information. (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :param file additional_configuration: additionalConfiguration to enable skip testing for local connection profile - :return: RunResult + :param job_definitions_file: File that contains the definitions of the jobs to run. It can be a JSON file, or a zip file that can contain one or more JSON files, as well as account(s) information. (required) + :type job_definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param additional_configuration: additionalConfiguration to enable skip testing for local connection profile + :type additional_configuration: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunResult, status_code(int), headers(HTTPHeaderDict)) """ + local_var_params = locals() + all_params = [ - "job_definitions_file", - "deploy_descriptor_file", - "additional_configuration", - ] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") - - params = locals() - for key, val in six.iteritems(params["kwargs"]): + 'job_definitions_file', + 'deploy_descriptor_file', + 'additional_configuration' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method run_jobs" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_definitions_file' is set - if self.api_client.client_side_validation and ( - "job_definitions_file" not in params - or params["job_definitions_file"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_definitions_file` when calling `run_jobs`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_definitions_file' not in local_var_params or # noqa: E501 + local_var_params['job_definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_definitions_file` when calling `run_jobs`") # noqa: E501 collection_formats = {} @@ -3362,119 +5822,295 @@ def run_jobs_with_http_info(self, job_definitions_file, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if "job_definitions_file" in params: - local_var_files["jobDefinitionsFile"] = params[ - "job_definitions_file" - ] # noqa: E501 - if "deploy_descriptor_file" in params: - local_var_files["deployDescriptorFile"] = params[ - "deploy_descriptor_file" - ] # noqa: E501 - if "additional_configuration" in params: - local_var_files["additionalConfiguration"] = params[ - "additional_configuration" - ] # noqa: E501 + if 'job_definitions_file' in local_var_params: + local_var_files['jobDefinitionsFile'] = local_var_params['job_definitions_file'] # noqa: E501 + if 'deploy_descriptor_file' in local_var_params: + local_var_files['deployDescriptorFile'] = local_var_params['deploy_descriptor_file'] # noqa: E501 + if 'additional_configuration' in local_var_params: + local_var_files['additionalConfiguration'] = local_var_params['additional_configuration'] # noqa: E501 body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params[ - "Content-Type" - ] = self.api_client.select_header_content_type( # noqa: E501 - ["multipart/form-data"] - ) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunResult", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run", - "POST", + '/run', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="RunResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def run_now(self, job_id, **kwargs): # noqa: E501 + """Bypass scheduling cretirias and start the job # noqa: E501 + + start a job immediately # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.run_now(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.run_now_with_http_info(job_id, **kwargs) # noqa: E501 + + def run_now_with_http_info(self, job_id, **kwargs): # noqa: E501 + """Bypass scheduling cretirias and start the job # noqa: E501 + + start a job immediately # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.run_now_with_http_info(job_id, async_req=True) + >>> result = thread.get() + + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) - def run_on_demand(self, definitions_file, annotation=None, **kwargs): # noqa: E501 + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method run_now" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'job_id' is set + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `run_now`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/job/{jobId}/runNow', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def run_on_demand(self, definitions_file, **kwargs): # noqa: E501 """Run a job on demand # noqa: E501 Run a job on demand # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.run_on_demand(definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains jobs definitions to be run on demand (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :param annotation - user annotation - :return: RunResult + :param definitions_file: A file that contains jobs definitions to be run on demand (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunResult """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.run_on_demand_with_http_info(definitions_file, annotation, **kwargs) # noqa: E501 - else: - (data) = self.run_on_demand_with_http_info(definitions_file, annotation, **kwargs) # noqa: E501 - return data - - - def run_on_demand_with_http_info(self, definitions_file, annotation, **kwargs): # noqa: E501 + return self.run_on_demand_with_http_info(definitions_file, **kwargs) # noqa: E501 + + def run_on_demand_with_http_info(self, definitions_file, **kwargs): # noqa: E501 """Run a job on demand # noqa: E501 Run a job on demand # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.run_on_demand_with_http_info(definitions_file, async_req=True) >>> result = thread.get() - :param async_req bool - :param file definitions_file: A file that contains jobs definitions to be run on demand (required) - :param file deploy_descriptor_file: Deploy Descriptor JSON file. - :param annotation - user annotation - :return: RunResult + :param definitions_file: A file that contains jobs definitions to be run on demand (required) + :type definitions_file: file + :param deploy_descriptor_file: Deploy Descriptor JSON file. + :type deploy_descriptor_file: file + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunResult, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ['definitions_file', 'deploy_descriptor_file'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + local_var_params = locals() + + all_params = [ + 'definitions_file', + 'deploy_descriptor_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params['kwargs']): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method run_on_demand" % key ) - params[key] = val - del params['kwargs'] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'definitions_file' is set - if self.api_client.client_side_validation and ('definitions_file' not in params or - params['definitions_file'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `definitions_file` when calling `run_on_demand`") # noqa: E501 + if self.api_client.client_side_validation and ('definitions_file' not in local_var_params or # noqa: E501 + local_var_params['definitions_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `definitions_file` when calling `run_on_demand`") # noqa: E501 collection_formats = {} @@ -3482,14 +6118,14 @@ def run_on_demand_with_http_info(self, definitions_file, annotation, **kwargs): query_params = [] - header_params = annotation.get_annotation() if annotation else {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} - if 'definitions_file' in params: - local_var_files['definitionsFile'] = params['definitions_file'] # noqa: E501 - if 'deploy_descriptor_file' in params: - local_var_files['deployDescriptorFile'] = params['deploy_descriptor_file'] # noqa: E501 + if 'definitions_file' in local_var_params: + local_var_files['definitionsFile'] = local_var_params['definitions_file'] # noqa: E501 + if 'deploy_descriptor_file' in local_var_params: + local_var_files['deployDescriptorFile'] = local_var_params['deploy_descriptor_file'] # noqa: E501 body_params = None # HTTP header `Accept` @@ -3497,12 +6133,20 @@ def run_on_demand_with_http_info(self, definitions_file, annotation, **kwargs): ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['multipart/form-data']) # noqa: E501 + header_params['Content-Type'] = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'], + 'POST', body_params)) # noqa: E501 # Authentication setting auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + response_types_map = { + 200: "RunResult", + 400: "ErrorList", + 500: "ErrorList", + } + return self.api_client.call_api( '/run/ondemand', 'POST', path_params, @@ -3511,113 +6155,161 @@ def run_on_demand_with_http_info(self, definitions_file, annotation, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='RunResult', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def run_now(self, job_id, **kwargs): # noqa: E501 - """Bypass scheduling cretirias and start the job # noqa: E501 + def run_un_ordered_jobs_for_specified_user_daily(self, user_daily, **kwargs): # noqa: E501 + """runs all the jobs that were not ordered for a specified user daily of a specified server. # noqa: E501 - start a job immediately # noqa: E501 + runs all the jobs that were not ordered for a specified user daily of a specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.run_now(job_id, async_req=True) + + >>> thread = api.run_un_ordered_jobs_for_specified_user_daily(user_daily, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param user_daily: (required) + :type user_daily: str + :param server: + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: RunResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.run_now_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.run_now_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.run_un_ordered_jobs_for_specified_user_daily_with_http_info(user_daily, **kwargs) # noqa: E501 - def run_now_with_http_info(self, job_id, **kwargs): # noqa: E501 - """Bypass scheduling cretirias and start the job # noqa: E501 + def run_un_ordered_jobs_for_specified_user_daily_with_http_info(self, user_daily, **kwargs): # noqa: E501 + """runs all the jobs that were not ordered for a specified user daily of a specified server. # noqa: E501 - start a job immediately # noqa: E501 + runs all the jobs that were not ordered for a specified user daily of a specified server. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.run_now_with_http_info(job_id, async_req=True) + + >>> thread = api.run_un_ordered_jobs_for_specified_user_daily_with_http_info(user_daily, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param user_daily: (required) + :type user_daily: str + :param server: + :type server: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(RunResult, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'user_daily', + 'server' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" " to method run_now" % key + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method run_un_ordered_jobs_for_specified_user_daily" % key ) - params[key] = val - del params["kwargs"] - # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `run_now`" - ) # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'user_daily' is set + if self.api_client.client_side_validation and ('user_daily' not in local_var_params or # noqa: E501 + local_var_params['user_daily'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `user_daily` when calling `run_un_ordered_jobs_for_specified_user_daily`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'user_daily' in local_var_params: + path_params['userDaily'] = local_var_params['user_daily'] # noqa: E501 query_params = [] + if 'server' in local_var_params and local_var_params['server'] is not None: # noqa: E501 + query_params.append(('server', local_var_params['server'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "RunResult", + 403: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/runNow", - "POST", + '/run/userDaily/{userDaily}/missing/run', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def set_to_ok(self, job_id, **kwargs): # noqa: E501 """set job end status to OK # noqa: E501 @@ -3625,21 +6317,29 @@ def set_to_ok(self, job_id, **kwargs): # noqa: E501 set job status to OK, post processing action # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_to_ok(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.set_to_ok_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.set_to_ok_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.set_to_ok_with_http_info(job_id, **kwargs) # noqa: E501 def set_to_ok_with_http_info(self, job_id, **kwargs): # noqa: E501 """set job end status to OK # noqa: E501 @@ -3647,100 +6347,291 @@ def set_to_ok_with_http_info(self, job_id, **kwargs): # noqa: E501 set job status to OK, post processing action # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_to_ok_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method set_to_ok" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `set_to_ok`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `set_to_ok`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/setToOk", - "POST", + '/run/job/{jobId}/setToOk', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def set_variables(self, server, variables_file, **kwargs): # noqa: E501 + """Set variable values as defined in json input. Use this API to create new variables or update existing variables. # noqa: E501 + + Set variable values as defined in json input. Use this API to create new variables or update existing variables. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_variables(server, variables_file, async_req=True) + >>> result = thread.get() + + :param server: The server that hosts the variables. (required) + :type server: str + :param variables_file: Variables definition file. (required) + :type variables_file: Variables + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: SuccessData + """ + kwargs['_return_http_data_only'] = True + return self.set_variables_with_http_info(server, variables_file, **kwargs) # noqa: E501 + + def set_variables_with_http_info(self, server, variables_file, **kwargs): # noqa: E501 + """Set variable values as defined in json input. Use this API to create new variables or update existing variables. # noqa: E501 + + Set variable values as defined in json input. Use this API to create new variables or update existing variables. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.set_variables_with_http_info(server, variables_file, async_req=True) + >>> result = thread.get() + + :param server: The server that hosts the variables. (required) + :type server: str + :param variables_file: Variables definition file. (required) + :type variables_file: Variables + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'server', + 'variables_file' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] ) + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_variables" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'server' is set + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `set_variables`") # noqa: E501 + # verify the required parameter 'variables_file' is set + if self.api_client.client_side_validation and ('variables_file' not in local_var_params or # noqa: E501 + local_var_params['variables_file'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `variables_file` when calling `set_variables`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'variables_file' in local_var_params: + body_params = local_var_params['variables_file'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } + + return self.api_client.call_api( + '/run/variables/{server}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def undelete_job(self, job_id, **kwargs): # noqa: E501 """recover a mark for deletion job # noqa: E501 recover a mark for deletion job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.undelete_job(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.undelete_job_with_http_info(job_id, **kwargs) # noqa: E501 - else: - (data) = self.undelete_job_with_http_info(job_id, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.undelete_job_with_http_info(job_id, **kwargs) # noqa: E501 def undelete_job_with_http_info(self, job_id, **kwargs): # noqa: E501 """recover a mark for deletion job # noqa: E501 @@ -3748,78 +6639,109 @@ def undelete_job_with_http_info(self, job_id, **kwargs): # noqa: E501 recover a mark for deletion job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.undelete_job_with_http_info(job_id, async_req=True) >>> result = thread.get() - :param async_req bool - :param str job_id: The job ID (required) - :return: SuccessData + :param job_id: The job ID (required) + :type job_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["job_id"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'job_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method undelete_job" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'job_id' is set - if self.api_client.client_side_validation and ( - "job_id" not in params or params["job_id"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `job_id` when calling `undelete_job`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('job_id' not in local_var_params or # noqa: E501 + local_var_params['job_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `job_id` when calling `undelete_job`") # noqa: E501 collection_formats = {} path_params = {} - if "job_id" in params: - path_params["jobId"] = params["job_id"] # noqa: E501 + if 'job_id' in local_var_params: + path_params['jobId'] = local_var_params['job_id'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/job/{jobId}/undelete", - "POST", + '/run/job/{jobId}/undelete', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def update_alert(self, alert_modify_value, **kwargs): # noqa: E501 """Update alert. # noqa: E501 @@ -3827,25 +6749,29 @@ def update_alert(self, alert_modify_value, **kwargs): # noqa: E501 Update alert. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_alert(alert_modify_value, async_req=True) >>> result = thread.get() - :param async_req bool - :param AlertParam alert_modify_value: File that contains the alert propery that want to be update. (required) - :return: SuccessData + :param alert_modify_value: File that contains the alert property that want to be update. (required) + :type alert_modify_value: AlertParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_alert_with_http_info( - alert_modify_value, **kwargs - ) # noqa: E501 - else: - (data) = self.update_alert_with_http_info( - alert_modify_value, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_alert_with_http_info(alert_modify_value, **kwargs) # noqa: E501 def update_alert_with_http_info(self, alert_modify_value, **kwargs): # noqa: E501 """Update alert. # noqa: E501 @@ -3853,38 +6779,65 @@ def update_alert_with_http_info(self, alert_modify_value, **kwargs): # noqa: E5 Update alert. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_alert_with_http_info(alert_modify_value, async_req=True) >>> result = thread.get() - :param async_req bool - :param AlertParam alert_modify_value: File that contains the alert propery that want to be update. (required) - :return: SuccessData + :param alert_modify_value: File that contains the alert property that want to be update. (required) + :type alert_modify_value: AlertParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["alert_modify_value"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'alert_modify_value' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_alert" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'alert_modify_value' is set - if self.api_client.client_side_validation and ( - "alert_modify_value" not in params or params["alert_modify_value"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `alert_modify_value` when calling `update_alert`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('alert_modify_value' not in local_var_params or # noqa: E501 + local_var_params['alert_modify_value'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alert_modify_value` when calling `update_alert`") # noqa: E501 collection_formats = {} @@ -3892,39 +6845,43 @@ def update_alert_with_http_info(self, alert_modify_value, **kwargs): # noqa: E5 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "alert_modify_value" in params: - body_params = params["alert_modify_value"] + if 'alert_modify_value' in local_var_params: + body_params = local_var_params['alert_modify_value'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/alerts", - "POST", + '/run/alerts', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def update_alert_status(self, alert_modify_status_value, **kwargs): # noqa: E501 """Update alert status. # noqa: E501 @@ -3932,67 +6889,95 @@ def update_alert_status(self, alert_modify_status_value, **kwargs): # noqa: E50 Update alert status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_alert_status(alert_modify_status_value, async_req=True) >>> result = thread.get() - :param async_req bool - :param AlertStatusParam alert_modify_status_value: File that contains the alert status propery that want to be update. (required) - :return: SuccessData + :param alert_modify_status_value: File that contains the alert status property that want to be update. (required) + :type alert_modify_status_value: AlertStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_alert_status_with_http_info( - alert_modify_status_value, **kwargs - ) # noqa: E501 - else: - (data) = self.update_alert_status_with_http_info( - alert_modify_status_value, **kwargs - ) # noqa: E501 - return data - - def update_alert_status_with_http_info( - self, alert_modify_status_value, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.update_alert_status_with_http_info(alert_modify_status_value, **kwargs) # noqa: E501 + + def update_alert_status_with_http_info(self, alert_modify_status_value, **kwargs): # noqa: E501 """Update alert status. # noqa: E501 Update alert status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_alert_status_with_http_info(alert_modify_status_value, async_req=True) >>> result = thread.get() - :param async_req bool - :param AlertStatusParam alert_modify_status_value: File that contains the alert status propery that want to be update. (required) - :return: SuccessData + :param alert_modify_status_value: File that contains the alert status property that want to be update. (required) + :type alert_modify_status_value: AlertStatusParam + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["alert_modify_status_value"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'alert_modify_status_value' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_alert_status" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'alert_modify_status_value' is set - if self.api_client.client_side_validation and ( - "alert_modify_status_value" not in params - or params["alert_modify_status_value"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `alert_modify_status_value` when calling `update_alert_status`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('alert_modify_status_value' not in local_var_params or # noqa: E501 + local_var_params['alert_modify_status_value'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alert_modify_status_value` when calling `update_alert_status`") # noqa: E501 collection_formats = {} @@ -4000,39 +6985,43 @@ def update_alert_status_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "alert_modify_status_value" in params: - body_params = params["alert_modify_status_value"] + if 'alert_modify_status_value' in local_var_params: + body_params = local_var_params['alert_modify_status_value'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/alerts/status", - "POST", + '/run/alerts/status', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def update_resource(self, server, name, max, **kwargs): # noqa: E501 """Update a pool resource. # noqa: E501 @@ -4040,27 +7029,33 @@ def update_resource(self, server, name, max, **kwargs): # noqa: E501 Update a pool resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_resource(server, name, max, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the resource. (required) - :param str name: Resource name (required) - :param ResourceMax max: The defined resource name. (required) - :return: SuccessData + :param server: The Control-M Server hosting the resource. (required) + :type server: str + :param name: Resource name (required) + :type name: str + :param max: The defined resource name. (required) + :type max: ResourceMax + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_resource_with_http_info( - server, name, max, **kwargs - ) # noqa: E501 - else: - (data) = self.update_resource_with_http_info( - server, name, max, **kwargs - ) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.update_resource_with_http_info(server, name, max, **kwargs) # noqa: E501 def update_resource_with_http_info(self, server, name, max, **kwargs): # noqa: E501 """Update a pool resource. # noqa: E501 @@ -4068,95 +7063,124 @@ def update_resource_with_http_info(self, server, name, max, **kwargs): # noqa: Update a pool resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_resource_with_http_info(server, name, max, async_req=True) >>> result = thread.get() - :param async_req bool - :param str server: The Control-M Server hosting the resource. (required) - :param str name: Resource name (required) - :param ResourceMax max: The defined resource name. (required) - :return: SuccessData + :param server: The Control-M Server hosting the resource. (required) + :type server: str + :param name: Resource name (required) + :type name: str + :param max: The defined resource name. (required) + :type max: ResourceMax + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["server", "name", "max"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() - params = locals() - for key, val in six.iteritems(params["kwargs"]): + all_params = [ + 'server', + 'name', + 'max' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_resource" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'server' is set - if self.api_client.client_side_validation and ( - "server" not in params or params["server"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `server` when calling `update_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('server' not in local_var_params or # noqa: E501 + local_var_params['server'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `server` when calling `update_resource`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ( - "name" not in params or params["name"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `name` when calling `update_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `update_resource`") # noqa: E501 # verify the required parameter 'max' is set - if self.api_client.client_side_validation and ( - "max" not in params or params["max"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `max` when calling `update_resource`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('max' not in local_var_params or # noqa: E501 + local_var_params['max'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `max` when calling `update_resource`") # noqa: E501 collection_formats = {} path_params = {} - if "server" in params: - path_params["server"] = params["server"] # noqa: E501 - if "name" in params: - path_params["name"] = params["name"] # noqa: E501 + if 'server' in local_var_params: + path_params['server'] = local_var_params['server'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "max" in params: - body_params = params["max"] + if 'max' in local_var_params: + body_params = local_var_params['max'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/run/resource/{server}/{name}", - "POST", + '/run/resource/{server}/{name}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api/session_api.py b/src/clients/ctm_api_client/api/session_api.py index 3baec27..f6b4c5e 100644 --- a/src/clients/ctm_api_client/api/session_api.py +++ b/src/clients/ctm_api_client/api/session_api.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,13 +19,17 @@ import six from clients.ctm_api_client.api_client import ApiClient +from clients.ctm_api_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) class SessionApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): @@ -39,21 +43,29 @@ def do_login(self, credentials, **kwargs): # noqa: E501 Authenticate the user with the specified password and return a token that can be used later in subsequent requests to access Control-M. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.do_login(credentials, async_req=True) >>> result = thread.get() - :param async_req bool - :param LoginCredentials credentials: The credentials to use for login. (required) - :return: LoginResult + :param credentials: The credentials to use for login. (required) + :type credentials: LoginCredentials + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: LoginResult """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.do_login_with_http_info(credentials, **kwargs) # noqa: E501 - else: - (data) = self.do_login_with_http_info(credentials, **kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.do_login_with_http_info(credentials, **kwargs) # noqa: E501 def do_login_with_http_info(self, credentials, **kwargs): # noqa: E501 """login user to Control-M # noqa: E501 @@ -61,38 +73,65 @@ def do_login_with_http_info(self, credentials, **kwargs): # noqa: E501 Authenticate the user with the specified password and return a token that can be used later in subsequent requests to access Control-M. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.do_login_with_http_info(credentials, async_req=True) >>> result = thread.get() - :param async_req bool - :param LoginCredentials credentials: The credentials to use for login. (required) - :return: LoginResult + :param credentials: The credentials to use for login. (required) + :type credentials: LoginCredentials + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(LoginResult, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["credentials"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'credentials' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method do_login" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'credentials' is set - if self.api_client.client_side_validation and ( - "credentials" not in params or params["credentials"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `credentials` when calling `do_login`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('credentials' not in local_var_params or # noqa: E501 + local_var_params['credentials'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `credentials` when calling `do_login`") # noqa: E501 collection_formats = {} @@ -100,39 +139,43 @@ def do_login_with_http_info(self, credentials, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "credentials" in params: - body_params = params["credentials"] + if 'credentials' in local_var_params: + body_params = local_var_params['credentials'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "LoginResult", + 401: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/session/login", - "POST", + '/session/login', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="LoginResult", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def do_logout(self, **kwargs): # noqa: E501 """logout user from Control-M # noqa: E501 @@ -140,20 +183,27 @@ def do_logout(self, **kwargs): # noqa: E501 Disconnects the user session specified by the request authentication token, and removes it from the server memory. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.do_logout(async_req=True) >>> result = thread.get() - :param async_req bool - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.do_logout_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.do_logout_with_http_info(**kwargs) # noqa: E501 - return data + kwargs['_return_http_data_only'] = True + return self.do_logout_with_http_info(**kwargs) # noqa: E501 def do_logout_with_http_info(self, **kwargs): # noqa: E501 """logout user from Control-M # noqa: E501 @@ -161,30 +211,58 @@ def do_logout_with_http_info(self, **kwargs): # noqa: E501 Disconnects the user session specified by the request authentication token, and removes it from the server memory. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.do_logout_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool - :return: SuccessData + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = [] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method do_logout" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] collection_formats = {} @@ -192,37 +270,40 @@ def do_logout_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 500: "ErrorList", + } return self.api_client.call_api( - "/session/logout", - "POST", + '/session/logout', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) def update_my_password(self, passwords_object, **kwargs): # noqa: E501 """Change my password # noqa: E501 @@ -230,66 +311,95 @@ def update_my_password(self, passwords_object, **kwargs): # noqa: E501 Change my password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_my_password(passwords_object, async_req=True) >>> result = thread.get() - :param async_req bool - :param PasswordsObject passwords_object: The new password. (required) - :return: SuccessData + :param passwords_object: The new password. (required) + :type passwords_object: PasswordsObject + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: SuccessData """ - kwargs["_return_http_data_only"] = True - if kwargs.get("async_req"): - return self.update_my_password_with_http_info( - passwords_object, **kwargs - ) # noqa: E501 - else: - (data) = self.update_my_password_with_http_info( - passwords_object, **kwargs - ) # noqa: E501 - return data - - def update_my_password_with_http_info( - self, passwords_object, **kwargs - ): # noqa: E501 + kwargs['_return_http_data_only'] = True + return self.update_my_password_with_http_info(passwords_object, **kwargs) # noqa: E501 + + def update_my_password_with_http_info(self, passwords_object, **kwargs): # noqa: E501 """Change my password # noqa: E501 Change my password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_my_password_with_http_info(passwords_object, async_req=True) >>> result = thread.get() - :param async_req bool - :param PasswordsObject passwords_object: The new password. (required) - :return: SuccessData + :param passwords_object: The new password. (required) + :type passwords_object: PasswordsObject + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(SuccessData, status_code(int), headers(HTTPHeaderDict)) """ - all_params = ["passwords_object"] # noqa: E501 - all_params.append("async_req") - all_params.append("_return_http_data_only") - all_params.append("_preload_content") - all_params.append("_request_timeout") + local_var_params = locals() + + all_params = [ + 'passwords_object' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) - params = locals() - for key, val in six.iteritems(params["kwargs"]): + for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: - raise TypeError( + raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method update_my_password" % key ) - params[key] = val - del params["kwargs"] + local_var_params[key] = val + del local_var_params['kwargs'] # verify the required parameter 'passwords_object' is set - if self.api_client.client_side_validation and ( - "passwords_object" not in params or params["passwords_object"] is None - ): # noqa: E501 - raise ValueError( - "Missing the required parameter `passwords_object` when calling `update_my_password`" - ) # noqa: E501 + if self.api_client.client_side_validation and ('passwords_object' not in local_var_params or # noqa: E501 + local_var_params['passwords_object'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `passwords_object` when calling `update_my_password`") # noqa: E501 collection_formats = {} @@ -297,36 +407,41 @@ def update_my_password_with_http_info( query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if "passwords_object" in params: - body_params = params["passwords_object"] + if 'passwords_object' in local_var_params: + body_params = local_var_params['passwords_object'] # HTTP header `Accept` - header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ["Bearer"] # noqa: E501 + auth_settings = ['ApiKeyAuth', 'Bearer'] # noqa: E501 + + response_types_map = { + 200: "SuccessData", + 400: "ErrorList", + 404: "ErrorList", + 500: "ErrorList", + } return self.api_client.call_api( - "/session/user/password/update", - "POST", + '/session/user/password/update', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type="SuccessData", # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, - async_req=params.get("async_req"), - _return_http_data_only=params.get("_return_http_data_only"), - _preload_content=params.get("_preload_content", True), - _request_timeout=params.get("_request_timeout"), + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, - ) + _request_auth=local_var_params.get('_request_auth')) diff --git a/src/clients/ctm_api_client/api_client.py b/src/clients/ctm_api_client/api_client.py index 041da8f..b0a11b5 100644 --- a/src/clients/ctm_api_client/api_client.py +++ b/src/clients/ctm_api_client/api_client.py @@ -4,14 +4,16 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +import atexit import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -24,20 +26,21 @@ from six.moves.urllib.parse import quote from clients.ctm_api_client.configuration import Configuration -import clients.ctm_api_client as ctm_api_client +import clients.ctm_api_client.models from clients.ctm_api_client import rest -import clients +from clients.ctm_api_client.exceptions import ApiValueError, ApiException + class ApiClient(object): - """Generic API client for Swagger client library builds. + """Generic API client for OpenAPI client library builds. - Swagger generic API client. This client handles the client- + OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger + the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. :param configuration: .Configuration object for this client @@ -46,78 +49,82 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types NATIVE_TYPES_MAPPING = { - "int": int, - "long": int if six.PY3 else long, # noqa: F821 - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "object": object, + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, } + _pool = None - def __init__( - self, configuration=None, header_name=None, header_value=None, cookie=None - ): + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default_copy() self.configuration = configuration + self.pool_threads = pool_threads - # Use the pool property to lazily initialize the ThreadPool. - self._pool = None self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "Swagger-Codegen/1.0.0/python" + self.user_agent = 'OpenAPI-Generator/1.0.0/python' self.client_side_validation = configuration.client_side_validation - def __del__(self): - if self._pool is not None: + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: self._pool.close() self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) @property def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ if self._pool is None: - self._pool = ThreadPool() + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) return self._pool @property def user_agent(self): """User agent for this API client""" - return self.default_headers["User-Agent"] + return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - self.default_headers["User-Agent"] = value + self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value def __call_api( - self, - resource_path, - method, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, - response_type=None, - auth_settings=None, - _return_http_data_only=None, - collection_formats=None, - _preload_content=True, - _request_timeout=None, - ): + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_types_map=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): config = self.configuration @@ -125,70 +132,94 @@ def __call_api( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params["Cookie"] = self.cookie + header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params, collection_formats) - ) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) + path_params = self.parameters_to_tuples(path_params, + collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) ) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, collection_formats) + query_params = self.parameters_to_tuples(query_params, + collection_formats) # post parameters if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) + post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) + self.update_params_for_auth( + header_params, query_params, auth_settings, + request_auth=_request_auth) # body if body: body = self.sanitize_for_serialization(body) # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, - url, - query_params=query_params, - headers=header_params, - post_params=post_params, - body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - ) + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e self.last_response = response_data return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - if _return_http_data_only: + if not _preload_content: return return_data + + response_type = response_types_map.get(response_data.status, None) + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + + if response_type: + return_data = self.deserialize(response_data, response_type) else: - return (return_data, response_data.status, response_data.getheaders()) + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) def sanitize_for_serialization(self, obj): """Builds a JSON POST object. @@ -199,7 +230,7 @@ def sanitize_for_serialization(self, obj): convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. - If obj is swagger model, return the properties dict. + If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. @@ -209,9 +240,11 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() @@ -219,20 +252,16 @@ def sanitize_for_serialization(self, obj): obj_dict = obj else: # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` + # attributes `openapi_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = { - obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None - } + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.openapi_types) + if getattr(obj, attr) is not None} - return { - key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict) - } + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} def deserialize(self, response, response_type): """Deserializes response into an object. @@ -268,15 +297,15 @@ def __deserialize(self, data, klass): return None if type(klass) == str: - if klass.startswith("list["): - sub_kls = re.match(r"list\[(.*)\]", klass).group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] - if klass.startswith("dict("): - sub_kls = re.match(r"dict\(([^,]*), (.*)\)", klass).group(2) - return { - k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data) - } + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -291,31 +320,20 @@ def __deserialize(self, data, klass): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) - def call_api( - self, - resource_path, - method, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, - response_type=None, - auth_settings=None, - async_req=None, - _return_http_data_only=None, - collection_formats=None, - _preload_content=True, - _request_timeout=None, - ): + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None,_preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async_req parameter. + To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -342,6 +360,10 @@ def call_api( number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -350,123 +372,82 @@ def call_api( then the method will return the response directly. """ if not async_req: - return self.__call_api( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - ) - else: - thread = self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - ), - ) - return thread - - def request( - self, - method, - url, - query_params=None, - headers=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_types_map, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _request_auth) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _request_auth)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.GET( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) elif method == "HEAD": - return self.rest_client.HEAD( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) elif method == "OPTIONS": - return self.rest_client.OPTIONS( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) elif method == "POST": - return self.rest_client.POST( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "PUT": - return self.rest_client.PUT( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "PATCH": - return self.rest_client.PATCH( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "DELETE": - return self.rest_client.DELETE( - url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) else: - raise ValueError( + raise ApiValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." ) @@ -481,53 +462,47 @@ def parameters_to_tuples(self, params, collection_formats): new_params = [] if collection_formats is None: collection_formats = {} - for k, v in ( - six.iteritems(params) if isinstance(params, dict) else params - ): # noqa: E501 + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": + if collection_format == 'multi': new_params.extend((k, value) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(str(value) for value in v))) + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params - def prepare_post_parameters(self, post_params=None, files=None): + def files_parameters(self, files=None): """Builds form parameters. - :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - if post_params: - params = post_params - if files: for k, v in six.iteritems(files): if not v: continue file_names = v if type(v) is list else [v] for n in file_names: - with open(n, "rb") as f: + with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or "application/octet-stream" - ) - params.append(tuple([k, tuple([filename, filedata, mimetype])])) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) return params @@ -542,50 +517,73 @@ def select_header_accept(self, accepts): accepts = [x.lower() for x in accepts] - if "application/json" in accepts: - return "application/json" + if 'application/json' in accepts: + return 'application/json' else: - return ", ".join(accepts) + return ', '.join(accepts) - def select_header_content_type(self, content_types): + def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. + :param method: http method (e.g. POST, PATCH). + :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: - return "application/json" + return 'application/json' content_types = [x.lower() for x in content_types] - if "application/json" in content_types or "*/*" in content_types: - return "application/json" + if (method == 'PATCH' and + 'application/json-patch+json' in content_types and + isinstance(body, list)): + return 'application/json-patch+json' + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' else: return content_types[0] - def update_params_for_auth(self, headers, querys, auth_settings): + def update_params_for_auth(self, headers, queries, auth_settings, + request_auth=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auth: + self._apply_auth_params(headers, queries, request_auth) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting["value"]: - continue - elif auth_setting["in"] == "header": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - querys.append((auth_setting["key"], auth_setting["value"])) - else: - raise ValueError( - "Authentication token must be in `query` or `header`" - ) + self._apply_auth_params(headers, queries, auth_setting) + + def _apply_auth_params(self, headers, queries, auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) def __deserialize_file(self, response): """Deserializes body to file @@ -602,12 +600,11 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - with open(path, "w") as f: + with open(path, "wb") as f: f.write(response.data) return path @@ -628,7 +625,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ @@ -641,17 +638,16 @@ def __deserialize_date(self, string): :return: date. """ try: - from dateutil.parser import parse - return parse(string).date() except ImportError: return string except ValueError: raise rest.ApiException( - status=0, reason="Failed to parse `{0}` as date object".format(string) + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -660,20 +656,18 @@ def __deserialize_datatime(self, string): :return: datetime. """ try: - from dateutil.parser import parse - return parse(string) except ImportError: return string except ValueError: raise rest.ApiException( status=0, - reason=("Failed to parse `{0}` as datetime object".format(string)), + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) ) - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - def __deserialize_model(self, data, klass): """Deserializes list or dict to model. @@ -681,34 +675,26 @@ def __deserialize_model(self, data, klass): :param klass: class literal. :return: model object. """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True - if not klass.swagger_types and not self.__hasattr( - klass, "get_real_child_model" - ): + if not klass.openapi_types and has_discriminator is False: return data kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if ( - data is not None - and klass.attribute_map[attr] in data - and isinstance(data, (list, dict)) - ): + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): + for attr, attr_type in six.iteritems(klass.openapi_types): + if klass.attribute_map[attr] in data: value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) instance = klass(**kwargs) - if ( - isinstance(instance, dict) - and klass.swagger_types is not None - and isinstance(data, dict) - ): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, "get_real_child_model"): + if has_discriminator: klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) diff --git a/src/clients/ctm_api_client/configuration.py b/src/clients/ctm_api_client/configuration.py index dcc8e77..8e45842 100644 --- a/src/clients/ctm_api_client/configuration.py +++ b/src/clients/ctm_api_client/configuration.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -21,87 +21,252 @@ import six from six.moves import http_client as httplib +from clients.ctm_api_client.exceptions import ApiValueError +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + class Configuration(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://github.com/swagger-api/swagger-codegen + Ref: https://openapi-generator.tech Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = clients.ctm_api_client.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ _default = None - def __init__(self): - """Constructor""" - if self._default: - for key in self._default.__dict__.keys(): - self.__dict__[key] = copy.copy(self._default.__dict__[key]) - return - - # Default Base url - self.host = "https://localhost" - # Temp file folder for downloading files + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ + self._base_path = "http://localhost" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ self.temp_folder_path = None - + """Temp file folder for downloading files + """ # Authentication Settings - # dict to store API key(s) self.api_key = {} - # dict to store API prefix (e.g. Bearer) + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ self.api_key_prefix = {} - # function to refresh API key if expired + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - - # Logging Settings + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} - self.logger["package_logger"] = logging.getLogger("ctm_api_client") + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("clients.ctm_api_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = "%(asctime)s %(levelname)s %(message)s" - # Log stream handler + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ self.logger_stream_handler = None - # Log file handler + """Log stream handler + """ self.logger_file_handler = None - # Debug file location + """Log file handler + """ self.logger_file = None - # Debug switch + """Debug file location + """ self.debug = False + """Debug switch + """ - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ self.cert_file = None - # client key file + """client certificate file + """ self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. + """client key file + """ self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ - # Proxy URL self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = "" - - # Disable client side validation + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation self.client_side_validation = True + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s + @classmethod def set_default(cls, default): - cls._default = default + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() @property def logger_file(self): @@ -133,17 +298,6 @@ def logger_file(self, value): self.logger_file_handler.setFormatter(self.logger_formatter) for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) @property def debug(self): @@ -199,17 +353,16 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier): + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. :return: The token for api key authentication. """ - - if self.refresh_api_key_hook: + if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -222,39 +375,112 @@ def get_basic_auth_token(self): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ":" + self.password - ).get("authorization") + basic_auth=username + ':' + password + ).get('authorization') def auth_settings(self): """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - return { - "Bearer": { - "type": "api_key", - "in": "header", - "key": "Authorization", - "value": self.get_api_key_with_prefix("Authorization"), - }, - "ApiKeyAuth": { - "type": "api_key", - "in": "header", - "key": "x-api-key", - "value": self.get_api_key_with_prefix("x-api-key"), - }, - } + auth = {} + if 'ApiKeyAuth' in self.api_key: + auth['ApiKeyAuth'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-api-key', + 'value': self.get_api_key_with_prefix( + 'ApiKeyAuth', + ), + } + if 'Bearer' in self.api_key: + auth['Bearer'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix( + 'Bearer', + ), + } + return auth def to_debug_report(self): """Gets the essential information for debugging. :return: The report for debugging. """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 9.20.215\n" - "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) - ) + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 9.22.30\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/src/clients/ctm_api_client/models/__init__.py b/src/clients/ctm_api_client/models/__init__.py index abb65ff..022baef 100644 --- a/src/clients/ctm_api_client/models/__init__.py +++ b/src/clients/ctm_api_client/models/__init__.py @@ -6,298 +6,246 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import # import models into model package -from clients.ctm_api_client.models.actions_auth_record import ( - ActionsAuthRecord, -) +from clients.ctm_api_client.models.action_fails_behaviour_data import ActionFailsBehaviourData +from clients.ctm_api_client.models.actions_auth_record import ActionsAuthRecord +from clients.ctm_api_client.models.active_sec_attrs import ActiveSecAttrs from clients.ctm_api_client.models.active_services import ActiveServices from clients.ctm_api_client.models.add_agent_params import AddAgentParams -from clients.ctm_api_client.models.add_remote_host_params import ( - AddRemoteHostParams, -) -from clients.ctm_api_client.models.add_remove_success_data import ( - AddRemoveSuccessData, -) +from clients.ctm_api_client.models.add_event_action_data import AddEventActionData +from clients.ctm_api_client.models.add_gateway_params import AddGatewayParams +from clients.ctm_api_client.models.add_on_register_request import AddOnRegisterRequest +from clients.ctm_api_client.models.add_ons import AddOns +from clients.ctm_api_client.models.add_remote_host_params import AddRemoteHostParams +from clients.ctm_api_client.models.add_remove_success_data import AddRemoveSuccessData from clients.ctm_api_client.models.add_server_params import AddServerParams -from clients.ctm_api_client.models.agent_certificate_expiration_data import ( - AgentCertificateExpirationData, -) +from clients.ctm_api_client.models.add_ssh_key_polling_result import AddSshKeyPollingResult +from clients.ctm_api_client.models.additional_attribute import AdditionalAttribute +from clients.ctm_api_client.models.agent_certificate_expiration_data import AgentCertificateExpirationData from clients.ctm_api_client.models.agent_data import AgentData -from clients.ctm_api_client.models.agent_debug_information import ( - AgentDebugInformation, -) +from clients.ctm_api_client.models.agent_debug_information import AgentDebugInformation from clients.ctm_api_client.models.agent_details import AgentDetails from clients.ctm_api_client.models.agent_details_list import AgentDetailsList -from clients.ctm_api_client.models.agent_in_group_params import ( - AgentInGroupParams, -) -from clients.ctm_api_client.models.agent_in_group_params_list import ( - AgentInGroupParamsList, -) +from clients.ctm_api_client.models.agent_in_group_params import AgentInGroupParams +from clients.ctm_api_client.models.agent_in_group_params_list import AgentInGroupParamsList from clients.ctm_api_client.models.agent_in_hostgroup import AgentInHostgroup from clients.ctm_api_client.models.agent_info import AgentInfo from clients.ctm_api_client.models.agent_info_result import AgentInfoResult +from clients.ctm_api_client.models.agent_log_entry import AgentLogEntry from clients.ctm_api_client.models.agent_mng_auth import AgentMngAuth -from clients.ctm_api_client.models.agent_sys_param_set_data import ( - AgentSysParamSetData, -) -from clients.ctm_api_client.models.agent_sys_param_set_success_data import ( - AgentSysParamSetSuccessData, -) +from clients.ctm_api_client.models.agent_sys_param_set_data import AgentSysParamSetData +from clients.ctm_api_client.models.agent_sys_param_set_success_data import AgentSysParamSetSuccessData from clients.ctm_api_client.models.agent_tables_name import AgentTablesName -from clients.ctm_api_client.models.agent_thing_properties import ( - AgentThingProperties, -) -from clients.ctm_api_client.models.agents_data_list import AgentsDataList -from clients.ctm_api_client.models.agents_in_group_list_result import ( - AgentsInGroupListResult, -) -from clients.ctm_api_client.models.agents_in_group_success_data import ( - AgentsInGroupSuccessData, -) -from clients.ctm_api_client.models.agents_sys_param_set_data import ( - AgentsSysParamSetData, -) +from clients.ctm_api_client.models.agent_thing_properties import AgentThingProperties +from clients.ctm_api_client.models.agent_ui_props import AgentUiProps +from clients.ctm_api_client.models.agentless_host_details import AgentlessHostDetails +from clients.ctm_api_client.models.agents_in_group_success_data import AgentsInGroupSuccessData +from clients.ctm_api_client.models.agents_sys_param_set_data import AgentsSysParamSetData from clients.ctm_api_client.models.ai_deploy_response import AiDeployResponse from clients.ctm_api_client.models.ai_error import AiError from clients.ctm_api_client.models.ai_jobtype import AiJobtype from clients.ctm_api_client.models.ai_jobtype_list import AiJobtypeList +from clients.ctm_api_client.models.alert_event_id import AlertEventId from clients.ctm_api_client.models.alert_param import AlertParam from clients.ctm_api_client.models.alert_status_param import AlertStatusParam -from clients.ctm_api_client.models.all_mft_data_settings import ( - AllMFTDataSettings, -) -from clients.ctm_api_client.models.allowed_job_actions import ( - AllowedJobActions, -) +from clients.ctm_api_client.models.alerts_stream_status import AlertsStreamStatus +from clients.ctm_api_client.models.alerts_stream_template import AlertsStreamTemplate +from clients.ctm_api_client.models.all_mft_data_settings import AllMFTDataSettings +from clients.ctm_api_client.models.allowed_job_actions import AllowedJobActions from clients.ctm_api_client.models.allowed_jobs import AllowedJobs from clients.ctm_api_client.models.annotation_details import AnnotationDetails from clients.ctm_api_client.models.api_gtw_session import ApiGtwSession from clients.ctm_api_client.models.api_throwable import ApiThrowable from clients.ctm_api_client.models.app import App -from clients.ctm_api_client.models.app_deploy_response import ( - AppDeployResponse, -) +from clients.ctm_api_client.models.app_deploy_response import AppDeployResponse from clients.ctm_api_client.models.app_deployed import AppDeployed from clients.ctm_api_client.models.app_details import AppDetails from clients.ctm_api_client.models.app_list import AppList -from clients.ctm_api_client.models.app_predeploy_response import ( - AppPredeployResponse, -) +from clients.ctm_api_client.models.app_predeploy_response import AppPredeployResponse from clients.ctm_api_client.models.archive_jobs_list import ArchiveJobsList from clients.ctm_api_client.models.archive_rule import ArchiveRule from clients.ctm_api_client.models.archive_rules_list import ArchiveRulesList from clients.ctm_api_client.models.as2_key_data import As2KeyData from clients.ctm_api_client.models.associate_data import AssociateData -from clients.ctm_api_client.models.authenticate_credentials import ( - AuthenticateCredentials, -) -from clients.ctm_api_client.models.authentication_data import ( - AuthenticationData, -) +from clients.ctm_api_client.models.authenticate_credentials import AuthenticateCredentials +from clients.ctm_api_client.models.authenticate_credentials_additional_attributes import AuthenticateCredentialsAdditionalAttributes +from clients.ctm_api_client.models.authentication_data import AuthenticationData +from clients.ctm_api_client.models.authorize_ssh_data import AuthorizeSSHData from clients.ctm_api_client.models.availability import Availability +from clients.ctm_api_client.models.aysnc_poll_deployment_file_results import AysncPollDeploymentFileResults +from clients.ctm_api_client.models.between_date import BetweenDate +from clients.ctm_api_client.models.between_date_time import BetweenDateTime +from clients.ctm_api_client.models.between_time import BetweenTime +from clients.ctm_api_client.models.between_week_day_time import BetweenWeekDayTime +from clients.ctm_api_client.models.bypass_option_attributes import BypassOptionAttributes from clients.ctm_api_client.models.cp_mng_auth import CPMngAuth +from clients.ctm_api_client.models.ctm_job_executed_counter import CTMJobExecutedCounter from clients.ctm_api_client.models.ctm_name_value_sw import CTMNameValueSW -from clients.ctm_api_client.models.certificate_signing_request_data import ( - CertificateSigningRequestData, -) -from clients.ctm_api_client.models.client_access_privilege_category import ( - ClientAccessPrivilegeCategory, -) +from clients.ctm_api_client.models.certificate_signing_request_data import CertificateSigningRequestData +from clients.ctm_api_client.models.client_access_privilege_category import ClientAccessPrivilegeCategory from clients.ctm_api_client.models.cluster import Cluster -from clients.ctm_api_client.models.cluster_authorization_data import ( - ClusterAuthorizationData, -) -from clients.ctm_api_client.models.communication_analysis_response_type import ( - CommunicationAnalysisResponseType, -) -from clients.ctm_api_client.models.component_key_with_status_type import ( - ComponentKeyWithStatusType, -) -from clients.ctm_api_client.models.component_meta_data_properties import ( - ComponentMetaDataProperties, -) -from clients.ctm_api_client.models.component_mft_key_type import ( - ComponentMftKeyType, -) -from clients.ctm_api_client.models.condition_properties import ( - ConditionProperties, -) -from clients.ctm_api_client.models.configuration_manager_privilege_category import ( - ConfigurationManagerPrivilegeCategory, -) -from clients.ctm_api_client.models.connection_profile_deployment_info import ( - ConnectionProfileDeploymentInfo, -) -from clients.ctm_api_client.models.connection_profile_status import ( - ConnectionProfileStatus, -) -from clients.ctm_api_client.models.connection_profiles_deployment_status_result import ( - ConnectionProfilesDeploymentStatusResult, -) -from clients.ctm_api_client.models.connection_profiles_status_result import ( - ConnectionProfilesStatusResult, -) -from clients.ctm_api_client.models.control_m_authentication_data import ( - ControlMAuthenticationData, -) +from clients.ctm_api_client.models.cluster_authorization_data import ClusterAuthorizationData +from clients.ctm_api_client.models.communication_analysis_response_type import CommunicationAnalysisResponseType +from clients.ctm_api_client.models.component_key_with_status_type import ComponentKeyWithStatusType +from clients.ctm_api_client.models.component_meta_data_properties import ComponentMetaDataProperties +from clients.ctm_api_client.models.component_mft_key_type import ComponentMftKeyType +from clients.ctm_api_client.models.condition_format_part import ConditionFormatPart +from clients.ctm_api_client.models.condition_properties import ConditionProperties +from clients.ctm_api_client.models.configuration_manager_privilege_category import ConfigurationManagerPrivilegeCategory +from clients.ctm_api_client.models.connection_profile_deployment_info import ConnectionProfileDeploymentInfo +from clients.ctm_api_client.models.connection_profile_status import ConnectionProfileStatus +from clients.ctm_api_client.models.connection_profiles_deployment_status_result import ConnectionProfilesDeploymentStatusResult +from clients.ctm_api_client.models.connection_profiles_status_result import ConnectionProfilesStatusResult +from clients.ctm_api_client.models.control_m_authentication_data import ControlMAuthenticationData +from clients.ctm_api_client.models.convert_lcp_to_ccp_results import ConvertLcpToCcpResults +from clients.ctm_api_client.models.ctl_request_params import CtlRequestParams +from clients.ctm_api_client.models.ctl_response import CtlResponse +from clients.ctm_api_client.models.ctm_addon_activation import CtmAddonActivation +from clients.ctm_api_client.models.ctm_advanced_details import CtmAdvancedDetails +from clients.ctm_api_client.models.ctm_ai_job_type_response import CtmAiJobTypeResponse from clients.ctm_api_client.models.ctm_details import CtmDetails -from clients.ctm_api_client.models.ctm_details_list import CtmDetailsList -from clients.ctm_api_client.models.ctmag_set_extract_service_status import ( - CtmagSetExtractServiceStatus, -) -from clients.ctm_api_client.models.ctmagent_basic_info_type import ( - CtmagentBasicInfoType, -) -from clients.ctm_api_client.models.ctmagent_ctm_test_type import ( - CtmagentCtmTestType, -) -from clients.ctm_api_client.models.ctmagent_state_changed_type import ( - CtmagentStateChangedType, -) -from clients.ctm_api_client.models.ctmvar_del_result_item import ( - CtmvarDelResultItem, -) +from clients.ctm_api_client.models.ctm_sec_active_sec_attr_type import CtmSecActiveSecAttrType +from clients.ctm_api_client.models.ctm_sec_entity_sec_attr_type import CtmSecEntitySecAttrType +from clients.ctm_api_client.models.ctm_sec_entity_sec_attrs_type import CtmSecEntitySecAttrsType +from clients.ctm_api_client.models.ctm_sec_group import CtmSecGroup +from clients.ctm_api_client.models.ctm_sec_group_data import CtmSecGroupData +from clients.ctm_api_client.models.ctm_sec_security_attributes import CtmSecSecurityAttributes +from clients.ctm_api_client.models.ctm_sec_security_entities import CtmSecSecurityEntities +from clients.ctm_api_client.models.ctm_sec_table_sec_attr_type import CtmSecTableSecAttrType +from clients.ctm_api_client.models.ctm_sec_user import CtmSecUser +from clients.ctm_api_client.models.ctm_sec_user_data import CtmSecUserData +from clients.ctm_api_client.models.ctm_server_component_status_info import CtmServerComponentStatusInfo +from clients.ctm_api_client.models.ctm_server_definition import CtmServerDefinition +from clients.ctm_api_client.models.ctm_server_details import CtmServerDetails +from clients.ctm_api_client.models.ctm_server_metadata import CtmServerMetadata +from clients.ctm_api_client.models.ctm_server_rename_params import CtmServerRenameParams +from clients.ctm_api_client.models.ctm_server_rename_report import CtmServerRenameReport +from clients.ctm_api_client.models.ctm_server_rename_warning import CtmServerRenameWarning +from clients.ctm_api_client.models.ctm_service import CtmService +from clients.ctm_api_client.models.ctmag_set_extract_service_status import CtmagSetExtractServiceStatus +from clients.ctm_api_client.models.ctmagent_basic_info_type import CtmagentBasicInfoType +from clients.ctm_api_client.models.ctmagent_ctm_test_type import CtmagentCtmTestType +from clients.ctm_api_client.models.ctmagent_state_changed_type import CtmagentStateChangedType +from clients.ctm_api_client.models.ctmudchk_jobs_results import CtmudchkJobsResults +from clients.ctm_api_client.models.ctmudchk_results import CtmudchkResults +from clients.ctm_api_client.models.ctmvar_del_result_item import CtmvarDelResultItem from clients.ctm_api_client.models.ctmvar_del_results import CtmvarDelResults from clients.ctm_api_client.models.ctmvar_error_info import CtmvarErrorInfo -from clients.ctm_api_client.models.ctmvar_get_result_item import ( - CtmvarGetResultItem, -) +from clients.ctm_api_client.models.ctmvar_get_result_item import CtmvarGetResultItem from clients.ctm_api_client.models.ctmvar_get_results import CtmvarGetResults from clients.ctm_api_client.models.ctmvar_result_item import CtmvarResultItem from clients.ctm_api_client.models.ctmvar_results import CtmvarResults -from clients.ctm_api_client.models.ctmvar_set_result_item import ( - CtmvarSetResultItem, -) +from clients.ctm_api_client.models.ctmvar_set_result_item import CtmvarSetResultItem from clients.ctm_api_client.models.ctmvar_set_results import CtmvarSetResults -from clients.ctm_api_client.models.deploy_jobtype_response import ( - DeployJobtypeResponse, -) -from clients.ctm_api_client.models.deployment_file_error import ( - DeploymentFileError, -) -from clients.ctm_api_client.models.deployment_file_results import ( - DeploymentFileResults, -) -from clients.ctm_api_client.models.diagnostics_data_collection_information import ( - DiagnosticsDataCollectionInformation, -) -from clients.ctm_api_client.models.diagnostics_data_collection_result import ( - DiagnosticsDataCollectionResult, -) -from clients.ctm_api_client.models.em_basic_active_request_parameters import ( - EMBasicActiveRequestParameters, -) -from clients.ctm_api_client.models.em_default_request_parameters import ( - EMDefaultRequestParameters, -) -from clients.ctm_api_client.models.em_system_parameter import ( - EMSystemParameter, -) +from clients.ctm_api_client.models.data_assurance_configration_data import DataAssuranceConfigrationData +from clients.ctm_api_client.models.data_assurance_gateway_data import DataAssuranceGatewayData +from clients.ctm_api_client.models.data_assurance_register_properties import DataAssuranceRegisterProperties +from clients.ctm_api_client.models.database_def import DatabaseDef +from clients.ctm_api_client.models.database_status_data import DatabaseStatusData +from clients.ctm_api_client.models.deploy_async_results import DeployAsyncResults +from clients.ctm_api_client.models.deploy_jobtype_response import DeployJobtypeResponse +from clients.ctm_api_client.models.deployment_file_error import DeploymentFileError +from clients.ctm_api_client.models.deployment_file_results import DeploymentFileResults +from clients.ctm_api_client.models.device_space import DeviceSpace +from clients.ctm_api_client.models.diagnostics_data_collection_information import DiagnosticsDataCollectionInformation +from clients.ctm_api_client.models.diagnostics_data_collection_result import DiagnosticsDataCollectionResult +from clients.ctm_api_client.models.discover_response import DiscoverResponse +from clients.ctm_api_client.models.em_basic_active_request_parameters import EMBasicActiveRequestParameters +from clients.ctm_api_client.models.em_default_request_parameters import EMDefaultRequestParameters +from clients.ctm_api_client.models.em_params import EMParams +from clients.ctm_api_client.models.em_server_summary import EMServerSummary +from clients.ctm_api_client.models.em_system_parameter import EMSystemParameter +from clients.ctm_api_client.models.em_component_def import EmComponentDef +from clients.ctm_api_client.models.em_component_desired_state import EmComponentDesiredState from clients.ctm_api_client.models.em_jobs_id import EmJobsId from clients.ctm_api_client.models.em_order_folder import EmOrderFolder -from clients.ctm_api_client.models.em_order_folder_parameters import ( - EmOrderFolderParameters, -) -from clients.ctm_api_client.models.encryption_metadata import ( - EncryptionMetadata, -) +from clients.ctm_api_client.models.em_order_folder_parameters import EmOrderFolderParameters +from clients.ctm_api_client.models.em_system_param import EmSystemParam +from clients.ctm_api_client.models.email_notification_action_data import EmailNotificationActionData +from clients.ctm_api_client.models.emdef_task_result import EmdefTaskResult +from clients.ctm_api_client.models.emdef_task_status import EmdefTaskStatus +from clients.ctm_api_client.models.encryption_metadata import EncryptionMetadata +from clients.ctm_api_client.models.environment_configuration import EnvironmentConfiguration from clients.ctm_api_client.models.error_data import ErrorData from clients.ctm_api_client.models.error_list import ErrorList from clients.ctm_api_client.models.event import Event from clients.ctm_api_client.models.event_param import EventParam -from clients.ctm_api_client.models.event_set import EventSet -from clients.ctm_api_client.models.external_provider_authentication_data import ( - ExternalProviderAuthenticationData, -) +from clients.ctm_api_client.models.exception_alert_data import ExceptionAlertData +from clients.ctm_api_client.models.exception_alert_user_note import ExceptionAlertUserNote +from clients.ctm_api_client.models.exception_alerts_data_list import ExceptionAlertsDataList +from clients.ctm_api_client.models.external_provider_authentication_data import ExternalProviderAuthenticationData from clients.ctm_api_client.models.external_user_data import ExternalUserData -from clients.ctm_api_client.models.extract_service_prop_params import ( - ExtractServicePropParams, -) -from clients.ctm_api_client.models.field_metadata_properties import ( - FieldMetadataProperties, -) +from clients.ctm_api_client.models.extract_service_prop_params import ExtractServicePropParams +from clients.ctm_api_client.models.field_metadata_properties import FieldMetadataProperties from clients.ctm_api_client.models.field_value import FieldValue from clients.ctm_api_client.models.field_values import FieldValues +from clients.ctm_api_client.models.file_name_pattern_condition_data import FileNamePatternConditionData +from clients.ctm_api_client.models.file_operation_action_data import FileOperationActionData +from clients.ctm_api_client.models.file_size_condition_data import FileSizeConditionData +from clients.ctm_api_client.models.fixed_sub_folder import FixedSubFolder from clients.ctm_api_client.models.folder_auth import FolderAuth +from clients.ctm_api_client.models.folder_forecast_timeline_result import FolderForecastTimelineResult from clients.ctm_api_client.models.folder_properties import FolderProperties -from clients.ctm_api_client.models.folder_properties_data import ( - FolderPropertiesData, -) -from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties import ( - FoldersUsersSettingsAndMetadataProperties, -) -from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties_from_b2_b import ( - FoldersUsersSettingsAndMetadataPropertiesFromB2B, -) -from clients.ctm_api_client.models.fts_authentication_details import ( - FtsAuthenticationDetails, -) +from clients.ctm_api_client.models.folder_properties_data import FolderPropertiesData +from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties import FoldersUsersSettingsAndMetadataProperties +from clients.ctm_api_client.models.folders_users_settings_and_metadata_properties_from_b2_b import FoldersUsersSettingsAndMetadataPropertiesFromB2B +from clients.ctm_api_client.models.forecast_timeline_results import ForecastTimelineResults +from clients.ctm_api_client.models.forecast_timeline_when_result import ForecastTimelineWhenResult +from clients.ctm_api_client.models.forecast_timeline_year_result import ForecastTimelineYearResult +from clients.ctm_api_client.models.fts_authentication_details import FtsAuthenticationDetails from clients.ctm_api_client.models.fts_ftp_settings import FtsFtpSettings -from clients.ctm_api_client.models.fts_general_settings import ( - FtsGeneralSettings, -) -from clients.ctm_api_client.models.fts_ldap_authentication_details import ( - FtsLdapAuthenticationDetails, -) -from clients.ctm_api_client.models.fts_pam_authentication_details import ( - FtsPamAuthenticationDetails, -) +from clients.ctm_api_client.models.fts_general_settings import FtsGeneralSettings +from clients.ctm_api_client.models.fts_ldap_authentication_details import FtsLdapAuthenticationDetails +from clients.ctm_api_client.models.fts_pam_authentication_details import FtsPamAuthenticationDetails from clients.ctm_api_client.models.fts_settings_data import FtsSettingsData from clients.ctm_api_client.models.fts_sftp_settings import FtsSftpSettings -from clients.ctm_api_client.models.fts_user_home_directory_data import ( - FtsUserHomeDirectoryData, -) +from clients.ctm_api_client.models.fts_user_home_directory_data import FtsUserHomeDirectoryData from clients.ctm_api_client.models.gateway_data import GatewayData +from clients.ctm_api_client.models.gateway_details import GatewayDetails from clients.ctm_api_client.models.get_alert_info import GetAlertInfo -from clients.ctm_api_client.models.get_manifest_params import ( - GetManifestParams, -) -from clients.ctm_api_client.models.get_manifest_params_result import ( - GetManifestParamsResult, -) -from clients.ctm_api_client.models.groups_allowed_folders_properties import ( - GroupsAllowedFoldersProperties, -) +from clients.ctm_api_client.models.get_manifest_params import GetManifestParams +from clients.ctm_api_client.models.groups_allowed_folders_properties import GroupsAllowedFoldersProperties +from clients.ctm_api_client.models.heart_beat_response import HeartBeatResponse +from clients.ctm_api_client.models.high_availability_progress_information import HighAvailabilityProgressInformation +from clients.ctm_api_client.models.high_availability_status import HighAvailabilityStatus +from clients.ctm_api_client.models.high_availability_step_data import HighAvailabilityStepData from clients.ctm_api_client.models.host_group_data import HostGroupData -from clients.ctm_api_client.models.host_groups_data_list import ( - HostGroupsDataList, -) from clients.ctm_api_client.models.host_properties import HostProperties -from clients.ctm_api_client.models.hostgroup_agent_participation import ( - HostgroupAgentParticipation, -) -from clients.ctm_api_client.models.hostgroup_properties import ( - HostgroupProperties, -) +from clients.ctm_api_client.models.host_restriction import HostRestriction +from clients.ctm_api_client.models.hostgroup_agent_participation import HostgroupAgentParticipation +from clients.ctm_api_client.models.hostgroup_properties import HostgroupProperties from clients.ctm_api_client.models.hostname_port_pair import HostnamePortPair from clients.ctm_api_client.models.hub_data import HubData from clients.ctm_api_client.models.hub_status import HubStatus +from clients.ctm_api_client.models.index_time import IndexTime +from clients.ctm_api_client.models.input_stream_resource import InputStreamResource +from clients.ctm_api_client.models.item_info import ItemInfo +from clients.ctm_api_client.models.item_info_list import ItemInfoList from clients.ctm_api_client.models.job import Job +from clients.ctm_api_client.models.job_forecast_timeline_result import JobForecastTimelineResult from clients.ctm_api_client.models.job_level_auth import JobLevelAuth +from clients.ctm_api_client.models.job_order_info import JobOrderInfo +from clients.ctm_api_client.models.job_related_services_data import JobRelatedServicesData from clients.ctm_api_client.models.job_run_status import JobRunStatus +from clients.ctm_api_client.models.job_scheduling_plan import JobSchedulingPlan from clients.ctm_api_client.models.job_status_result import JobStatusResult +from clients.ctm_api_client.models.job_view import JobView from clients.ctm_api_client.models.jobtype_agent import JobtypeAgent from clients.ctm_api_client.models.key_value import KeyValue -from clients.ctm_api_client.models.key_value_list_result import ( - KeyValueListResult, -) +from clients.ctm_api_client.models.key_value_list import KeyValueList +from clients.ctm_api_client.models.key_value_object import KeyValueObject +from clients.ctm_api_client.models.key_value_pair import KeyValuePair from clients.ctm_api_client.models.key_value_type import KeyValueType -from clients.ctm_api_client.models.key_value_type_list_result import ( - KeyValueTypeListResult, -) from clients.ctm_api_client.models.known_hosts import KnownHosts -from clients.ctm_api_client.models.ldap_domain_settings import ( - LdapDomainSettings, -) +from clients.ctm_api_client.models.ldap_domain_settings import LdapDomainSettings from clients.ctm_api_client.models.log import Log from clients.ctm_api_client.models.log_data_arguments import LogDataArguments from clients.ctm_api_client.models.log_job_parameters import LogJobParameters @@ -306,292 +254,241 @@ from clients.ctm_api_client.models.log_params import LogParams from clients.ctm_api_client.models.login_credentials import LoginCredentials from clients.ctm_api_client.models.login_result import LoginResult -from clients.ctm_api_client.models.mft_entities_list_names import ( - MFTEntitiesListNames, -) -from clients.ctm_api_client.models.mft_external_user_projection_data import ( - MFTExternalUserProjectionData, -) -from clients.ctm_api_client.models.mft_folder_projection_data import ( - MFTFolderProjectionData, -) -from clients.ctm_api_client.models.mft_folder_projection_properties import ( - MFTFolderProjectionProperties, -) -from clients.ctm_api_client.models.mft_user_group_projection_data import ( - MFTUserGroupProjectionData, -) -from clients.ctm_api_client.models.manifest_group_item_object import ( - ManifestGroupItemObject, -) -from clients.ctm_api_client.models.manifest_group_object import ( - ManifestGroupObject, -) -from clients.ctm_api_client.models.matching import Matching -from clients.ctm_api_client.models.mft_configuration_data import ( - MftConfigurationData, -) -from clients.ctm_api_client.models.monitoring_privilege_category import ( - MonitoringPrivilegeCategory, -) +from clients.ctm_api_client.models.mft_entities_list_names import MFTEntitiesListNames +from clients.ctm_api_client.models.mft_external_user_projection_data import MFTExternalUserProjectionData +from clients.ctm_api_client.models.mft_folder_projection_data import MFTFolderProjectionData +from clients.ctm_api_client.models.mft_folder_projection_properties import MFTFolderProjectionProperties +from clients.ctm_api_client.models.mft_user_group_projection_data import MFTUserGroupProjectionData +from clients.ctm_api_client.models.manifest_group_item_object import ManifestGroupItemObject +from clients.ctm_api_client.models.manifest_group_object import ManifestGroupObject +from clients.ctm_api_client.models.mft_configuration_data import MftConfigurationData +from clients.ctm_api_client.models.mfte_db_config import MfteDbConfig +from clients.ctm_api_client.models.monitoring_privilege_category import MonitoringPrivilegeCategory +from clients.ctm_api_client.models.month import Month from clients.ctm_api_client.models.msg_data_arguments import MsgDataArguments -from clients.ctm_api_client.models.name_value_attribute import ( - NameValueAttribute, -) +from clients.ctm_api_client.models.name_code_pair import NameCodePair +from clients.ctm_api_client.models.name_status import NameStatus +from clients.ctm_api_client.models.name_value_attribute import NameValueAttribute from clients.ctm_api_client.models.new_sample import NewSample from clients.ctm_api_client.models.node import Node from clients.ctm_api_client.models.optional_value import OptionalValue -from clients.ctm_api_client.models.order_folder_parameters import ( - OrderFolderParameters, -) -from clients.ctm_api_client.models.order_folder_result_item import ( - OrderFolderResultItem, -) -from clients.ctm_api_client.models.order_folder_results import ( - OrderFolderResults, -) +from clients.ctm_api_client.models.order_folder_parameters import OrderFolderParameters +from clients.ctm_api_client.models.order_folder_result_item import OrderFolderResultItem +from clients.ctm_api_client.models.order_folder_results import OrderFolderResults +from clients.ctm_api_client.models.order_info import OrderInfo from clients.ctm_api_client.models.order_parameters import OrderParameters from clients.ctm_api_client.models.ordered_item_item import OrderedItemItem +from clients.ctm_api_client.models.organization_group_export_data import OrganizationGroupExportData +from clients.ctm_api_client.models.organization_group_info import OrganizationGroupInfo +from clients.ctm_api_client.models.organization_group_name import OrganizationGroupName +from clients.ctm_api_client.models.organization_group_user_authorization_simulation_data import OrganizationGroupUserAuthorizationSimulationData from clients.ctm_api_client.models.output import Output from clients.ctm_api_client.models.output_params import OutputParams +from clients.ctm_api_client.models.participation_date import ParticipationDate +from clients.ctm_api_client.models.participation_date_time import ParticipationDateTime +from clients.ctm_api_client.models.participation_event import ParticipationEvent +from clients.ctm_api_client.models.participation_rule import ParticipationRule +from clients.ctm_api_client.models.participation_time import ParticipationTime from clients.ctm_api_client.models.passwords_object import PasswordsObject from clients.ctm_api_client.models.performance import Performance +from clients.ctm_api_client.models.pg_attributes import PgAttributes from clients.ctm_api_client.models.pgp_template_data import PgpTemplateData from clients.ctm_api_client.models.ping_agent_params import PingAgentParams -from clients.ctm_api_client.models.planning_privilege_category import ( - PlanningPrivilegeCategory, -) +from clients.ctm_api_client.models.planning_privilege_category import PlanningPrivilegeCategory from clients.ctm_api_client.models.plugin_data import PluginData from clients.ctm_api_client.models.plugin_mng_auth import PluginMngAuth -from clients.ctm_api_client.models.pool_variables_error_info import ( - PoolVariablesErrorInfo, -) -from clients.ctm_api_client.models.pool_variables_name import ( - PoolVariablesName, -) -from clients.ctm_api_client.models.pool_variables_name_value import ( - PoolVariablesNameValue, -) -from clients.ctm_api_client.models.possible_value_properties import ( - PossibleValueProperties, -) +from clients.ctm_api_client.models.poll_forecast_timeline_results import PollForecastTimelineResults +from clients.ctm_api_client.models.poll_id import PollID +from clients.ctm_api_client.models.pool_variables_error_info import PoolVariablesErrorInfo +from clients.ctm_api_client.models.pool_variables_name import PoolVariablesName +from clients.ctm_api_client.models.pool_variables_name_value import PoolVariablesNameValue +from clients.ctm_api_client.models.possible_value_properties import PossibleValueProperties +from clients.ctm_api_client.models.postgres_def import PostgresDef +from clients.ctm_api_client.models.privilege_controlm import PrivilegeControlm from clients.ctm_api_client.models.privilege_name import PrivilegeName -from clients.ctm_api_client.models.privilege_name_controlm import ( - PrivilegeNameControlm, -) +from clients.ctm_api_client.models.privilege_name_controlm import PrivilegeNameControlm from clients.ctm_api_client.models.privileges import Privileges -from clients.ctm_api_client.models.product_description import ( - ProductDescription, -) +from clients.ctm_api_client.models.product_description import ProductDescription from clients.ctm_api_client.models.product_sections import ProductSections -from clients.ctm_api_client.models.provision_advance_parameters import ( - ProvisionAdvanceParameters, -) +from clients.ctm_api_client.models.provision_advance_parameters import ProvisionAdvanceParameters +from clients.ctm_api_client.models.provision_repo import ProvisionRepo +from clients.ctm_api_client.models.provision_repos_results import ProvisionReposResults from clients.ctm_api_client.models.query import Query from clients.ctm_api_client.models.raw_cms_xml_request import RawCmsXmlRequest from clients.ctm_api_client.models.read_only_status import ReadOnlyStatus -from clients.ctm_api_client.models.report_date_time_settings import ( - ReportDateTimeSettings, -) +from clients.ctm_api_client.models.report_date_time_settings import ReportDateTimeSettings from clients.ctm_api_client.models.report_filter import ReportFilter -from clients.ctm_api_client.models.report_filters import ReportFilters from clients.ctm_api_client.models.report_result import ReportResult -from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_log_job_parameters import ( - RequestParametersWrapperEMDefaultRequestParametersLogJobParameters, -) -from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_why_job_parameter import ( - RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter, -) +from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_log_job_parameters import RequestParametersWrapperEMDefaultRequestParametersLogJobParameters +from clients.ctm_api_client.models.request_parameters_wrapper_em_default_request_parameters_why_job_parameter import RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter from clients.ctm_api_client.models.rerun_parameters import RerunParameters -from clients.ctm_api_client.models.rerun_zos_parameters import ( - RerunZosParameters, -) +from clients.ctm_api_client.models.rerun_zos_parameters import RerunZosParameters from clients.ctm_api_client.models.resource_max import ResourceMax from clients.ctm_api_client.models.resource_obj import ResourceObj from clients.ctm_api_client.models.resource_param import ResourceParam -from clients.ctm_api_client.models.resource_set import ResourceSet from clients.ctm_api_client.models.restart_step import RestartStep from clients.ctm_api_client.models.results_status import ResultsStatus from clients.ctm_api_client.models.role_data import RoleData from clients.ctm_api_client.models.role_data_full import RoleDataFull from clients.ctm_api_client.models.role_header import RoleHeader -from clients.ctm_api_client.models.role_header_list import RoleHeaderList from clients.ctm_api_client.models.role_properties import RoleProperties +from clients.ctm_api_client.models.rplan_result_item import RplanResultItem +from clients.ctm_api_client.models.rplan_results import RplanResults +from clients.ctm_api_client.models.rule_action_data import RuleActionData +from clients.ctm_api_client.models.rule_conditions import RuleConditions from clients.ctm_api_client.models.rule_criteria import RuleCriteria from clients.ctm_api_client.models.rule_projection import RuleProjection +from clients.ctm_api_client.models.rule_projection_data import RuleProjectionData +from clients.ctm_api_client.models.rule_properties_data import RulePropertiesData from clients.ctm_api_client.models.rule_statistics import RuleStatistics -from clients.ctm_api_client.models.rules_statistic_list import ( - RulesStatisticList, -) -from clients.ctm_api_client.models.rules_statistic_list_summary import ( - RulesStatisticListSummary, -) +from clients.ctm_api_client.models.rule_variable import RuleVariable +from clients.ctm_api_client.models.rules_statistic_list import RulesStatisticList +from clients.ctm_api_client.models.rules_statistic_list_summary import RulesStatisticListSummary +from clients.ctm_api_client.models.run_as_available_server import RunAsAvailableServer from clients.ctm_api_client.models.run_as_user_data import RunAsUserData -from clients.ctm_api_client.models.run_as_user_details_data import ( - RunAsUserDetailsData, -) -from clients.ctm_api_client.models.run_as_user_key_data import ( - RunAsUserKeyData, -) -from clients.ctm_api_client.models.run_as_users_list import RunAsUsersList +from clients.ctm_api_client.models.run_as_user_details_data import RunAsUserDetailsData +from clients.ctm_api_client.models.run_as_user_key_data import RunAsUserKeyData +from clients.ctm_api_client.models.run_command_action_data import RunCommandActionData +from clients.ctm_api_client.models.run_folder_job_action_data import RunFolderJobActionData from clients.ctm_api_client.models.run_report import RunReport from clients.ctm_api_client.models.run_report_info import RunReportInfo from clients.ctm_api_client.models.run_result import RunResult -from clients.ctm_api_client.models.runas_definition_auth import ( - RunasDefinitionAuth, -) +from clients.ctm_api_client.models.runas_definition_auth import RunasDefinitionAuth from clients.ctm_api_client.models.runas_user_auth import RunasUserAuth from clients.ctm_api_client.models.sla_service import SLAService -from clients.ctm_api_client.models.sla_service_status_by_jobs import ( - SLAServiceStatusByJobs, -) -from clients.ctm_api_client.models.saml2_identity_provider import ( - Saml2IdentityProvider, -) +from clients.ctm_api_client.models.sla_service_status_by_jobs import SLAServiceStatusByJobs +from clients.ctm_api_client.models.ssh_key import SSHKey +from clients.ctm_api_client.models.ssh_key_data import SSHKeyData +from clients.ctm_api_client.models.ssh_key_secret_data import SSHKeySecretData +from clients.ctm_api_client.models.ssh_public_key import SShPublicKey +from clients.ctm_api_client.models.saml2_identity_provider import Saml2IdentityProvider from clients.ctm_api_client.models.saml_status import SamlStatus from clients.ctm_api_client.models.sample import Sample +from clients.ctm_api_client.models.scheduling_plan_response import SchedulingPlanResponse from clients.ctm_api_client.models.search_params import SearchParams from clients.ctm_api_client.models.search_tag_tuple import SearchTagTuple +from clients.ctm_api_client.models.secret_descriptors import SecretDescriptors from clients.ctm_api_client.models.secret_key_value import SecretKeyValue from clients.ctm_api_client.models.secret_value import SecretValue -from clients.ctm_api_client.models.section_metadata_properties import ( - SectionMetadataProperties, -) +from clients.ctm_api_client.models.section_metadata_properties import SectionMetadataProperties +from clients.ctm_api_client.models.server_definition_params import ServerDefinitionParams +from clients.ctm_api_client.models.server_edit_params import ServerEditParams +from clients.ctm_api_client.models.server_supported_features_result import ServerSupportedFeaturesResult from clients.ctm_api_client.models.service_auth import ServiceAuth -from clients.ctm_api_client.models.service_auth_action import ( - ServiceAuthAction, -) -from clients.ctm_api_client.models.service_provider_information import ( - ServiceProviderInformation, -) +from clients.ctm_api_client.models.service_auth_action import ServiceAuthAction +from clients.ctm_api_client.models.service_data import ServiceData +from clients.ctm_api_client.models.service_provider_information import ServiceProviderInformation from clients.ctm_api_client.models.set_agent_params import SetAgentParams -from clients.ctm_api_client.models.set_agent_params_list import ( - SetAgentParamsList, -) -from clients.ctm_api_client.models.setting_key_properties import ( - SettingKeyProperties, -) +from clients.ctm_api_client.models.set_agent_params_list import SetAgentParamsList +from clients.ctm_api_client.models.setting_key_properties import SettingKeyProperties from clients.ctm_api_client.models.setting_properties import SettingProperties -from clients.ctm_api_client.models.setting_properties_object import ( - SettingPropertiesObject, -) -from clients.ctm_api_client.models.settings_metadata_properties import ( - SettingsMetadataProperties, -) -from clients.ctm_api_client.models.settings_update_object import ( - SettingsUpdateObject, -) +from clients.ctm_api_client.models.setting_properties_object import SettingPropertiesObject +from clients.ctm_api_client.models.settings_metadata_properties import SettingsMetadataProperties +from clients.ctm_api_client.models.settings_update_object import SettingsUpdateObject +from clients.ctm_api_client.models.shared_access import SharedAccess +from clients.ctm_api_client.models.shout_destination import ShoutDestination +from clients.ctm_api_client.models.shout_destination_address_list import ShoutDestinationAddressList +from clients.ctm_api_client.models.shout_destination_list import ShoutDestinationList +from clients.ctm_api_client.models.shout_destination_value import ShoutDestinationValue +from clients.ctm_api_client.models.shout_destinations_list_response import ShoutDestinationsListResponse +from clients.ctm_api_client.models.site_standard import SiteStandard +from clients.ctm_api_client.models.site_standard_business_parameter import SiteStandardBusinessParameter +from clients.ctm_api_client.models.site_standard_change_details import SiteStandardChangeDetails +from clients.ctm_api_client.models.site_standard_condition import SiteStandardCondition +from clients.ctm_api_client.models.site_standard_data import SiteStandardData +from clients.ctm_api_client.models.site_standard_details import SiteStandardDetails +from clients.ctm_api_client.models.site_standard_details_list import SiteStandardDetailsList +from clients.ctm_api_client.models.site_standard_field_rule import SiteStandardFieldRule +from clients.ctm_api_client.models.site_standard_internal_rule import SiteStandardInternalRule +from clients.ctm_api_client.models.site_standard_operator_value_options import SiteStandardOperatorValueOptions +from clients.ctm_api_client.models.site_standard_pattern_part import SiteStandardPatternPart +from clients.ctm_api_client.models.site_standard_policies_file_results import SiteStandardPoliciesFileResults +from clients.ctm_api_client.models.site_standard_policy_details import SiteStandardPolicyDetails +from clients.ctm_api_client.models.site_standard_policy_details_list import SiteStandardPolicyDetailsList +from clients.ctm_api_client.models.site_standard_possible_options import SiteStandardPossibleOptions +from clients.ctm_api_client.models.site_standard_possible_pattern import SiteStandardPossiblePattern +from clients.ctm_api_client.models.site_standard_possible_value import SiteStandardPossibleValue +from clients.ctm_api_client.models.site_standard_restriction import SiteStandardRestriction +from clients.ctm_api_client.models.site_standards_list import SiteStandardsList +from clients.ctm_api_client.models.sites_extended_data import SitesExtendedData from clients.ctm_api_client.models.ssh_key_properties import SshKeyProperties from clients.ctm_api_client.models.statistics import Statistics -from clients.ctm_api_client.models.statistics_average_info import ( - StatisticsAverageInfo, -) +from clients.ctm_api_client.models.statistics_average_info import StatisticsAverageInfo from clients.ctm_api_client.models.statistics_period import StatisticsPeriod -from clients.ctm_api_client.models.statistics_run_info import ( - StatisticsRunInfo, -) -from clients.ctm_api_client.models.statistics_single_run import ( - StatisticsSingleRun, -) -from clients.ctm_api_client.models.string_list_result import StringListResult +from clients.ctm_api_client.models.statistics_run_info import StatisticsRunInfo +from clients.ctm_api_client.models.statistics_single_run import StatisticsSingleRun +from clients.ctm_api_client.models.string_list import StringList from clients.ctm_api_client.models.success_data import SuccessData from clients.ctm_api_client.models.summary import Summary +from clients.ctm_api_client.models.support_feature_param import SupportFeatureParam +from clients.ctm_api_client.models.supported_shout_destinations import SupportedShoutDestinations +from clients.ctm_api_client.models.supported_shout_destinations_response import SupportedShoutDestinationsResponse +from clients.ctm_api_client.models.sys_admin_info import SysAdminInfo from clients.ctm_api_client.models.system_parameter import SystemParameter +from clients.ctm_api_client.models.system_parameters_list import SystemParametersList from clients.ctm_api_client.models.system_setting import SystemSetting -from clients.ctm_api_client.models.system_setting_annotation_property import ( - SystemSettingAnnotationProperty, -) -from clients.ctm_api_client.models.system_setting_key_value import ( - SystemSettingKeyValue, -) -from clients.ctm_api_client.models.system_setting_key_value_component import ( - SystemSettingKeyValueComponent, -) -from clients.ctm_api_client.models.system_setting_ldap import ( - SystemSettingLdap, -) -from clients.ctm_api_client.models.system_setting_property import ( - SystemSettingProperty, -) -from clients.ctm_api_client.models.term_group import TermGroup +from clients.ctm_api_client.models.system_setting_key_value import SystemSettingKeyValue +from clients.ctm_api_client.models.system_setting_key_value_component import SystemSettingKeyValueComponent +from clients.ctm_api_client.models.system_setting_ldap import SystemSettingLdap +from clients.ctm_api_client.models.system_setting_property import SystemSettingProperty +from clients.ctm_api_client.models.table_sec_attrs import TableSecAttrs +from clients.ctm_api_client.models.token_by_value_request import TokenByValueRequest from clients.ctm_api_client.models.token_data_request import TokenDataRequest -from clients.ctm_api_client.models.token_data_response import ( - TokenDataResponse, -) +from clients.ctm_api_client.models.token_data_response import TokenDataResponse from clients.ctm_api_client.models.token_list import TokenList -from clients.ctm_api_client.models.token_list_array import TokenListArray -from clients.ctm_api_client.models.tools_privilege_category import ( - ToolsPrivilegeCategory, -) +from clients.ctm_api_client.models.tools_privilege_category import ToolsPrivilegeCategory from clients.ctm_api_client.models.topology import Topology +from clients.ctm_api_client.models.trial_information import TrialInformation +from clients.ctm_api_client.models.ui_props import UiProps +from clients.ctm_api_client.models.un_ordered_jobs_list import UnOrderedJobsList +from clients.ctm_api_client.models.update_gateway_params import UpdateGatewayParams from clients.ctm_api_client.models.upgrade_agent_info import UpgradeAgentInfo -from clients.ctm_api_client.models.upgrade_agent_info_list import ( - UpgradeAgentInfoList, -) from clients.ctm_api_client.models.upgrade_info import UpgradeInfo -from clients.ctm_api_client.models.upgrade_notification import ( - UpgradeNotification, -) +from clients.ctm_api_client.models.upgrade_notification import UpgradeNotification from clients.ctm_api_client.models.upgrade_record import UpgradeRecord -from clients.ctm_api_client.models.upgrade_record_list import ( - UpgradeRecordList, -) +from clients.ctm_api_client.models.upgrade_record_list import UpgradeRecordList from clients.ctm_api_client.models.upgrade_request import UpgradeRequest from clients.ctm_api_client.models.upgrade_response import UpgradeResponse -from clients.ctm_api_client.models.user_additional_properties import ( - UserAdditionalProperties, -) -from clients.ctm_api_client.models.user_allowed_folders_properties import ( - UserAllowedFoldersProperties, -) +from clients.ctm_api_client.models.usage_per_ctm_result import UsagePerCtmResult +from clients.ctm_api_client.models.user_additional_properties import UserAdditionalProperties +from clients.ctm_api_client.models.user_allowed_folders_properties import UserAllowedFoldersProperties +from clients.ctm_api_client.models.user_condition_data import UserConditionData from clients.ctm_api_client.models.user_data import UserData -from clients.ctm_api_client.models.user_group_details_data import ( - UserGroupDetailsData, -) -from clients.ctm_api_client.models.user_group_properties_data import ( - UserGroupPropertiesData, -) +from clients.ctm_api_client.models.user_group_details_data import UserGroupDetailsData +from clients.ctm_api_client.models.user_group_properties_data import UserGroupPropertiesData from clients.ctm_api_client.models.user_header import UserHeader +from clients.ctm_api_client.models.user_or_group_extended import UserOrGroupExtended from clients.ctm_api_client.models.user_password import UserPassword from clients.ctm_api_client.models.user_preferences import UserPreferences -from clients.ctm_api_client.models.validation_properties import ( - ValidationProperties, -) +from clients.ctm_api_client.models.users_companies import UsersCompanies +from clients.ctm_api_client.models.validation_properties import ValidationProperties from clients.ctm_api_client.models.value import Value -from clients.ctm_api_client.models.values import Values -from clients.ctm_api_client.models.variable_name_value import ( - VariableNameValue, -) +from clients.ctm_api_client.models.value_list_item import ValueListItem +from clients.ctm_api_client.models.variable_name_value import VariableNameValue from clients.ctm_api_client.models.variable_names import VariableNames from clients.ctm_api_client.models.variables import Variables -from clients.ctm_api_client.models.viewpoint_manager_privilege_category import ( - ViewpointManagerPrivilegeCategory, -) +from clients.ctm_api_client.models.vault_param import VaultParam +from clients.ctm_api_client.models.viewpoint_manager_privilege_category import ViewpointManagerPrivilegeCategory +from clients.ctm_api_client.models.virtual_folder_condition_data import VirtualFolderConditionData +from clients.ctm_api_client.models.wda_agents_data_list import WDAAgentsDataList +from clients.ctm_api_client.models.wda_dataset_input import WDADatasetInput +from clients.ctm_api_client.models.wda_datasets_and_schemas import WDADatasetsAndSchemas from clients.ctm_api_client.models.warning_data import WarningData from clients.ctm_api_client.models.warning_list import WarningList -from clients.ctm_api_client.models.warnings_collection import ( - WarningsCollection, -) +from clients.ctm_api_client.models.warnings_collection import WarningsCollection from clients.ctm_api_client.models.why_job_parameters import WhyJobParameters from clients.ctm_api_client.models.why_job_result_item import WhyJobResultItem from clients.ctm_api_client.models.why_job_results import WhyJobResults -from clients.ctm_api_client.models.workflow_insights_status import ( - WorkflowInsightsStatus, -) -from clients.ctm_api_client.models.workload_policies_file_results import ( - WorkloadPoliciesFileResults, -) +from clients.ctm_api_client.models.workbench_import_result import WorkbenchImportResult +from clients.ctm_api_client.models.workflow_insights_data_export_status import WorkflowInsightsDataExportStatus +from clients.ctm_api_client.models.workflow_insights_status import WorkflowInsightsStatus +from clients.ctm_api_client.models.workload_policies_file_results import WorkloadPoliciesFileResults from clients.ctm_api_client.models.workload_policy import WorkloadPolicy -from clients.ctm_api_client.models.workload_policy_list import ( - WorkloadPolicyList, -) -from clients.ctm_api_client.models.workload_policy_state import ( - WorkloadPolicyState, -) -from clients.ctm_api_client.models.workload_policy_state_list import ( - WorkloadPolicyStateList, -) +from clients.ctm_api_client.models.workload_policy_list import WorkloadPolicyList +from clients.ctm_api_client.models.workload_policy_state import WorkloadPolicyState +from clients.ctm_api_client.models.workload_policy_state_list import WorkloadPolicyStateList from clients.ctm_api_client.models.workspace_folder import WorkspaceFolder from clients.ctm_api_client.models.workspace_folders import WorkspaceFolders +from clients.ctm_api_client.models.year import Year from clients.ctm_api_client.models.zoo_keeper import ZooKeeper from clients.ctm_api_client.models.zos_template_data import ZosTemplateData diff --git a/src/clients/ctm_api_client/models/actions_auth_record.py b/src/clients/ctm_api_client/models/actions_auth_record.py index c3ab17b..6376f3c 100644 --- a/src/clients/ctm_api_client/models/actions_auth_record.py +++ b/src/clients/ctm_api_client/models/actions_auth_record.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ActionsAuthRecord(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "destination": "str", - "action": "str", - "category": "str", - "auth_level": "str", - "action_type": "str", - "additional_info": "str", - "category2": "str", - "policy": "str", - "auth_attr": "str", + openapi_types = { + 'destination': 'str', + 'action': 'str', + 'category': 'str', + 'auth_level': 'str', + 'action_type': 'str', + 'additional_info': 'str', + 'category2': 'str', + 'policy': 'str', + 'auth_attr': 'str' } attribute_map = { - "destination": "destination", - "action": "action", - "category": "category", - "auth_level": "authLevel", - "action_type": "actionType", - "additional_info": "additionalInfo", - "category2": "category2", - "policy": "policy", - "auth_attr": "authAttr", + 'destination': 'destination', + 'action': 'action', + 'category': 'category', + 'auth_level': 'authLevel', + 'action_type': 'actionType', + 'additional_info': 'additionalInfo', + 'category2': 'category2', + 'policy': 'policy', + 'auth_attr': 'authAttr' } - def __init__( - self, - destination=None, - action=None, - category=None, - auth_level=None, - action_type=None, - additional_info=None, - category2=None, - policy=None, - auth_attr=None, - _configuration=None, - ): # noqa: E501 - """ActionsAuthRecord - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, destination=None, action=None, category=None, auth_level=None, action_type=None, additional_info=None, category2=None, policy=None, auth_attr=None, local_vars_configuration=None): # noqa: E501 + """ActionsAuthRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._destination = None self._action = None @@ -122,17 +114,13 @@ def destination(self, destination): component in which the action sent - Possible Values - EM, CTM_Server, CTM_Agent, CTM_CM # noqa: E501 :param destination: The destination of this ActionsAuthRecord. # noqa: E501 - :type: str + :type destination: str """ allowed_values = ["EM", "CTM_Server", "CTM_Agent", "CTM_CM"] # noqa: E501 - if ( - self._configuration.client_side_validation - and destination not in allowed_values - ): + if self.local_vars_configuration.client_side_validation and destination not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `destination` ({0}), must be one of {1}".format( # noqa: E501 - destination, allowed_values - ) + "Invalid value for `destination` ({0}), must be one of {1}" # noqa: E501 + .format(destination, allowed_values) ) self._destination = destination @@ -155,292 +143,13 @@ def action(self, action): action name unique list of actions' names as appear in the actions_auth em db table, along with the destination makes a unique action auth entry # noqa: E501 :param action: The action of this ActionsAuthRecord. # noqa: E501 - :type: str + :type action: str """ - allowed_values = [ - "Collect_measurements_and_reports_request", - "Set_agent_debug_info_request", - "Get_agent_debug_info_request", - "Set_agent_config_params_request", - "Get_agent_config_params_request", - "Ctmag_set_cert_request", - "Ctmag_get_csr_request", - "Ctmag_get_cert_expire_date_request", - "Ctmag_get_config_request", - "Ctmagent_recycle_request", - "Ctmag_get_locale_list_request", - "Ctmag_update_config_request", - "Authorize_remote_host_request", - "Ctmsap_update_ew_config_request", - "Ctmsap_get_ew_config_request", - "Ctmcm_update_extract_rule_table_request", - "Ctmcm_get_extract_rule_table_request", - "Ctmcm_get_templates_request", - "Ctmcm_get_accounts_request", - "Ctmcm_add_account_request", - "Ctmcm_update_account_request", - "Ctmcm_delete_account_request", - "Ctmcm_validate_account_request", - "Ctmcm_get_info_request", - "Ctmcm_mass_update_request", - "Ctmcm_get_config_request", - "Ctmcm_update_config_request", - "Ctmsap_get_accounts_names_request", - "Ctmsap_get_sap_interception_criteria_request", - "Ctmsap_update_sap_interception_criteria_request", - "Ctmsap_get_ctm_interception_rules_request", - "Ctmsap_update_ctm_interception_rules_request", - "Ctmsap_get_extract_rules_request", - "Ctmsap_update_extract_rules_request", - "Ctmsap_get_user_exit_files_request", - "Ctmsap_get_xtractor_config_request", - "Ctmsap_update_xtractor_config_request", - "Ctmsap_check_XBP2_enable_request", - "Ctmsap_get_sap_calendars_request", - "Ctmsap_import_sap_calendar_request", - "Ctmsap_get_ew_events_names_request", - "Ctmsap_create_profile_request", - "Ctmsap_set_profile_request", - "Ctmsap_delete_profile_request", - "Ctmsap_get_profiles_request", - "Ctmsap_get_profile_criteria_request", - "Ctmsap_activate_profile_request", - "Ctmag_set_extract_service_status_request", - "Ctmag_update_extract_service_prop_request", - "Ctmag_get_extract_service_prop_request", - "Ctmcm_jndi_browse_request", - "Ctmcm_load_ejb_request", - "Ctmcm_get_encryption_type_request", - "Ctmcm_get_known_hosts_request", - "Ctmcm_update_aft_server_configuration_request", - "Ctmcm_get_aft_server_configuration_request", - "Ctmcm_verify_local_path_request", - "Ctmcm_mft_b2b_rest_patch_request", - "Ctmcm_get_as2_encryption_algorithms_request", - "Ctmcm_get_as2_signature_algorithms_request", - "Ctmcm_get_s3_regions_request", - "Ctmdb_remove_dbvendor_request", - "Ctmdb_update_dbvendor_request", - "Ctmdb_add_dbvendor_request", - "Ctmcm_mft_get_b2b_mode_request", - "Ctmcm_mft_b2b_rest_delete_request", - "Ctmcm_mft_b2b_rest_read_request", - "Ctmcm_mft_b2b_rest_update_request", - "Ctmcm_mft_b2b_rest_create_request", - "Ctmcm_mft_b2b_general_command_request", - "Ctmpsft_recycle_request", - "Ctmcm_get_Mvs_templates_request", - "Ctmcm_delete_Mvs_template_request", - "Ctmcm_add_Mvs_template_request", - "Ctmcm_update_Mvs_template_request", - "Ctmsap_update_sap_interception_profile_request", - "Ctmsap_get_sap_interception_profiles_request", - "Ctmcm_get_pgp_templates_request", - "Ctmcm_delete_pgp_template_request", - "Ctmcm_add_pgp_template_request", - "Ctmcm_update_pgp_template_request", - "Ctmcm_mass_update_details_request", - "Ctmcm_create_ssh_key_request", - "Ctmcm_authorize_remote_host_request", - "Ctmcm_get_home_directory_request", - "Ctmoebs_activate_ew_request", - "Ctmoebs_get_alerts_list_request", - "Ctmoebs_get_applications_list_request", - "Ctmoebs_update_ew_rules_request", - "Ctmoebs_get_ew_rules_request", - "Ctmoebs_update_ew_config_request", - "Ctmoebs_get_ew_config_request", - "Ctmoebs_get_service_names_request", - "Ctmcm_browse_file_request", - "Ctmsap_clear_events_request", - "Ctmsap_update_ew_rules_request", - "Ctmsap_get_ew_rules_request", - "Zos_get_sys_parms_request", - "Update_deployment_target_request", - "Update_deployment_parameters_request", - "Get_deployment_output_request", - "Retry_deployment_request", - "Cancel_deployment_request", - "Delete_deployment_request", - "Add_uninstall_deployment_request", - "Ctmsec_get_users_groups_request", - "Ctmsec_delete_user_request", - "Ctmsec_delete_group_request", - "Ctmsec_update_user_request", - "Ctmsec_update_group_request", - "Ctmsec_new_user_request", - "Ctmsec_new_group_request", - "Ctmsec_get_security_attributes_request", - "Ctmsec_update_security_attributes_request", - "Ctmagent_add_request", - "Ctmagent_delete_request", - "Ctmagent_ping_request", - "Ctmagent_get_parameters_request", - "Ctmagent_set_parameters_request", - "Ctmagent_enable_request", - "Ctmagent_disable_request", - "Get_ctms_debug_info_request", - "Set_ctms_debug_info_request", - "Ctmrjx_get_host_details_request", - "Ctmrjx_add_host_request", - "Ctmrjx_update_host_request", - "Ctmrjx_delete_host_request", - "Ctmrjx_test_host_request", - "Ctmrjx_enable_host_request", - "Ctmrjx_disable_host_request", - "Ctmrjx_ping_host_request", - "Ctmrjx_get_owners_request", - "Ctmrjx_get_owner_details_request", - "Ctmrjx_add_owner_request", - "Ctmrjx_update_owner_request", - "Ctmrjx_delete_owner_request", - "Ctmrjx_get_keynames_list_request", - "Ctmrjx_test_user_request", - "Ctm_get_node_groups_request", - "Ctm_update_node_group_request", - "Ctm_add_node_group_request", - "Ctm_delete_node_group_request", - "Zos_ctl_request", - "Zos_new_sys_parm_request", - "Zos_update_sys_parm_request", - "Zos_delete_sys_parm_request", - "Zos_refresh_sys_parms_request", - "Ctmnodeid_test_user_request", - "Ctm_server_get_sys_parms_request", - "Ctm_server_update_sys_parm_request", - "Ctm_server_refresh_sys_parms_request", - "Set_pause_request", - "Zos_get_sys_parms_enhanced_request", - "Ctmserver_get_ssh_keys_list_request", - "Ctmserver_create_ssh_key_request", - "Ctmserver_update_ssh_key_request", - "Ctmserver_delete_ssh_key_request", - "Ctmserver_get_public_key_request", - "Get_supported_shout_destination_addresses_request", - "Get_shout_destination_tables_request", - "Delete_shout_destination_table_request", - "Set_active_shout_destination_table_request", - "Update_shout_destination_request", - "Create_shout_destination_request", - "Delete_shout_destination_request", - "Ctm_get_all_node_restrictions_request", - "Ctm_add_node_restriction_request", - "Ctm_update_node_restriction_request", - "Ctm_delete_node_restrictions_request", - "Ctmsrv_get_cm_accounts_status_request", - "Ctmsrv_update_cm_account_status_request", - "Set_ctm_primary_request", - "Set_ctm_failover_mode_request", - "Replication_mode_request", - "Ctmagent_troubleshooting_request", - "Set_db_host_port_request", - "Get_db_host_port_request", - "Xalert_unhandle_request", - "Create_em_component_request", - "Get_component_request", - "Refresh_ctms_ag_deploy_request", - "Refresh_ctms_request", - "Get_agents_request", - "Xalert_handle_request", - "Get_all_node_groups_request", - "Get_components_request", - "View_agents_log_request", - "Get_xalerts_request", - "Delete_sys_parms_request", - "Update_sys_parms_request", - "New_sys_parms_request", - "Get_sys_parms_request", - "Get_cms_details_request", - "Get_ctms_codes_request", - "Delete_ctms_request", - "Ccp_add_or_update_request", - "Ccp_get_summary_request", - "Ccp_get_full_request", - "Ccp_delete_request", - "Ccp_get_sync_status_request", - "Get_webserver_debuglevelinfo_request", - "New_ctms_request", - "Discover_request", - "Get_ctms_details_request", - "Un_manage_ctms_request", - "Manage_ctms_request", - "Disable_ctms_request", - "Get_WebServer_urls_request", - "Enable_ctms_request", - "Rename_CTMServer_dry_run_request", - "Get_db_details_request", - "Get_em_details_request", - "Move_em_control_request", - "Set_webserver_debuglevelinfo_request", - "Set_em_primary_request", - "Start_replication_request", - "Create_xalert_request", - "Set_em_failover_mode_request", - "Purge_xalerts_request", - "Remove_old_versions_request", - "Move_em_ctm_control_request", - "Set_em_ctm_primary_request", - "Get_capacity_exceed_alert_params_request", - "Set_capacity_exceed_alert_params_request", - "Test_envs_connectivity_request", - "Set_enable_capacity_exceed_alert_request", - "Get_enable_capacity_exceed_alert_request", - "Get_license_site_info_request", - "Get_license_info_request", - "Update_license_request", - "Get_web_server_details_request", - "Get_available_client_updates_request", - "Set_required_fp_or_patch_request", - "Import_client_certificates_request", - "Get_archive_server_conf_request", - "Set_archive_server_conf_request", - "Archive_Browse_CCM", - "Archive_Update_CCM", - "Set_B2B_mode_for_mft_request", - "Promote_and_rename_CTMServer_request", - "Get_compatibility_details_request", - "Set_compatibility_version_request", - "Update_local_CTMServer_attribute_request", - "Update_ctms_request", - "Ignore_request", - "Recycle_request", - "Stop_request", - "Start_request", - "Get_em_component_request", - "Delete_em_component_request", - "Remove_old_alerts_request", - "Update_em_component_request", - "List_em_user_names_request", - "Get_diag_output_request", - "Add_deployment_request", - "Get_deployment_list_request", - "Get_machine_details_request", - "Get_packages_request", - "Update_Add_Ons_request", - "Get_Add_Ons_request", - "LDAP_get_types_request", - "Web_launch_prepare_package", - "ManageSSL_generate_certificate_request", - "ManageSSL_get_components_request", - "ManageSSL_create_new_CA_request", - "ManageSSL_get_CA_details_request", - "Is_annotation_required_request", - "Actions_auth_request", - "Login_admin_db_request", - "Db_extend_request", - "Get_db_file_list_request", - "Db_check_space_request", - "Polling_request", - "Ctl_request", - "Xalert_update_note_request", - "Ctmcm_mft_set_b2b_mode_request", - "Get_ctm_node_groups_request", - ] # noqa: E501 - if self._configuration.client_side_validation and action not in allowed_values: + allowed_values = ["Collect_measurements_and_reports_request", "Set_agent_debug_info_request", "Get_agent_debug_info_request", "Set_agent_config_params_request", "Get_agent_config_params_request", "Ctmag_set_cert_request", "Ctmag_get_csr_request", "Ctmag_get_cert_expire_date_request", "Ctmag_get_config_request", "Ctmagent_recycle_request", "Ctmag_get_locale_list_request", "Ctmag_update_config_request", "Authorize_remote_host_request", "Ctmsap_update_ew_config_request", "Ctmsap_get_ew_config_request", "Ctmcm_update_extract_rule_table_request", "Ctmcm_get_extract_rule_table_request", "Ctmcm_get_templates_request", "Ctmcm_get_accounts_request", "Ctmcm_add_account_request", "Ctmcm_update_account_request", "Ctmcm_delete_account_request", "Ctmcm_validate_account_request", "Ctmcm_get_info_request", "Ctmcm_mass_update_request", "Ctmcm_get_config_request", "Ctmcm_update_config_request", "Ctmsap_get_accounts_names_request", "Ctmsap_get_sap_interception_criteria_request", "Ctmsap_update_sap_interception_criteria_request", "Ctmsap_get_ctm_interception_rules_request", "Ctmsap_update_ctm_interception_rules_request", "Ctmsap_get_extract_rules_request", "Ctmsap_update_extract_rules_request", "Ctmsap_get_user_exit_files_request", "Ctmsap_get_xtractor_config_request", "Ctmsap_update_xtractor_config_request", "Ctmsap_check_XBP2_enable_request", "Ctmsap_get_sap_calendars_request", "Ctmsap_import_sap_calendar_request", "Ctmsap_get_ew_events_names_request", "Ctmsap_create_profile_request", "Ctmsap_set_profile_request", "Ctmsap_delete_profile_request", "Ctmsap_get_profiles_request", "Ctmsap_get_profile_criteria_request", "Ctmsap_activate_profile_request", "Ctmag_set_extract_service_status_request", "Ctmag_update_extract_service_prop_request", "Ctmag_get_extract_service_prop_request", "Ctmcm_jndi_browse_request", "Ctmcm_load_ejb_request", "Ctmcm_get_encryption_type_request", "Ctmcm_get_known_hosts_request", "Ctmcm_update_aft_server_configuration_request", "Ctmcm_get_aft_server_configuration_request", "Ctmcm_verify_local_path_request", "Ctmcm_mft_b2b_rest_patch_request", "Ctmcm_get_as2_encryption_algorithms_request", "Ctmcm_get_as2_signature_algorithms_request", "Ctmcm_get_s3_regions_request", "Ctmcm_get_oracle_regions_request", "Ctmcm_get_oracle_compartments_request", "Ctmcm_get_ssh_keys_content_request", "Ctmdb_remove_dbvendor_request", "Ctmdb_update_dbvendor_request", "Ctmdb_add_dbvendor_request", "Ctmcm_mft_get_b2b_mode_request", "Ctmcm_mft_b2b_rest_delete_request", "Ctmcm_mft_b2b_rest_read_request", "Ctmcm_mft_b2b_rest_update_request", "Ctmcm_mft_b2b_rest_create_request", "Ctmcm_mft_b2b_general_command_request", "Ctmpsft_recycle_request", "Ctmcm_get_Mvs_templates_request", "Ctmcm_delete_Mvs_template_request", "Ctmcm_add_Mvs_template_request", "Ctmcm_update_Mvs_template_request", "Ctmsap_update_sap_interception_profile_request", "Ctmsap_get_sap_interception_profiles_request", "Ctmcm_get_pgp_templates_request", "Ctmcm_delete_pgp_template_request", "Ctmcm_add_pgp_template_request", "Ctmcm_update_pgp_template_request", "Ctmcm_mass_update_details_request", "Ctmcm_create_ssh_key_request", "Ctmcm_authorize_remote_host_request", "Ctmcm_get_home_directory_request", "Ctmoebs_activate_ew_request", "Ctmoebs_get_alerts_list_request", "Ctmoebs_get_applications_list_request", "Ctmoebs_update_ew_rules_request", "Ctmoebs_get_ew_rules_request", "Ctmoebs_update_ew_config_request", "Ctmoebs_get_ew_config_request", "Ctmoebs_get_service_names_request", "Ctmcm_browse_file_request", "Ctmsap_clear_events_request", "Ctmsap_update_ew_rules_request", "Ctmsap_get_ew_rules_request", "Zos_get_sys_parms_request", "Update_deployment_target_request", "Update_deployment_parameters_request", "Get_deployment_output_request", "Retry_deployment_request", "Cancel_deployment_request", "Delete_deployment_request", "Add_uninstall_deployment_request", "Ctmsec_get_users_groups_request", "Ctmsec_delete_user_request", "Ctmsec_delete_group_request", "Ctmsec_update_user_request", "Ctmsec_update_group_request", "Ctmsec_new_user_request", "Ctmsec_new_group_request", "Ctmsec_get_security_attributes_request", "Ctmsec_update_security_attributes_request", "Ctmagent_add_request", "Ctmagent_delete_request", "Ctmagent_ping_request", "Ctmagent_get_parameters_request", "Ctmagent_set_parameters_request", "Ctmagent_enable_request", "Ctmagent_disable_request", "Get_ctms_debug_info_request", "Set_ctms_debug_info_request", "Ctmrjx_get_host_details_request", "Ctmrjx_add_host_request", "Ctmrjx_update_host_request", "Ctmrjx_delete_host_request", "Ctmrjx_test_host_request", "Ctmrjx_enable_host_request", "Ctmrjx_disable_host_request", "Ctmrjx_ping_host_request", "Ctmrjx_get_owners_request", "Ctmrjx_get_owner_details_request", "Ctmrjx_add_owner_request", "Ctmrjx_update_owner_request", "Ctmrjx_delete_owner_request", "Ctmrjx_get_keynames_list_request", "Ctmrjx_test_user_request", "Ctm_get_node_groups_request", "Ctm_update_node_group_request", "Ctm_add_node_group_request", "Ctm_delete_node_group_request", "Zos_ctl_request", "Zos_new_sys_parm_request", "Zos_update_sys_parm_request", "Zos_delete_sys_parm_request", "Zos_refresh_sys_parms_request", "Ctmnodeid_test_user_request", "Ctm_server_get_sys_parms_request", "Ctm_server_update_sys_parm_request", "Ctm_server_refresh_sys_parms_request", "Set_pause_request", "Zos_get_sys_parms_enhanced_request", "Ctmserver_get_ssh_keys_list_request", "Ctmserver_create_ssh_key_request", "Ctmserver_update_ssh_key_request", "Ctmserver_delete_ssh_key_request", "Ctmserver_get_public_key_request", "Get_supported_shout_destination_addresses_request", "Get_shout_destination_tables_request", "Delete_shout_destination_table_request", "Set_active_shout_destination_table_request", "Update_shout_destination_request", "Create_shout_destination_request", "Delete_shout_destination_request", "Ctm_get_all_node_restrictions_request", "Ctm_add_node_restriction_request", "Ctm_update_node_restriction_request", "Ctm_delete_node_restrictions_request", "Ctmsrv_get_cm_accounts_status_request", "Ctmsrv_update_cm_account_status_request", "Set_ctm_primary_request", "Set_ctm_failover_mode_request", "Replication_mode_request", "Ctmagent_troubleshooting_request", "Set_db_host_port_request", "Get_db_host_port_request", "Xalert_unhandle_request", "Create_em_component_request", "Get_component_request", "Refresh_ctms_ag_deploy_request", "Refresh_ctms_request", "Get_agents_request", "Xalert_handle_request", "Get_all_node_groups_request", "Get_components_request", "View_agents_log_request", "Get_xalerts_request", "Delete_sys_parms_request", "Update_sys_parms_request", "New_sys_parms_request", "Get_sys_parms_request", "Get_cms_details_request", "Get_ctms_codes_request", "Delete_ctms_request", "Ccp_add_or_update_request", "Ccp_get_summary_request", "Ccp_get_full_request", "Ccp_delete_request", "Ccp_get_sync_status_request", "Get_webserver_debuglevelinfo_request", "New_ctms_request", "Discover_request", "Get_ctms_details_request", "Un_manage_ctms_request", "Manage_ctms_request", "Disable_ctms_request", "Get_WebServer_urls_request", "Enable_ctms_request", "Rename_CTMServer_dry_run_request", "Get_db_details_request", "Get_em_details_request", "Move_em_control_request", "Set_webserver_debuglevelinfo_request", "Set_em_primary_request", "Start_replication_request", "Create_xalert_request", "Set_em_failover_mode_request", "Purge_xalerts_request", "Remove_old_versions_request", "Move_em_ctm_control_request", "Set_em_ctm_primary_request", "Get_capacity_exceed_alert_params_request", "Set_capacity_exceed_alert_params_request", "Test_envs_connectivity_request", "Set_enable_capacity_exceed_alert_request", "Get_enable_capacity_exceed_alert_request", "Get_license_site_info_request", "Get_license_info_request", "Update_license_request", "Get_web_server_details_request", "Get_available_client_updates_request", "Set_required_fp_or_patch_request", "Import_client_certificates_request", "Get_archive_server_conf_request", "Set_archive_server_conf_request", "Archive_Browse_CCM", "Archive_Update_CCM", "Set_B2B_mode_for_mft_request", "Promote_and_rename_CTMServer_request", "Get_compatibility_details_request", "Set_compatibility_version_request", "Update_local_CTMServer_attribute_request", "Update_ctms_request", "Ignore_request", "Recycle_request", "Stop_request", "Start_request", "Get_em_component_request", "Delete_em_component_request", "Remove_old_alerts_request", "Update_em_component_request", "List_em_user_names_request", "Get_diag_output_request", "Add_deployment_request", "Get_deployment_list_request", "Get_machine_details_request", "Get_packages_request", "Update_Add_Ons_request", "Get_Add_Ons_request", "LDAP_get_types_request", "Web_launch_prepare_package", "ManageSSL_generate_certificate_request", "ManageSSL_get_components_request", "ManageSSL_create_new_CA_request", "ManageSSL_get_CA_details_request", "Is_annotation_required_request", "Actions_auth_request", "Login_admin_db_request", "Db_extend_request", "Get_db_file_list_request", "Db_check_space_request", "Polling_request", "Ctl_request", "Xalert_update_note_request", "Ctmcm_mft_set_b2b_mode_request", "Get_ctm_node_groups_request", "Get_ctm_node_group_request", "Activate_server_request", "Deactivate_server_request", "Delete_sys_parms_ext_request", "Get_sys_parms_ext_request", "New_sys_parms_ext_request", "Update_Add_Ons_request_with_audit", "Update_sys_parms_ext_request", "internal_New_ctms_request"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and action not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `action` ({0}), must be one of {1}".format( # noqa: E501 - action, allowed_values - ) + "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 + .format(action, allowed_values) ) self._action = action @@ -463,7 +172,7 @@ def category(self, category): Privilege (Can be empty) Possible Values for categories fields - OPER, DATABASE, CONFIG, CTMSEC, CPMAN, RAMAN, AGMAN, CMMAN, CCP, UNKNOWN # noqa: E501 :param category: The category of this ActionsAuthRecord. # noqa: E501 - :type: str + :type category: str """ self._category = category @@ -486,7 +195,7 @@ def auth_level(self, auth_level): required minimum authorization level - BROWSE, UPDATE, FULL # noqa: E501 :param auth_level: The auth_level of this ActionsAuthRecord. # noqa: E501 - :type: str + :type auth_level: str """ self._auth_level = auth_level @@ -509,7 +218,7 @@ def action_type(self, action_type): R - request always pass, authorization is done on the response; C - Connection Profile name will remain empty and will be ignored; E - Not related to authorization # noqa: E501 :param action_type: The action_type of this ActionsAuthRecord. # noqa: E501 - :type: str + :type action_type: str """ self._action_type = action_type @@ -532,7 +241,7 @@ def additional_info(self, additional_info): currently not in use regarding authorization # noqa: E501 :param additional_info: The additional_info of this ActionsAuthRecord. # noqa: E501 - :type: str + :type additional_info: str """ self._additional_info = additional_info @@ -553,7 +262,7 @@ def category2(self, category2): :param category2: The category2 of this ActionsAuthRecord. # noqa: E501 - :type: str + :type category2: str """ self._category2 = category2 @@ -576,14 +285,13 @@ def policy(self, policy): relation between Category and category2 - 1. Only category, 2. Only Category2, 3. Category AND Category2, 4. Category OR Category2 # noqa: E501 :param policy: The policy of this ActionsAuthRecord. # noqa: E501 - :type: str + :type policy: str """ allowed_values = ["CTG", "CTG2", "CTG_AND_CTG2", "CTG_OR_CTG2"] # noqa: E501 - if self._configuration.client_side_validation and policy not in allowed_values: + if self.local_vars_configuration.client_side_validation and policy not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `policy` ({0}), must be one of {1}".format( # noqa: E501 - policy, allowed_values - ) + "Invalid value for `policy` ({0}), must be one of {1}" # noqa: E501 + .format(policy, allowed_values) ) self._policy = policy @@ -606,37 +314,40 @@ def auth_attr(self, auth_attr): In case that not all information for authorization exist in the header request, it contain path in the body for the missing field\\fields. # noqa: E501 :param auth_attr: The auth_attr of this ActionsAuthRecord. # noqa: E501 - :type: str + :type auth_attr: str """ self._auth_attr = auth_attr - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ActionsAuthRecord, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/active_services.py b/src/clients/ctm_api_client/models/active_services.py index 53b5b7a..9ebba8a 100644 --- a/src/clients/ctm_api_client/models/active_services.py +++ b/src/clients/ctm_api_client/models/active_services.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ActiveServices(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "service_last_updated_time": "str", - "active_services": "list[SLAService]", + openapi_types = { + 'service_last_updated_time': 'str', + 'active_services': 'list[SLAService]' } attribute_map = { - "service_last_updated_time": "serviceLastUpdatedTime", - "active_services": "activeServices", + 'service_last_updated_time': 'serviceLastUpdatedTime', + 'active_services': 'activeServices' } - def __init__( - self, service_last_updated_time=None, active_services=None, _configuration=None - ): # noqa: E501 - """ActiveServices - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, service_last_updated_time=None, active_services=None, local_vars_configuration=None): # noqa: E501 + """ActiveServices - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._service_last_updated_time = None self._active_services = None @@ -75,7 +77,7 @@ def service_last_updated_time(self, service_last_updated_time): :param service_last_updated_time: The service_last_updated_time of this ActiveServices. # noqa: E501 - :type: str + :type service_last_updated_time: str """ self._service_last_updated_time = service_last_updated_time @@ -96,37 +98,40 @@ def active_services(self, active_services): :param active_services: The active_services of this ActiveServices. # noqa: E501 - :type: list[SLAService] + :type active_services: list[SLAService] """ self._active_services = active_services - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ActiveServices, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/add_agent_params.py b/src/clients/ctm_api_client/models/add_agent_params.py index 2566470..0b850a6 100644 --- a/src/clients/ctm_api_client/models/add_agent_params.py +++ b/src/clients/ctm_api_client/models/add_agent_params.py @@ -5,68 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AddAgentParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "host": "str", - "port": "int", - "tag": "str", - "ssl_state": "str", - "persistent_connection": "bool", - "timeout": "int", - "suppress_ping": "bool", + openapi_types = { + 'host': 'str', + 'port': 'int', + 'tag': 'str', + 'ssl_state': 'str', + 'persistent_connection': 'bool', + 'timeout': 'int', + 'suppress_ping': 'bool', + 'agent_type': 'str' } attribute_map = { - "host": "host", - "port": "port", - "tag": "tag", - "ssl_state": "sslState", - "persistent_connection": "persistentConnection", - "timeout": "timeout", - "suppress_ping": "suppressPing", + 'host': 'host', + 'port': 'port', + 'tag': 'tag', + 'ssl_state': 'sslState', + 'persistent_connection': 'persistentConnection', + 'timeout': 'timeout', + 'suppress_ping': 'suppressPing', + 'agent_type': 'agentType' } - def __init__( - self, - host=None, - port=None, - tag=None, - ssl_state=None, - persistent_connection=None, - timeout=60, - suppress_ping=False, - _configuration=None, - ): # noqa: E501 - """AddAgentParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, host=None, port=None, tag=None, ssl_state=None, persistent_connection=None, timeout=60, suppress_ping=False, agent_type=None, local_vars_configuration=None): # noqa: E501 + """AddAgentParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host = None self._port = None @@ -75,6 +71,7 @@ def __init__( self._persistent_connection = None self._timeout = None self._suppress_ping = None + self._agent_type = None self.discriminator = None self.host = host @@ -89,6 +86,8 @@ def __init__( self.timeout = timeout if suppress_ping is not None: self.suppress_ping = suppress_ping + if agent_type is not None: + self.agent_type = agent_type @property def host(self): @@ -108,12 +107,10 @@ def host(self, host): The hostname or alias of the agent machine. # noqa: E501 :param host: The host of this AddAgentParams. # noqa: E501 - :type: str + :type host: str """ - if self._configuration.client_side_validation and host is None: - raise ValueError( - "Invalid value for `host`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and host is None: # noqa: E501 + raise ValueError("Invalid value for `host`, must not be `None`") # noqa: E501 self._host = host @@ -135,12 +132,10 @@ def port(self, port): The agent's listening port. # noqa: E501 :param port: The port of this AddAgentParams. # noqa: E501 - :type: int + :type port: int """ - if self._configuration.client_side_validation and port is None: - raise ValueError( - "Invalid value for `port`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 + raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 self._port = port @@ -162,7 +157,7 @@ def tag(self, tag): The agent's tag. # noqa: E501 :param tag: The tag of this AddAgentParams. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag @@ -185,7 +180,7 @@ def ssl_state(self, ssl_state): The agent's ssl State. HIDDEN. # noqa: E501 :param ssl_state: The ssl_state of this AddAgentParams. # noqa: E501 - :type: str + :type ssl_state: str """ self._ssl_state = ssl_state @@ -208,7 +203,7 @@ def persistent_connection(self, persistent_connection): Is the connection persistent or create each time it is needed. HIDDEN. # noqa: E501 :param persistent_connection: The persistent_connection of this AddAgentParams. # noqa: E501 - :type: bool + :type persistent_connection: bool """ self._persistent_connection = persistent_connection @@ -231,7 +226,7 @@ def timeout(self, timeout): maximum time in seconds to wait (default 60). HIDDEN # noqa: E501 :param timeout: The timeout of this AddAgentParams. # noqa: E501 - :type: int + :type timeout: int """ self._timeout = timeout @@ -254,37 +249,63 @@ def suppress_ping(self, suppress_ping): Suppress ping action to added agent (default false). HIDDEN. # noqa: E501 :param suppress_ping: The suppress_ping of this AddAgentParams. # noqa: E501 - :type: bool + :type suppress_ping: bool """ self._suppress_ping = suppress_ping - def to_dict(self): + @property + def agent_type(self): + """Gets the agent_type of this AddAgentParams. # noqa: E501 + + The agent's type. # noqa: E501 + + :return: The agent_type of this AddAgentParams. # noqa: E501 + :rtype: str + """ + return self._agent_type + + @agent_type.setter + def agent_type(self, agent_type): + """Sets the agent_type of this AddAgentParams. + + The agent's type. # noqa: E501 + + :param agent_type: The agent_type of this AddAgentParams. # noqa: E501 + :type agent_type: str + """ + + self._agent_type = agent_type + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AddAgentParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/add_remote_host_params.py b/src/clients/ctm_api_client/models/add_remote_host_params.py index 53af4e1..3bc027f 100644 --- a/src/clients/ctm_api_client/models/add_remote_host_params.py +++ b/src/clients/ctm_api_client/models/add_remote_host_params.py @@ -5,65 +5,68 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AddRemoteHostParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "remotehost": "str", - "port": "int", - "encrypt_algorithm": "str", - "compression": "bool", - "authorize": "bool", - "agents": "list[str]", + openapi_types = { + 'remotehost': 'str', + 'port': 'int', + 'encrypt_algorithm': 'str', + 'compression': 'bool', + 'authorize': 'bool', + 'agents': 'list[str]', + 'tag': 'str', + 'w_mi_sysout_directory': 'str', + 'connection_type': 'str', + 'convert_existing_agent': 'bool' } attribute_map = { - "remotehost": "remotehost", - "port": "port", - "encrypt_algorithm": "encryptAlgorithm", - "compression": "compression", - "authorize": "authorize", - "agents": "agents", + 'remotehost': 'remotehost', + 'port': 'port', + 'encrypt_algorithm': 'encryptAlgorithm', + 'compression': 'compression', + 'authorize': 'authorize', + 'agents': 'agents', + 'tag': 'tag', + 'w_mi_sysout_directory': 'wMISysoutDirectory', + 'connection_type': 'connectionType', + 'convert_existing_agent': 'convertExistingAgent' } - def __init__( - self, - remotehost=None, - port=None, - encrypt_algorithm=None, - compression=None, - authorize=None, - agents=None, - _configuration=None, - ): # noqa: E501 - """AddRemoteHostParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, remotehost=None, port=None, encrypt_algorithm=None, compression=None, authorize=False, agents=None, tag=None, w_mi_sysout_directory=None, connection_type=None, convert_existing_agent=None, local_vars_configuration=None): # noqa: E501 + """AddRemoteHostParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._remotehost = None self._port = None @@ -71,6 +74,10 @@ def __init__( self._compression = None self._authorize = None self._agents = None + self._tag = None + self._w_mi_sysout_directory = None + self._connection_type = None + self._convert_existing_agent = None self.discriminator = None if remotehost is not None: @@ -85,6 +92,14 @@ def __init__( self.authorize = authorize if agents is not None: self.agents = agents + if tag is not None: + self.tag = tag + if w_mi_sysout_directory is not None: + self.w_mi_sysout_directory = w_mi_sysout_directory + if connection_type is not None: + self.connection_type = connection_type + if convert_existing_agent is not None: + self.convert_existing_agent = convert_existing_agent @property def remotehost(self): @@ -104,7 +119,7 @@ def remotehost(self, remotehost): The remote host (name) which will execute the commands. REQUIRED. # noqa: E501 :param remotehost: The remotehost of this AddRemoteHostParams. # noqa: E501 - :type: str + :type remotehost: str """ self._remotehost = remotehost @@ -127,7 +142,7 @@ def port(self, port): The remote host SSH port. # noqa: E501 :param port: The port of this AddRemoteHostParams. # noqa: E501 - :type: int + :type port: int """ self._port = port @@ -150,7 +165,7 @@ def encrypt_algorithm(self, encrypt_algorithm): The SSH encrypt algorithm to be used. HIDDEN. # noqa: E501 :param encrypt_algorithm: The encrypt_algorithm of this AddRemoteHostParams. # noqa: E501 - :type: str + :type encrypt_algorithm: str """ self._encrypt_algorithm = encrypt_algorithm @@ -173,7 +188,7 @@ def compression(self, compression): Is compression used. HIDDEN. # noqa: E501 :param compression: The compression of this AddRemoteHostParams. # noqa: E501 - :type: bool + :type compression: bool """ self._compression = compression @@ -196,7 +211,7 @@ def authorize(self, authorize): authorize SSL remote host while creating the remote host. HIDDEN. # noqa: E501 :param authorize: The authorize of this AddRemoteHostParams. # noqa: E501 - :type: bool + :type authorize: bool """ self._authorize = authorize @@ -219,37 +234,132 @@ def agents(self, agents): Agents to execute the commands on. HIDDEN. # noqa: E501 :param agents: The agents of this AddRemoteHostParams. # noqa: E501 - :type: list[str] + :type agents: list[str] """ self._agents = agents - def to_dict(self): + @property + def tag(self): + """Gets the tag of this AddRemoteHostParams. # noqa: E501 + + tag of the remote host. # noqa: E501 + + :return: The tag of this AddRemoteHostParams. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this AddRemoteHostParams. + + tag of the remote host. # noqa: E501 + + :param tag: The tag of this AddRemoteHostParams. # noqa: E501 + :type tag: str + """ + + self._tag = tag + + @property + def w_mi_sysout_directory(self): + """Gets the w_mi_sysout_directory of this AddRemoteHostParams. # noqa: E501 + + the WMI Sysout Directory. # noqa: E501 + + :return: The w_mi_sysout_directory of this AddRemoteHostParams. # noqa: E501 + :rtype: str + """ + return self._w_mi_sysout_directory + + @w_mi_sysout_directory.setter + def w_mi_sysout_directory(self, w_mi_sysout_directory): + """Sets the w_mi_sysout_directory of this AddRemoteHostParams. + + the WMI Sysout Directory. # noqa: E501 + + :param w_mi_sysout_directory: The w_mi_sysout_directory of this AddRemoteHostParams. # noqa: E501 + :type w_mi_sysout_directory: str + """ + + self._w_mi_sysout_directory = w_mi_sysout_directory + + @property + def connection_type(self): + """Gets the connection_type of this AddRemoteHostParams. # noqa: E501 + + the connection type. # noqa: E501 + + :return: The connection_type of this AddRemoteHostParams. # noqa: E501 + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """Sets the connection_type of this AddRemoteHostParams. + + the connection type. # noqa: E501 + + :param connection_type: The connection_type of this AddRemoteHostParams. # noqa: E501 + :type connection_type: str + """ + + self._connection_type = connection_type + + @property + def convert_existing_agent(self): + """Gets the convert_existing_agent of this AddRemoteHostParams. # noqa: E501 + + convert existing agent to Agentless host. HIDDEN. # noqa: E501 + + :return: The convert_existing_agent of this AddRemoteHostParams. # noqa: E501 + :rtype: bool + """ + return self._convert_existing_agent + + @convert_existing_agent.setter + def convert_existing_agent(self, convert_existing_agent): + """Sets the convert_existing_agent of this AddRemoteHostParams. + + convert existing agent to Agentless host. HIDDEN. # noqa: E501 + + :param convert_existing_agent: The convert_existing_agent of this AddRemoteHostParams. # noqa: E501 + :type convert_existing_agent: bool + """ + + self._convert_existing_agent = convert_existing_agent + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AddRemoteHostParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/add_remove_success_data.py b/src/clients/ctm_api_client/models/add_remove_success_data.py index cbbdf1e..40c8b1e 100644 --- a/src/clients/ctm_api_client/models/add_remove_success_data.py +++ b/src/clients/ctm_api_client/models/add_remove_success_data.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AddRemoveSuccessData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str", "current_items": "list[str]"} - - attribute_map = {"message": "message", "current_items": "currentItems"} - - def __init__( - self, message=None, current_items=None, _configuration=None - ): # noqa: E501 - """AddRemoveSuccessData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'message': 'str', + 'current_items': 'list[str]' + } + + attribute_map = { + 'message': 'message', + 'current_items': 'currentItems' + } + + def __init__(self, message=None, current_items=None, local_vars_configuration=None): # noqa: E501 + """AddRemoveSuccessData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._current_items = None @@ -71,7 +79,7 @@ def message(self, message): The success message that describes the performed action. # noqa: E501 :param message: The message of this AddRemoveSuccessData. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -94,37 +102,40 @@ def current_items(self, current_items): List of the items remained after the action. # noqa: E501 :param current_items: The current_items of this AddRemoveSuccessData. # noqa: E501 - :type: list[str] + :type current_items: list[str] """ self._current_items = current_items - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AddRemoveSuccessData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/add_server_params.py b/src/clients/ctm_api_client/models/add_server_params.py index ce6485b..67d598f 100644 --- a/src/clients/ctm_api_client/models/add_server_params.py +++ b/src/clients/ctm_api_client/models/add_server_params.py @@ -5,44 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AddServerParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"host": "str", "ctm": "str", "id": "str", "port": "int"} - - attribute_map = {"host": "host", "ctm": "ctm", "id": "id", "port": "port"} - - def __init__( - self, host=None, ctm=None, id=None, port=None, _configuration=None - ): # noqa: E501 - """AddServerParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'host': 'str', + 'ctm': 'str', + 'id': 'str', + 'port': 'int' + } + + attribute_map = { + 'host': 'host', + 'ctm': 'ctm', + 'id': 'id', + 'port': 'port' + } + + def __init__(self, host=None, ctm=None, id=None, port=None, local_vars_configuration=None): # noqa: E501 + """AddServerParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host = None self._ctm = None @@ -74,12 +86,10 @@ def host(self, host): The Control-M Server host name. # noqa: E501 :param host: The host of this AddServerParams. # noqa: E501 - :type: str + :type host: str """ - if self._configuration.client_side_validation and host is None: - raise ValueError( - "Invalid value for `host`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and host is None: # noqa: E501 + raise ValueError("Invalid value for `host`, must not be `None`") # noqa: E501 self._host = host @@ -101,12 +111,10 @@ def ctm(self, ctm): The Control-M Server name. # noqa: E501 :param ctm: The ctm of this AddServerParams. # noqa: E501 - :type: str + :type ctm: str """ - if self._configuration.client_side_validation and ctm is None: - raise ValueError( - "Invalid value for `ctm`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and ctm is None: # noqa: E501 + raise ValueError("Invalid value for `ctm`, must not be `None`") # noqa: E501 self._ctm = ctm @@ -128,9 +136,9 @@ def id(self, id): The id of the Control-M Server, 3 digits id # noqa: E501 :param id: The id of this AddServerParams. # noqa: E501 - :type: str + :type id: str """ - if self._configuration.client_side_validation and id is None: + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @@ -153,37 +161,40 @@ def port(self, port): The Control-M Server port number. # noqa: E501 :param port: The port of this AddServerParams. # noqa: E501 - :type: int + :type port: int """ self._port = port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AddServerParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_certificate_expiration_data.py b/src/clients/ctm_api_client/models/agent_certificate_expiration_data.py index 53fd39b..b541c8b 100644 --- a/src/clients/ctm_api_client/models/agent_certificate_expiration_data.py +++ b/src/clients/ctm_api_client/models/agent_certificate_expiration_data.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentCertificateExpirationData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"expiration_date": "str"} + openapi_types = { + 'expiration_date': 'str' + } - attribute_map = {"expiration_date": "expirationDate"} + attribute_map = { + 'expiration_date': 'expirationDate' + } - def __init__(self, expiration_date=None, _configuration=None): # noqa: E501 - """AgentCertificateExpirationData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, expiration_date=None, local_vars_configuration=None): # noqa: E501 + """AgentCertificateExpirationData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._expiration_date = None self.discriminator = None @@ -66,37 +74,40 @@ def expiration_date(self, expiration_date): The Certificate expiration date # noqa: E501 :param expiration_date: The expiration_date of this AgentCertificateExpirationData. # noqa: E501 - :type: str + :type expiration_date: str """ self._expiration_date = expiration_date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentCertificateExpirationData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_data.py b/src/clients/ctm_api_client/models/agent_data.py index 035a0ee..7d2d42d 100644 --- a/src/clients/ctm_api_client/models/agent_data.py +++ b/src/clients/ctm_api_client/models/agent_data.py @@ -5,101 +5,98 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "host": "str", - "node_id": "str", - "ctm": "str", - "ctm_host": "str", - "ctm_current_state": "str", - "current_state": "str", - "status": "str", - "status_message": "str", - "operating_system": "str", - "platform": "str", - "version": "str", - "last_update": "str", - "communication_version": "str", - "tag": "str", - "ssl_state": "str", - "host_groups": "str", - "plugins": "list[PluginData]", + openapi_types = { + 'name': 'str', + 'host': 'str', + 'node_id': 'str', + 'ctm': 'str', + 'ctm_host': 'str', + 'ctm_current_state': 'str', + 'ctm_owned_by': 'str', + 'current_state': 'str', + 'status': 'str', + 'status_message': 'str', + 'operating_system': 'str', + 'platform': 'str', + 'version': 'str', + 'last_update': 'str', + 'communication_version': 'str', + 'tag': 'str', + 'ui_props': 'UiProps', + 'ssl_state': 'str', + 'host_groups': 'str', + 'type': 'str', + 'associated_agents': 'str', + 'unique_id': 'str', + 'multiple_server_enabled': 'bool', + 'multiple_server_connections_number': 'str', + 'plugins': 'list[PluginData]' } attribute_map = { - "name": "name", - "host": "host", - "node_id": "nodeID", - "ctm": "ctm", - "ctm_host": "ctmHost", - "ctm_current_state": "ctmCurrentState", - "current_state": "currentState", - "status": "status", - "status_message": "statusMessage", - "operating_system": "operatingSystem", - "platform": "platform", - "version": "version", - "last_update": "lastUpdate", - "communication_version": "communicationVersion", - "tag": "tag", - "ssl_state": "sslState", - "host_groups": "hostGroups", - "plugins": "plugins", + 'name': 'name', + 'host': 'host', + 'node_id': 'nodeID', + 'ctm': 'ctm', + 'ctm_host': 'ctmHost', + 'ctm_current_state': 'ctmCurrentState', + 'ctm_owned_by': 'ctmOwnedBy', + 'current_state': 'currentState', + 'status': 'status', + 'status_message': 'statusMessage', + 'operating_system': 'operatingSystem', + 'platform': 'platform', + 'version': 'version', + 'last_update': 'lastUpdate', + 'communication_version': 'communicationVersion', + 'tag': 'tag', + 'ui_props': 'uiProps', + 'ssl_state': 'sslState', + 'host_groups': 'hostGroups', + 'type': 'type', + 'associated_agents': 'associatedAgents', + 'unique_id': 'uniqueID', + 'multiple_server_enabled': 'multipleServerEnabled', + 'multiple_server_connections_number': 'multipleServerConnectionsNumber', + 'plugins': 'plugins' } - def __init__( - self, - name=None, - host=None, - node_id=None, - ctm=None, - ctm_host=None, - ctm_current_state=None, - current_state=None, - status=None, - status_message=None, - operating_system=None, - platform=None, - version=None, - last_update=None, - communication_version=None, - tag=None, - ssl_state=None, - host_groups=None, - plugins=None, - _configuration=None, - ): # noqa: E501 - """AgentData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, host=None, node_id=None, ctm=None, ctm_host=None, ctm_current_state=None, ctm_owned_by=None, current_state=None, status=None, status_message=None, operating_system=None, platform=None, version=None, last_update=None, communication_version=None, tag=None, ui_props=None, ssl_state=None, host_groups=None, type=None, associated_agents=None, unique_id=None, multiple_server_enabled=None, multiple_server_connections_number=None, plugins=None, local_vars_configuration=None): # noqa: E501 + """AgentData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._host = None @@ -107,6 +104,7 @@ def __init__( self._ctm = None self._ctm_host = None self._ctm_current_state = None + self._ctm_owned_by = None self._current_state = None self._status = None self._status_message = None @@ -116,8 +114,14 @@ def __init__( self._last_update = None self._communication_version = None self._tag = None + self._ui_props = None self._ssl_state = None self._host_groups = None + self._type = None + self._associated_agents = None + self._unique_id = None + self._multiple_server_enabled = None + self._multiple_server_connections_number = None self._plugins = None self.discriminator = None @@ -133,6 +137,8 @@ def __init__( self.ctm_host = ctm_host if ctm_current_state is not None: self.ctm_current_state = ctm_current_state + if ctm_owned_by is not None: + self.ctm_owned_by = ctm_owned_by if current_state is not None: self.current_state = current_state if status is not None: @@ -151,10 +157,22 @@ def __init__( self.communication_version = communication_version if tag is not None: self.tag = tag + if ui_props is not None: + self.ui_props = ui_props if ssl_state is not None: self.ssl_state = ssl_state if host_groups is not None: self.host_groups = host_groups + if type is not None: + self.type = type + if associated_agents is not None: + self.associated_agents = associated_agents + if unique_id is not None: + self.unique_id = unique_id + if multiple_server_enabled is not None: + self.multiple_server_enabled = multiple_server_enabled + if multiple_server_connections_number is not None: + self.multiple_server_connections_number = multiple_server_connections_number if plugins is not None: self.plugins = plugins @@ -176,7 +194,7 @@ def name(self, name): The Agent name # noqa: E501 :param name: The name of this AgentData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -199,7 +217,7 @@ def host(self, host): The Agent host # noqa: E501 :param host: The host of this AgentData. # noqa: E501 - :type: str + :type host: str """ self._host = host @@ -222,7 +240,7 @@ def node_id(self, node_id): The Agent nodeID # noqa: E501 :param node_id: The node_id of this AgentData. # noqa: E501 - :type: str + :type node_id: str """ self._node_id = node_id @@ -245,7 +263,7 @@ def ctm(self, ctm): The Control-M name # noqa: E501 :param ctm: The ctm of this AgentData. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -268,7 +286,7 @@ def ctm_host(self, ctm_host): The Control-M Host # noqa: E501 :param ctm_host: The ctm_host of this AgentData. # noqa: E501 - :type: str + :type ctm_host: str """ self._ctm_host = ctm_host @@ -291,11 +309,34 @@ def ctm_current_state(self, ctm_current_state): The Control-M Host State # noqa: E501 :param ctm_current_state: The ctm_current_state of this AgentData. # noqa: E501 - :type: str + :type ctm_current_state: str """ self._ctm_current_state = ctm_current_state + @property + def ctm_owned_by(self): + """Gets the ctm_owned_by of this AgentData. # noqa: E501 + + The Control-M OwnedBy - [Helix, SelfHosted, OnBoarding, OnPrem] # noqa: E501 + + :return: The ctm_owned_by of this AgentData. # noqa: E501 + :rtype: str + """ + return self._ctm_owned_by + + @ctm_owned_by.setter + def ctm_owned_by(self, ctm_owned_by): + """Sets the ctm_owned_by of this AgentData. + + The Control-M OwnedBy - [Helix, SelfHosted, OnBoarding, OnPrem] # noqa: E501 + + :param ctm_owned_by: The ctm_owned_by of this AgentData. # noqa: E501 + :type ctm_owned_by: str + """ + + self._ctm_owned_by = ctm_owned_by + @property def current_state(self): """Gets the current_state of this AgentData. # noqa: E501 @@ -314,7 +355,7 @@ def current_state(self, current_state): The Agent current state # noqa: E501 :param current_state: The current_state of this AgentData. # noqa: E501 - :type: str + :type current_state: str """ self._current_state = current_state @@ -337,7 +378,7 @@ def status(self, status): The Agent status # noqa: E501 :param status: The status of this AgentData. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -360,7 +401,7 @@ def status_message(self, status_message): The Agent status message # noqa: E501 :param status_message: The status_message of this AgentData. # noqa: E501 - :type: str + :type status_message: str """ self._status_message = status_message @@ -383,7 +424,7 @@ def operating_system(self, operating_system): The Agent operating System # noqa: E501 :param operating_system: The operating_system of this AgentData. # noqa: E501 - :type: str + :type operating_system: str """ self._operating_system = operating_system @@ -406,7 +447,7 @@ def platform(self, platform): The Agent platform # noqa: E501 :param platform: The platform of this AgentData. # noqa: E501 - :type: str + :type platform: str """ self._platform = platform @@ -429,7 +470,7 @@ def version(self, version): The Agent version # noqa: E501 :param version: The version of this AgentData. # noqa: E501 - :type: str + :type version: str """ self._version = version @@ -452,7 +493,7 @@ def last_update(self, last_update): The Agent last update # noqa: E501 :param last_update: The last_update of this AgentData. # noqa: E501 - :type: str + :type last_update: str """ self._last_update = last_update @@ -475,7 +516,7 @@ def communication_version(self, communication_version): The Agent communication version # noqa: E501 :param communication_version: The communication_version of this AgentData. # noqa: E501 - :type: str + :type communication_version: str """ self._communication_version = communication_version @@ -498,11 +539,32 @@ def tag(self, tag): The Agent tag # noqa: E501 :param tag: The tag of this AgentData. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag + @property + def ui_props(self): + """Gets the ui_props of this AgentData. # noqa: E501 + + + :return: The ui_props of this AgentData. # noqa: E501 + :rtype: UiProps + """ + return self._ui_props + + @ui_props.setter + def ui_props(self, ui_props): + """Sets the ui_props of this AgentData. + + + :param ui_props: The ui_props of this AgentData. # noqa: E501 + :type ui_props: UiProps + """ + + self._ui_props = ui_props + @property def ssl_state(self): """Gets the ssl_state of this AgentData. # noqa: E501 @@ -521,7 +583,7 @@ def ssl_state(self, ssl_state): The Agent ssl state # noqa: E501 :param ssl_state: The ssl_state of this AgentData. # noqa: E501 - :type: str + :type ssl_state: str """ self._ssl_state = ssl_state @@ -544,11 +606,126 @@ def host_groups(self, host_groups): The Agent host groups # noqa: E501 :param host_groups: The host_groups of this AgentData. # noqa: E501 - :type: str + :type host_groups: str """ self._host_groups = host_groups + @property + def type(self): + """Gets the type of this AgentData. # noqa: E501 + + type of the host Agent or AgentLess Host # noqa: E501 + + :return: The type of this AgentData. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AgentData. + + type of the host Agent or AgentLess Host # noqa: E501 + + :param type: The type of this AgentData. # noqa: E501 + :type type: str + """ + + self._type = type + + @property + def associated_agents(self): + """Gets the associated_agents of this AgentData. # noqa: E501 + + list of the associated agents seperated by comma # noqa: E501 + + :return: The associated_agents of this AgentData. # noqa: E501 + :rtype: str + """ + return self._associated_agents + + @associated_agents.setter + def associated_agents(self, associated_agents): + """Sets the associated_agents of this AgentData. + + list of the associated agents seperated by comma # noqa: E501 + + :param associated_agents: The associated_agents of this AgentData. # noqa: E501 + :type associated_agents: str + """ + + self._associated_agents = associated_agents + + @property + def unique_id(self): + """Gets the unique_id of this AgentData. # noqa: E501 + + The Agent unique ID # noqa: E501 + + :return: The unique_id of this AgentData. # noqa: E501 + :rtype: str + """ + return self._unique_id + + @unique_id.setter + def unique_id(self, unique_id): + """Sets the unique_id of this AgentData. + + The Agent unique ID # noqa: E501 + + :param unique_id: The unique_id of this AgentData. # noqa: E501 + :type unique_id: str + """ + + self._unique_id = unique_id + + @property + def multiple_server_enabled(self): + """Gets the multiple_server_enabled of this AgentData. # noqa: E501 + + The Agent multiple server enabled indication # noqa: E501 + + :return: The multiple_server_enabled of this AgentData. # noqa: E501 + :rtype: bool + """ + return self._multiple_server_enabled + + @multiple_server_enabled.setter + def multiple_server_enabled(self, multiple_server_enabled): + """Sets the multiple_server_enabled of this AgentData. + + The Agent multiple server enabled indication # noqa: E501 + + :param multiple_server_enabled: The multiple_server_enabled of this AgentData. # noqa: E501 + :type multiple_server_enabled: bool + """ + + self._multiple_server_enabled = multiple_server_enabled + + @property + def multiple_server_connections_number(self): + """Gets the multiple_server_connections_number of this AgentData. # noqa: E501 + + The Agent multiple server number of connections # noqa: E501 + + :return: The multiple_server_connections_number of this AgentData. # noqa: E501 + :rtype: str + """ + return self._multiple_server_connections_number + + @multiple_server_connections_number.setter + def multiple_server_connections_number(self, multiple_server_connections_number): + """Sets the multiple_server_connections_number of this AgentData. + + The Agent multiple server number of connections # noqa: E501 + + :param multiple_server_connections_number: The multiple_server_connections_number of this AgentData. # noqa: E501 + :type multiple_server_connections_number: str + """ + + self._multiple_server_connections_number = multiple_server_connections_number + @property def plugins(self): """Gets the plugins of this AgentData. # noqa: E501 @@ -565,37 +742,40 @@ def plugins(self, plugins): :param plugins: The plugins of this AgentData. # noqa: E501 - :type: list[PluginData] + :type plugins: list[PluginData] """ self._plugins = plugins - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_debug_information.py b/src/clients/ctm_api_client/models/agent_debug_information.py index 38e419c..0bdc59b 100644 --- a/src/clients/ctm_api_client/models/agent_debug_information.py +++ b/src/clients/ctm_api_client/models/agent_debug_information.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentDebugInformation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"diagnostic_level": "int", "communication_trace": "bool"} + openapi_types = { + 'diagnostic_level': 'int', + 'communication_trace': 'bool' + } attribute_map = { - "diagnostic_level": "diagnosticLevel", - "communication_trace": "communicationTrace", + 'diagnostic_level': 'diagnosticLevel', + 'communication_trace': 'communicationTrace' } - def __init__( - self, diagnostic_level=None, communication_trace=None, _configuration=None - ): # noqa: E501 - """AgentDebugInformation - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, diagnostic_level=None, communication_trace=None, local_vars_configuration=None): # noqa: E501 + """AgentDebugInformation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._diagnostic_level = None self._communication_trace = None @@ -72,12 +77,10 @@ def diagnostic_level(self, diagnostic_level): Level of application logging. HIDDEN # noqa: E501 :param diagnostic_level: The diagnostic_level of this AgentDebugInformation. # noqa: E501 - :type: int + :type diagnostic_level: int """ - if self._configuration.client_side_validation and diagnostic_level is None: - raise ValueError( - "Invalid value for `diagnostic_level`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and diagnostic_level is None: # noqa: E501 + raise ValueError("Invalid value for `diagnostic_level`, must not be `None`") # noqa: E501 self._diagnostic_level = diagnostic_level @@ -99,41 +102,42 @@ def communication_trace(self, communication_trace): Indicates whether communication data is collected. HIDDEN # noqa: E501 :param communication_trace: The communication_trace of this AgentDebugInformation. # noqa: E501 - :type: bool + :type communication_trace: bool """ - if self._configuration.client_side_validation and communication_trace is None: - raise ValueError( - "Invalid value for `communication_trace`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and communication_trace is None: # noqa: E501 + raise ValueError("Invalid value for `communication_trace`, must not be `None`") # noqa: E501 self._communication_trace = communication_trace - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentDebugInformation, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_details.py b/src/clients/ctm_api_client/models/agent_details.py index 271f9fe..2cc7558 100644 --- a/src/clients/ctm_api_client/models/agent_details.py +++ b/src/clients/ctm_api_client/models/agent_details.py @@ -5,68 +5,73 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "nodeid": "str", - "status": "str", - "hostgroups": "list[str]", - "version": "str", - "operating_system": "str", + openapi_types = { + 'nodeid': 'str', + 'status': 'str', + 'hostgroups': 'list[str]', + 'version': 'str', + 'operating_system': 'str', + 'tag': 'str', + 'type': 'str', + 'associated_agents': 'list[str]' } attribute_map = { - "nodeid": "nodeid", - "status": "status", - "hostgroups": "hostgroups", - "version": "version", - "operating_system": "operatingSystem", + 'nodeid': 'nodeid', + 'status': 'status', + 'hostgroups': 'hostgroups', + 'version': 'version', + 'operating_system': 'operatingSystem', + 'tag': 'tag', + 'type': 'type', + 'associated_agents': 'associatedAgents' } - def __init__( - self, - nodeid=None, - status=None, - hostgroups=None, - version=None, - operating_system=None, - _configuration=None, - ): # noqa: E501 - """AgentDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, nodeid=None, status=None, hostgroups=None, version=None, operating_system=None, tag=None, type=None, associated_agents=None, local_vars_configuration=None): # noqa: E501 + """AgentDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._nodeid = None self._status = None self._hostgroups = None self._version = None self._operating_system = None + self._tag = None + self._type = None + self._associated_agents = None self.discriminator = None if nodeid is not None: @@ -79,6 +84,12 @@ def __init__( self.version = version if operating_system is not None: self.operating_system = operating_system + if tag is not None: + self.tag = tag + if type is not None: + self.type = type + if associated_agents is not None: + self.associated_agents = associated_agents @property def nodeid(self): @@ -98,7 +109,7 @@ def nodeid(self, nodeid): agent machine # noqa: E501 :param nodeid: The nodeid of this AgentDetails. # noqa: E501 - :type: str + :type nodeid: str """ self._nodeid = nodeid @@ -121,7 +132,7 @@ def status(self, status): agent status # noqa: E501 :param status: The status of this AgentDetails. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -144,7 +155,7 @@ def hostgroups(self, hostgroups): list of hostgroups names containing the agent # noqa: E501 :param hostgroups: The hostgroups of this AgentDetails. # noqa: E501 - :type: list[str] + :type hostgroups: list[str] """ self._hostgroups = hostgroups @@ -167,7 +178,7 @@ def version(self, version): agent version string i.e. - 9.0.20.080 # noqa: E501 :param version: The version of this AgentDetails. # noqa: E501 - :type: str + :type version: str """ self._version = version @@ -190,37 +201,109 @@ def operating_system(self, operating_system): agent operating system long name i.e - Microsoft Windows Server 2016 (Build 14393) # noqa: E501 :param operating_system: The operating_system of this AgentDetails. # noqa: E501 - :type: str + :type operating_system: str """ self._operating_system = operating_system - def to_dict(self): + @property + def tag(self): + """Gets the tag of this AgentDetails. # noqa: E501 + + the agent tag # noqa: E501 + + :return: The tag of this AgentDetails. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this AgentDetails. + + the agent tag # noqa: E501 + + :param tag: The tag of this AgentDetails. # noqa: E501 + :type tag: str + """ + + self._tag = tag + + @property + def type(self): + """Gets the type of this AgentDetails. # noqa: E501 + + The type of the host - agent or agentless host # noqa: E501 + + :return: The type of this AgentDetails. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AgentDetails. + + The type of the host - agent or agentless host # noqa: E501 + + :param type: The type of this AgentDetails. # noqa: E501 + :type type: str + """ + + self._type = type + + @property + def associated_agents(self): + """Gets the associated_agents of this AgentDetails. # noqa: E501 + + The associated agents if type is agentless # noqa: E501 + + :return: The associated_agents of this AgentDetails. # noqa: E501 + :rtype: list[str] + """ + return self._associated_agents + + @associated_agents.setter + def associated_agents(self, associated_agents): + """Sets the associated_agents of this AgentDetails. + + The associated agents if type is agentless # noqa: E501 + + :param associated_agents: The associated_agents of this AgentDetails. # noqa: E501 + :type associated_agents: list[str] + """ + + self._associated_agents = associated_agents + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_details_list.py b/src/clients/ctm_api_client/models/agent_details_list.py index c6ac240..4a590ff 100644 --- a/src/clients/ctm_api_client/models/agent_details_list.py +++ b/src/clients/ctm_api_client/models/agent_details_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentDetailsList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"agents": "list[AgentDetails]"} + openapi_types = { + 'agents': 'list[AgentDetails]' + } - attribute_map = {"agents": "agents"} + attribute_map = { + 'agents': 'agents' + } - def __init__(self, agents=None, _configuration=None): # noqa: E501 - """AgentDetailsList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, agents=None, local_vars_configuration=None): # noqa: E501 + """AgentDetailsList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._agents = None self.discriminator = None @@ -64,37 +72,40 @@ def agents(self, agents): :param agents: The agents of this AgentDetailsList. # noqa: E501 - :type: list[AgentDetails] + :type agents: list[AgentDetails] """ self._agents = agents - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentDetailsList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_in_group_params.py b/src/clients/ctm_api_client/models/agent_in_group_params.py index 441ed41..8f0e0e3 100644 --- a/src/clients/ctm_api_client/models/agent_in_group_params.py +++ b/src/clients/ctm_api_client/models/agent_in_group_params.py @@ -5,58 +5,65 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentInGroupParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "host": "str", - "hostgroup_agent_participation": "HostgroupAgentParticipation", + openapi_types = { + 'host': 'str', + 'hostgroup_agent_participation': 'HostgroupAgentParticipation', + 'participation_rules': 'list[ParticipationRule]' } attribute_map = { - "host": "host", - "hostgroup_agent_participation": "hostgroupAgentParticipation", + 'host': 'host', + 'hostgroup_agent_participation': 'hostgroupAgentParticipation', + 'participation_rules': 'participationRules' } - def __init__( - self, host=None, hostgroup_agent_participation=None, _configuration=None - ): # noqa: E501 - """AgentInGroupParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, host=None, hostgroup_agent_participation=None, participation_rules=None, local_vars_configuration=None): # noqa: E501 + """AgentInGroupParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host = None self._hostgroup_agent_participation = None + self._participation_rules = None self.discriminator = None self.host = host if hostgroup_agent_participation is not None: self.hostgroup_agent_participation = hostgroup_agent_participation + if participation_rules is not None: + self.participation_rules = participation_rules @property def host(self): @@ -76,12 +83,10 @@ def host(self, host): The hostname of the agent. # noqa: E501 :param host: The host of this AgentInGroupParams. # noqa: E501 - :type: str + :type host: str """ - if self._configuration.client_side_validation and host is None: - raise ValueError( - "Invalid value for `host`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and host is None: # noqa: E501 + raise ValueError("Invalid value for `host`, must not be `None`") # noqa: E501 self._host = host @@ -89,7 +94,6 @@ def host(self, host): def hostgroup_agent_participation(self): """Gets the hostgroup_agent_participation of this AgentInGroupParams. # noqa: E501 - The host condition. HIDDEN. # noqa: E501 :return: The hostgroup_agent_participation of this AgentInGroupParams. # noqa: E501 :rtype: HostgroupAgentParticipation @@ -100,40 +104,65 @@ def hostgroup_agent_participation(self): def hostgroup_agent_participation(self, hostgroup_agent_participation): """Sets the hostgroup_agent_participation of this AgentInGroupParams. - The host condition. HIDDEN. # noqa: E501 :param hostgroup_agent_participation: The hostgroup_agent_participation of this AgentInGroupParams. # noqa: E501 - :type: HostgroupAgentParticipation + :type hostgroup_agent_participation: HostgroupAgentParticipation """ self._hostgroup_agent_participation = hostgroup_agent_participation - def to_dict(self): + @property + def participation_rules(self): + """Gets the participation_rules of this AgentInGroupParams. # noqa: E501 + + The host condition. HIDDEN. # noqa: E501 + + :return: The participation_rules of this AgentInGroupParams. # noqa: E501 + :rtype: list[ParticipationRule] + """ + return self._participation_rules + + @participation_rules.setter + def participation_rules(self, participation_rules): + """Sets the participation_rules of this AgentInGroupParams. + + The host condition. HIDDEN. # noqa: E501 + + :param participation_rules: The participation_rules of this AgentInGroupParams. # noqa: E501 + :type participation_rules: list[ParticipationRule] + """ + + self._participation_rules = participation_rules + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentInGroupParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_in_group_params_list.py b/src/clients/ctm_api_client/models/agent_in_group_params_list.py index cf01565..cfcc19b 100644 --- a/src/clients/ctm_api_client/models/agent_in_group_params_list.py +++ b/src/clients/ctm_api_client/models/agent_in_group_params_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentInGroupParamsList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"agentslist": "list[AgentInGroupParams]"} + openapi_types = { + 'agentslist': 'list[AgentInGroupParams]' + } - attribute_map = {"agentslist": "agentslist"} + attribute_map = { + 'agentslist': 'agentslist' + } - def __init__(self, agentslist=None, _configuration=None): # noqa: E501 - """AgentInGroupParamsList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, agentslist=None, local_vars_configuration=None): # noqa: E501 + """AgentInGroupParamsList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._agentslist = None self.discriminator = None @@ -64,37 +72,40 @@ def agentslist(self, agentslist): :param agentslist: The agentslist of this AgentInGroupParamsList. # noqa: E501 - :type: list[AgentInGroupParams] + :type agentslist: list[AgentInGroupParams] """ self._agentslist = agentslist - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentInGroupParamsList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_in_hostgroup.py b/src/clients/ctm_api_client/models/agent_in_hostgroup.py index ef72cde..38f0c1f 100644 --- a/src/clients/ctm_api_client/models/agent_in_hostgroup.py +++ b/src/clients/ctm_api_client/models/agent_in_hostgroup.py @@ -5,67 +5,75 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentInHostgroup(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "host": "str", - "tag": "str", - "hostgroup_agent_participation": "HostgroupAgentParticipation", + openapi_types = { + 'host': 'str', + 'application_type': 'str', + 'tag': 'str', + 'hostgroup_agent_participation': 'HostgroupAgentParticipation', + 'participation_rules': 'list[ParticipationRule]' } attribute_map = { - "host": "host", - "tag": "tag", - "hostgroup_agent_participation": "hostgroupAgentParticipation", + 'host': 'host', + 'application_type': 'applicationType', + 'tag': 'tag', + 'hostgroup_agent_participation': 'hostgroupAgentParticipation', + 'participation_rules': 'participationRules' } - def __init__( - self, - host=None, - tag=None, - hostgroup_agent_participation=None, - _configuration=None, - ): # noqa: E501 - """AgentInHostgroup - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, host=None, application_type=None, tag=None, hostgroup_agent_participation=None, participation_rules=None, local_vars_configuration=None): # noqa: E501 + """AgentInHostgroup - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host = None + self._application_type = None self._tag = None self._hostgroup_agent_participation = None + self._participation_rules = None self.discriminator = None self.host = host + if application_type is not None: + self.application_type = application_type if tag is not None: self.tag = tag if hostgroup_agent_participation is not None: self.hostgroup_agent_participation = hostgroup_agent_participation + if participation_rules is not None: + self.participation_rules = participation_rules @property def host(self): @@ -85,15 +93,36 @@ def host(self, host): The hostname of the agent. # noqa: E501 :param host: The host of this AgentInHostgroup. # noqa: E501 - :type: str + :type host: str """ - if self._configuration.client_side_validation and host is None: - raise ValueError( - "Invalid value for `host`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and host is None: # noqa: E501 + raise ValueError("Invalid value for `host`, must not be `None`") # noqa: E501 self._host = host + @property + def application_type(self): + """Gets the application_type of this AgentInHostgroup. # noqa: E501 + + Host Group application type. HIDDEN. # noqa: E501 + + :return: The application_type of this AgentInHostgroup. # noqa: E501 + :rtype: str + """ + return self._application_type + + @application_type.setter + def application_type(self, application_type): + """Sets the application_type of this AgentInHostgroup. + + Host Group application type. HIDDEN. # noqa: E501 + + :param application_type: The application_type of this AgentInHostgroup. # noqa: E501 + :type application_type: str + """ + + self._application_type = application_type + @property def tag(self): """Gets the tag of this AgentInHostgroup. # noqa: E501 @@ -112,7 +141,7 @@ def tag(self, tag): Host Group tag. HIDDEN. # noqa: E501 :param tag: The tag of this AgentInHostgroup. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag @@ -121,7 +150,6 @@ def tag(self, tag): def hostgroup_agent_participation(self): """Gets the hostgroup_agent_participation of this AgentInHostgroup. # noqa: E501 - The host condition. HIDDEN. # noqa: E501 :return: The hostgroup_agent_participation of this AgentInHostgroup. # noqa: E501 :rtype: HostgroupAgentParticipation @@ -132,40 +160,65 @@ def hostgroup_agent_participation(self): def hostgroup_agent_participation(self, hostgroup_agent_participation): """Sets the hostgroup_agent_participation of this AgentInHostgroup. - The host condition. HIDDEN. # noqa: E501 :param hostgroup_agent_participation: The hostgroup_agent_participation of this AgentInHostgroup. # noqa: E501 - :type: HostgroupAgentParticipation + :type hostgroup_agent_participation: HostgroupAgentParticipation """ self._hostgroup_agent_participation = hostgroup_agent_participation - def to_dict(self): + @property + def participation_rules(self): + """Gets the participation_rules of this AgentInHostgroup. # noqa: E501 + + The host condition. HIDDEN. # noqa: E501 + + :return: The participation_rules of this AgentInHostgroup. # noqa: E501 + :rtype: list[ParticipationRule] + """ + return self._participation_rules + + @participation_rules.setter + def participation_rules(self, participation_rules): + """Sets the participation_rules of this AgentInHostgroup. + + The host condition. HIDDEN. # noqa: E501 + + :param participation_rules: The participation_rules of this AgentInHostgroup. # noqa: E501 + :type participation_rules: list[ParticipationRule] + """ + + self._participation_rules = participation_rules + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentInHostgroup, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_info.py b/src/clients/ctm_api_client/models/agent_info.py index 3db3e29..cbb2f38 100644 --- a/src/clients/ctm_api_client/models/agent_info.py +++ b/src/clients/ctm_api_client/models/agent_info.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"node_id": "str", "ctm": "str"} - - attribute_map = {"node_id": "nodeID", "ctm": "ctm"} - - def __init__(self, node_id=None, ctm=None, _configuration=None): # noqa: E501 - """AgentInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'node_id': 'str', + 'ctm': 'str' + } + + attribute_map = { + 'node_id': 'nodeID', + 'ctm': 'ctm' + } + + def __init__(self, node_id=None, ctm=None, local_vars_configuration=None): # noqa: E501 + """AgentInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._node_id = None self._ctm = None @@ -67,12 +77,10 @@ def node_id(self, node_id): The Agent nodeID # noqa: E501 :param node_id: The node_id of this AgentInfo. # noqa: E501 - :type: str + :type node_id: str """ - if self._configuration.client_side_validation and node_id is None: - raise ValueError( - "Invalid value for `node_id`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and node_id is None: # noqa: E501 + raise ValueError("Invalid value for `node_id`, must not be `None`") # noqa: E501 self._node_id = node_id @@ -94,41 +102,42 @@ def ctm(self, ctm): The Control-M name # noqa: E501 :param ctm: The ctm of this AgentInfo. # noqa: E501 - :type: str + :type ctm: str """ - if self._configuration.client_side_validation and ctm is None: - raise ValueError( - "Invalid value for `ctm`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and ctm is None: # noqa: E501 + raise ValueError("Invalid value for `ctm`, must not be `None`") # noqa: E501 self._ctm = ctm - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_info_result.py b/src/clients/ctm_api_client/models/agent_info_result.py index 0a6d9c0..45fb921 100644 --- a/src/clients/ctm_api_client/models/agent_info_result.py +++ b/src/clients/ctm_api_client/models/agent_info_result.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentInfoResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"node_id": "str", "ctm": "str", "err_msg": "str"} - - attribute_map = {"node_id": "nodeID", "ctm": "ctm", "err_msg": "errMsg"} - - def __init__( - self, node_id=None, ctm=None, err_msg=None, _configuration=None - ): # noqa: E501 - """AgentInfoResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'node_id': 'str', + 'ctm': 'str', + 'err_msg': 'str' + } + + attribute_map = { + 'node_id': 'nodeID', + 'ctm': 'ctm', + 'err_msg': 'errMsg' + } + + def __init__(self, node_id=None, ctm=None, err_msg=None, local_vars_configuration=None): # noqa: E501 + """AgentInfoResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._node_id = None self._ctm = None @@ -72,12 +82,10 @@ def node_id(self, node_id): The Agent nodeID # noqa: E501 :param node_id: The node_id of this AgentInfoResult. # noqa: E501 - :type: str + :type node_id: str """ - if self._configuration.client_side_validation and node_id is None: - raise ValueError( - "Invalid value for `node_id`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and node_id is None: # noqa: E501 + raise ValueError("Invalid value for `node_id`, must not be `None`") # noqa: E501 self._node_id = node_id @@ -99,12 +107,10 @@ def ctm(self, ctm): The Control-M name # noqa: E501 :param ctm: The ctm of this AgentInfoResult. # noqa: E501 - :type: str + :type ctm: str """ - if self._configuration.client_side_validation and ctm is None: - raise ValueError( - "Invalid value for `ctm`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and ctm is None: # noqa: E501 + raise ValueError("Invalid value for `ctm`, must not be `None`") # noqa: E501 self._ctm = ctm @@ -126,37 +132,40 @@ def err_msg(self, err_msg): Error message that describes why action is failed # noqa: E501 :param err_msg: The err_msg of this AgentInfoResult. # noqa: E501 - :type: str + :type err_msg: str """ self._err_msg = err_msg - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentInfoResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_mng_auth.py b/src/clients/ctm_api_client/models/agent_mng_auth.py index ae0981b..a37cbff 100644 --- a/src/clients/ctm_api_client/models/agent_mng_auth.py +++ b/src/clients/ctm_api_client/models/agent_mng_auth.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentMngAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"controlm_server": "str", "agent": "str", "privilege": "str"} + openapi_types = { + 'controlm_server': 'str', + 'agent': 'str', + 'privilege': 'str' + } attribute_map = { - "controlm_server": "ControlmServer", - "agent": "Agent", - "privilege": "Privilege", + 'controlm_server': 'ControlmServer', + 'agent': 'Agent', + 'privilege': 'Privilege' } - def __init__( - self, controlm_server=None, agent=None, privilege=None, _configuration=None - ): # noqa: E501 - """AgentMngAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, controlm_server=None, agent=None, privilege=None, local_vars_configuration=None): # noqa: E501 + """AgentMngAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._controlm_server = None self._agent = None @@ -78,7 +84,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this AgentMngAuth. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -101,7 +107,7 @@ def agent(self, agent): agent name # noqa: E501 :param agent: The agent of this AgentMngAuth. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -124,37 +130,40 @@ def privilege(self, privilege): access level (full, update, browse) # noqa: E501 :param privilege: The privilege of this AgentMngAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentMngAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_sys_param_set_data.py b/src/clients/ctm_api_client/models/agent_sys_param_set_data.py index c3cd931..49015aa 100644 --- a/src/clients/ctm_api_client/models/agent_sys_param_set_data.py +++ b/src/clients/ctm_api_client/models/agent_sys_param_set_data.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentSysParamSetData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "param": "str", - "value": "str", - "table": "str", - "validation": "str", - "agents": "list[AgentInfo]", + openapi_types = { + 'param': 'str', + 'value': 'str', + 'table': 'str', + 'validation': 'str', + 'agents': 'list[AgentInfo]' } attribute_map = { - "param": "param", - "value": "value", - "table": "table", - "validation": "validation", - "agents": "agents", + 'param': 'param', + 'value': 'value', + 'table': 'table', + 'validation': 'validation', + 'agents': 'agents' } - def __init__( - self, - param=None, - value=None, - table=None, - validation=None, - agents=None, - _configuration=None, - ): # noqa: E501 - """AgentSysParamSetData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, param=None, value=None, table=None, validation=None, agents=None, local_vars_configuration=None): # noqa: E501 + """AgentSysParamSetData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._param = None self._value = None @@ -98,7 +94,7 @@ def param(self, param): The name of parameter. # noqa: E501 :param param: The param of this AgentSysParamSetData. # noqa: E501 - :type: str + :type param: str """ self._param = param @@ -121,7 +117,7 @@ def value(self, value): The new value for specified parameter. # noqa: E501 :param value: The value of this AgentSysParamSetData. # noqa: E501 - :type: str + :type value: str """ self._value = value @@ -144,7 +140,7 @@ def table(self, table): The table of the parameter. # noqa: E501 :param table: The table of this AgentSysParamSetData. # noqa: E501 - :type: str + :type table: str """ self._table = table @@ -167,7 +163,7 @@ def validation(self, validation): The validation type of the parameter. # noqa: E501 :param validation: The validation of this AgentSysParamSetData. # noqa: E501 - :type: str + :type validation: str """ self._validation = validation @@ -190,37 +186,40 @@ def agents(self, agents): List of agents where parameter will be updated. # noqa: E501 :param agents: The agents of this AgentSysParamSetData. # noqa: E501 - :type: list[AgentInfo] + :type agents: list[AgentInfo] """ self._agents = agents - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentSysParamSetData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_sys_param_set_success_data.py b/src/clients/ctm_api_client/models/agent_sys_param_set_success_data.py index 950cde9..545a25d 100644 --- a/src/clients/ctm_api_client/models/agent_sys_param_set_success_data.py +++ b/src/clients/ctm_api_client/models/agent_sys_param_set_success_data.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentSysParamSetSuccessData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str", "unsuccess_agents": "list[AgentInfoResult]"} - - attribute_map = {"message": "message", "unsuccess_agents": "unsuccessAgents"} - - def __init__( - self, message=None, unsuccess_agents=None, _configuration=None - ): # noqa: E501 - """AgentSysParamSetSuccessData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'message': 'str', + 'unsuccess_agents': 'list[AgentInfoResult]' + } + + attribute_map = { + 'message': 'message', + 'unsuccess_agents': 'unsuccessAgents' + } + + def __init__(self, message=None, unsuccess_agents=None, local_vars_configuration=None): # noqa: E501 + """AgentSysParamSetSuccessData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._unsuccess_agents = None @@ -71,7 +79,7 @@ def message(self, message): The success message that describes the action. # noqa: E501 :param message: The message of this AgentSysParamSetSuccessData. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -94,37 +102,40 @@ def unsuccess_agents(self, unsuccess_agents): List of the agents where parameter was not set. # noqa: E501 :param unsuccess_agents: The unsuccess_agents of this AgentSysParamSetSuccessData. # noqa: E501 - :type: list[AgentInfoResult] + :type unsuccess_agents: list[AgentInfoResult] """ self._unsuccess_agents = unsuccess_agents - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentSysParamSetSuccessData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_tables_name.py b/src/clients/ctm_api_client/models/agent_tables_name.py index 26620f3..cdc056e 100644 --- a/src/clients/ctm_api_client/models/agent_tables_name.py +++ b/src/clients/ctm_api_client/models/agent_tables_name.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentTablesName(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"tables": "list[str]"} + openapi_types = { + 'tables': 'list[str]' + } - attribute_map = {"tables": "tables"} + attribute_map = { + 'tables': 'tables' + } - def __init__(self, tables=None, _configuration=None): # noqa: E501 - """AgentTablesName - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, tables=None, local_vars_configuration=None): # noqa: E501 + """AgentTablesName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._tables = None self.discriminator = None @@ -64,37 +72,40 @@ def tables(self, tables): :param tables: The tables of this AgentTablesName. # noqa: E501 - :type: list[str] + :type tables: list[str] """ self._tables = tables - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentTablesName, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agent_thing_properties.py b/src/clients/ctm_api_client/models/agent_thing_properties.py index 596ce66..83f68cc 100644 --- a/src/clients/ctm_api_client/models/agent_thing_properties.py +++ b/src/clients/ctm_api_client/models/agent_thing_properties.py @@ -5,48 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentThingProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "physical_name": "str", "tag": "str"} - - attribute_map = {"name": "name", "physical_name": "physicalName", "tag": "tag"} - - def __init__( - self, name=None, physical_name=None, tag=None, _configuration=None - ): # noqa: E501 - """AgentThingProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'physical_name': 'str', + 'tag': 'str', + 'server': 'str', + 'recreate_sqs': 'bool' + } + + attribute_map = { + 'name': 'name', + 'physical_name': 'physicalName', + 'tag': 'tag', + 'server': 'server', + 'recreate_sqs': 'recreateSqs' + } + + def __init__(self, name=None, physical_name=None, tag=None, server=None, recreate_sqs=None, local_vars_configuration=None): # noqa: E501 + """AgentThingProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._physical_name = None self._tag = None + self._server = None + self._recreate_sqs = None self.discriminator = None if name is not None: @@ -55,6 +71,10 @@ def __init__( self.physical_name = physical_name if tag is not None: self.tag = tag + if server is not None: + self.server = server + if recreate_sqs is not None: + self.recreate_sqs = recreate_sqs @property def name(self): @@ -74,7 +94,7 @@ def name(self, name): the logical name to be used for new agent (equivilant to NodeId) # noqa: E501 :param name: The name of this AgentThingProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -97,7 +117,7 @@ def physical_name(self, physical_name): the physical name of the thing the agent is installed on # noqa: E501 :param physical_name: The physical_name of this AgentThingProperties. # noqa: E501 - :type: str + :type physical_name: str """ self._physical_name = physical_name @@ -120,37 +140,86 @@ def tag(self, tag): the agent tag to be associated with the new agent (CMS RBA permissions tag that is) # noqa: E501 :param tag: The tag of this AgentThingProperties. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag - def to_dict(self): + @property + def server(self): + """Gets the server of this AgentThingProperties. # noqa: E501 + + the server name to be used for new agent # noqa: E501 + + :return: The server of this AgentThingProperties. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this AgentThingProperties. + + the server name to be used for new agent # noqa: E501 + + :param server: The server of this AgentThingProperties. # noqa: E501 + :type server: str + """ + + self._server = server + + @property + def recreate_sqs(self): + """Gets the recreate_sqs of this AgentThingProperties. # noqa: E501 + + This parameter would signal CTMS to recreate the SQS as needed. # noqa: E501 + + :return: The recreate_sqs of this AgentThingProperties. # noqa: E501 + :rtype: bool + """ + return self._recreate_sqs + + @recreate_sqs.setter + def recreate_sqs(self, recreate_sqs): + """Sets the recreate_sqs of this AgentThingProperties. + + This parameter would signal CTMS to recreate the SQS as needed. # noqa: E501 + + :param recreate_sqs: The recreate_sqs of this AgentThingProperties. # noqa: E501 + :type recreate_sqs: bool + """ + + self._recreate_sqs = recreate_sqs + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentThingProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agents_data_list.py b/src/clients/ctm_api_client/models/agents_data_list.py deleted file mode 100644 index aa90085..0000000 --- a/src/clients/ctm_api_client/models/agents_data_list.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class AgentsDataList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """AgentsDataList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(AgentsDataList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentsDataList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentsDataList): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/agents_in_group_list_result.py b/src/clients/ctm_api_client/models/agents_in_group_list_result.py deleted file mode 100644 index 006f71b..0000000 --- a/src/clients/ctm_api_client/models/agents_in_group_list_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class AgentsInGroupListResult(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """AgentsInGroupListResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(AgentsInGroupListResult, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentsInGroupListResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentsInGroupListResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/agents_in_group_success_data.py b/src/clients/ctm_api_client/models/agents_in_group_success_data.py index e886234..81156d8 100644 --- a/src/clients/ctm_api_client/models/agents_in_group_success_data.py +++ b/src/clients/ctm_api_client/models/agents_in_group_success_data.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentsInGroupSuccessData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str", "agents": "list[AgentInGroupParams]"} - - attribute_map = {"message": "message", "agents": "agents"} - - def __init__(self, message=None, agents=None, _configuration=None): # noqa: E501 - """AgentsInGroupSuccessData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'message': 'str', + 'agents': 'list[AgentInGroupParams]' + } + + attribute_map = { + 'message': 'message', + 'agents': 'agents' + } + + def __init__(self, message=None, agents=None, local_vars_configuration=None): # noqa: E501 + """AgentsInGroupSuccessData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._agents = None @@ -69,7 +79,7 @@ def message(self, message): The success message that describes the performed action. # noqa: E501 :param message: The message of this AgentsInGroupSuccessData. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -92,37 +102,40 @@ def agents(self, agents): List of the items remained after the action. # noqa: E501 :param agents: The agents of this AgentsInGroupSuccessData. # noqa: E501 - :type: list[AgentInGroupParams] + :type agents: list[AgentInGroupParams] """ self._agents = agents - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentsInGroupSuccessData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/agents_sys_param_set_data.py b/src/clients/ctm_api_client/models/agents_sys_param_set_data.py index 7da43eb..173d509 100644 --- a/src/clients/ctm_api_client/models/agents_sys_param_set_data.py +++ b/src/clients/ctm_api_client/models/agents_sys_param_set_data.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AgentsSysParamSetData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"params_data": "list[AgentSysParamSetData]"} + openapi_types = { + 'params_data': 'list[AgentSysParamSetData]' + } - attribute_map = {"params_data": "paramsData"} + attribute_map = { + 'params_data': 'paramsData' + } - def __init__(self, params_data=None, _configuration=None): # noqa: E501 - """AgentsSysParamSetData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, params_data=None, local_vars_configuration=None): # noqa: E501 + """AgentsSysParamSetData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._params_data = None self.discriminator = None @@ -66,37 +74,40 @@ def params_data(self, params_data): The list of agent parameters set data. # noqa: E501 :param params_data: The params_data of this AgentsSysParamSetData. # noqa: E501 - :type: list[AgentSysParamSetData] + :type params_data: list[AgentSysParamSetData] """ self._params_data = params_data - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AgentsSysParamSetData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ai_deploy_response.py b/src/clients/ctm_api_client/models/ai_deploy_response.py index 41ba11f..f42fa06 100644 --- a/src/clients/ctm_api_client/models/ai_deploy_response.py +++ b/src/clients/ctm_api_client/models/ai_deploy_response.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AiDeployResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str"} + openapi_types = { + 'message': 'str' + } - attribute_map = {"message": "message"} + attribute_map = { + 'message': 'message' + } - def __init__(self, message=None, _configuration=None): # noqa: E501 - """AiDeployResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, message=None, local_vars_configuration=None): # noqa: E501 + """AiDeployResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self.discriminator = None @@ -66,37 +74,40 @@ def message(self, message): response message # noqa: E501 :param message: The message of this AiDeployResponse. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AiDeployResponse, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ai_error.py b/src/clients/ctm_api_client/models/ai_error.py index 62b03d4..9d14447 100644 --- a/src/clients/ctm_api_client/models/ai_error.py +++ b/src/clients/ctm_api_client/models/ai_error.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AiError(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str", "status": "int"} - - attribute_map = {"message": "message", "status": "status"} - - def __init__(self, message=None, status=None, _configuration=None): # noqa: E501 - """AiError - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'message': 'str', + 'status': 'int' + } + + attribute_map = { + 'message': 'message', + 'status': 'status' + } + + def __init__(self, message=None, status=None, local_vars_configuration=None): # noqa: E501 + """AiError - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._status = None @@ -69,7 +79,7 @@ def message(self, message): Error message # noqa: E501 :param message: The message of this AiError. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -92,37 +102,40 @@ def status(self, status): Http status code # noqa: E501 :param status: The status of this AiError. # noqa: E501 - :type: int + :type status: int """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AiError, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ai_jobtype.py b/src/clients/ctm_api_client/models/ai_jobtype.py index 4ff7323..0e6b4f3 100644 --- a/src/clients/ctm_api_client/models/ai_jobtype.py +++ b/src/clients/ctm_api_client/models/ai_jobtype.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AiJobtype(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "job_type_name": "str", - "job_type_id": "str", - "status": "str", - "description": "str", + openapi_types = { + 'job_type_name': 'str', + 'job_type_id': 'str', + 'status': 'str', + 'description': 'str' } attribute_map = { - "job_type_name": "jobTypeName", - "job_type_id": "jobTypeId", - "status": "status", - "description": "description", + 'job_type_name': 'jobTypeName', + 'job_type_id': 'jobTypeId', + 'status': 'status', + 'description': 'description' } - def __init__( - self, - job_type_name=None, - job_type_id=None, - status=None, - description=None, - _configuration=None, - ): # noqa: E501 - """AiJobtype - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, job_type_name=None, job_type_id=None, status=None, description=None, local_vars_configuration=None): # noqa: E501 + """AiJobtype - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._job_type_name = None self._job_type_id = None @@ -92,7 +89,7 @@ def job_type_name(self, job_type_name): Jobtype display name # noqa: E501 :param job_type_name: The job_type_name of this AiJobtype. # noqa: E501 - :type: str + :type job_type_name: str """ self._job_type_name = job_type_name @@ -115,7 +112,7 @@ def job_type_id(self, job_type_id): Jobtype internal appname # noqa: E501 :param job_type_id: The job_type_id of this AiJobtype. # noqa: E501 - :type: str + :type job_type_id: str """ self._job_type_id = job_type_id @@ -138,7 +135,7 @@ def status(self, status): Jobtype status ['ready to deploy', 'draft'] # noqa: E501 :param status: The status of this AiJobtype. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -161,37 +158,40 @@ def description(self, description): Jobtype description # noqa: E501 :param description: The description of this AiJobtype. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AiJobtype, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ai_jobtype_list.py b/src/clients/ctm_api_client/models/ai_jobtype_list.py index 5f5277e..9db7e1b 100644 --- a/src/clients/ctm_api_client/models/ai_jobtype_list.py +++ b/src/clients/ctm_api_client/models/ai_jobtype_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AiJobtypeList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"jobtypes": "list[AiJobtype]"} + openapi_types = { + 'jobtypes': 'list[AiJobtype]' + } - attribute_map = {"jobtypes": "jobtypes"} + attribute_map = { + 'jobtypes': 'jobtypes' + } - def __init__(self, jobtypes=None, _configuration=None): # noqa: E501 - """AiJobtypeList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, jobtypes=None, local_vars_configuration=None): # noqa: E501 + """AiJobtypeList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._jobtypes = None self.discriminator = None @@ -64,37 +72,40 @@ def jobtypes(self, jobtypes): :param jobtypes: The jobtypes of this AiJobtypeList. # noqa: E501 - :type: list[AiJobtype] + :type jobtypes: list[AiJobtype] """ self._jobtypes = jobtypes - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AiJobtypeList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/alert_param.py b/src/clients/ctm_api_client/models/alert_param.py index 5602314..a356e49 100644 --- a/src/clients/ctm_api_client/models/alert_param.py +++ b/src/clients/ctm_api_client/models/alert_param.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AlertParam(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"alert_ids": "list[int]", "urgency": "str", "comment": "str"} + openapi_types = { + 'alert_ids': 'list[int]', + 'urgency': 'str', + 'comment': 'str' + } attribute_map = { - "alert_ids": "alertIds", - "urgency": "urgency", - "comment": "comment", + 'alert_ids': 'alertIds', + 'urgency': 'urgency', + 'comment': 'comment' } - def __init__( - self, alert_ids=None, urgency=None, comment=None, _configuration=None - ): # noqa: E501 - """AlertParam - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, alert_ids=None, urgency=None, comment=None, local_vars_configuration=None): # noqa: E501 + """AlertParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._alert_ids = None self._urgency = None @@ -77,12 +83,10 @@ def alert_ids(self, alert_ids): alertIds. HIDDEN. # noqa: E501 :param alert_ids: The alert_ids of this AlertParam. # noqa: E501 - :type: list[int] + :type alert_ids: list[int] """ - if self._configuration.client_side_validation and alert_ids is None: - raise ValueError( - "Invalid value for `alert_ids`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and alert_ids is None: # noqa: E501 + raise ValueError("Invalid value for `alert_ids`, must not be `None`") # noqa: E501 self._alert_ids = alert_ids @@ -104,14 +108,13 @@ def urgency(self, urgency): modify urgency. HIDDEN. # noqa: E501 :param urgency: The urgency of this AlertParam. # noqa: E501 - :type: str + :type urgency: str """ allowed_values = ["Normal", "Urgent", "Critical"] # noqa: E501 - if self._configuration.client_side_validation and urgency not in allowed_values: + if self.local_vars_configuration.client_side_validation and urgency not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `urgency` ({0}), must be one of {1}".format( # noqa: E501 - urgency, allowed_values - ) + "Invalid value for `urgency` ({0}), must be one of {1}" # noqa: E501 + .format(urgency, allowed_values) ) self._urgency = urgency @@ -134,37 +137,40 @@ def comment(self, comment): modify comment. HIDDEN. # noqa: E501 :param comment: The comment of this AlertParam. # noqa: E501 - :type: str + :type comment: str """ self._comment = comment - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AlertParam, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/alert_status_param.py b/src/clients/ctm_api_client/models/alert_status_param.py index b4162f0..d389ec1 100644 --- a/src/clients/ctm_api_client/models/alert_status_param.py +++ b/src/clients/ctm_api_client/models/alert_status_param.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AlertStatusParam(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"alert_ids": "list[int]", "status": "str"} - - attribute_map = {"alert_ids": "alertIds", "status": "status"} - - def __init__(self, alert_ids=None, status=None, _configuration=None): # noqa: E501 - """AlertStatusParam - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'alert_ids': 'list[int]', + 'status': 'str' + } + + attribute_map = { + 'alert_ids': 'alertIds', + 'status': 'status' + } + + def __init__(self, alert_ids=None, status=None, local_vars_configuration=None): # noqa: E501 + """AlertStatusParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._alert_ids = None self._status = None @@ -68,12 +78,10 @@ def alert_ids(self, alert_ids): alertIds. HIDDEN. # noqa: E501 :param alert_ids: The alert_ids of this AlertStatusParam. # noqa: E501 - :type: list[int] + :type alert_ids: list[int] """ - if self._configuration.client_side_validation and alert_ids is None: - raise ValueError( - "Invalid value for `alert_ids`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and alert_ids is None: # noqa: E501 + raise ValueError("Invalid value for `alert_ids`, must not be `None`") # noqa: E501 self._alert_ids = alert_ids @@ -95,44 +103,46 @@ def status(self, status): modify status. HIDDEN. # noqa: E501 :param status: The status of this AlertStatusParam. # noqa: E501 - :type: str + :type status: str """ allowed_values = ["Undefined", "Reviewed", "Closed", "New"] # noqa: E501 - if self._configuration.client_side_validation and status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501 - status, allowed_values - ) + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) ) self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AlertStatusParam, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/all_mft_data_settings.py b/src/clients/ctm_api_client/models/all_mft_data_settings.py index a8c88e7..030b098 100644 --- a/src/clients/ctm_api_client/models/all_mft_data_settings.py +++ b/src/clients/ctm_api_client/models/all_mft_data_settings.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AllMFTDataSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "settings": "list[SettingProperties]", - "settings_metadata": "SettingsMetadataProperties", + openapi_types = { + 'settings': 'list[SettingProperties]', + 'settings_metadata': 'SettingsMetadataProperties' } - attribute_map = {"settings": "settings", "settings_metadata": "settingsMetadata"} + attribute_map = { + 'settings': 'settings', + 'settings_metadata': 'settingsMetadata' + } - def __init__( - self, settings=None, settings_metadata=None, _configuration=None - ): # noqa: E501 - """AllMFTDataSettings - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, settings=None, settings_metadata=None, local_vars_configuration=None): # noqa: E501 + """AllMFTDataSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._settings = None self._settings_metadata = None @@ -72,7 +77,7 @@ def settings(self, settings): :param settings: The settings of this AllMFTDataSettings. # noqa: E501 - :type: list[SettingProperties] + :type settings: list[SettingProperties] """ self._settings = settings @@ -93,37 +98,40 @@ def settings_metadata(self, settings_metadata): :param settings_metadata: The settings_metadata of this AllMFTDataSettings. # noqa: E501 - :type: SettingsMetadataProperties + :type settings_metadata: SettingsMetadataProperties """ self._settings_metadata = settings_metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AllMFTDataSettings, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/allowed_job_actions.py b/src/clients/ctm_api_client/models/allowed_job_actions.py index 1b129d4..4af1d35 100644 --- a/src/clients/ctm_api_client/models/allowed_job_actions.py +++ b/src/clients/ctm_api_client/models/allowed_job_actions.py @@ -5,107 +5,88 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AllowedJobActions(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "view_properties": "bool", - "documentation": "bool", - "log": "bool", - "statistics": "bool", - "view_output_list": "bool", - "view_jcl": "bool", - "why": "bool", - "hold": "bool", - "free": "bool", - "confirm": "bool", - "rerun": "bool", - "react": "bool", - "restart": "bool", - "kill": "bool", - "bypass": "bool", - "delete": "bool", - "undelete": "bool", - "set_to_ok": "bool", - "edit_properties": "bool", - "edit_jcl": "bool", + openapi_types = { + 'view_properties': 'bool', + 'documentation': 'bool', + 'log': 'bool', + 'statistics': 'bool', + 'view_output_list': 'bool', + 'view_jcl': 'bool', + 'why': 'bool', + 'hold': 'bool', + 'free': 'bool', + 'confirm': 'bool', + 'rerun': 'bool', + 'react': 'bool', + 'restart': 'bool', + 'kill': 'bool', + 'bypass': 'bool', + 'delete': 'bool', + 'undelete': 'bool', + 'set_to_ok': 'bool', + 'edit_properties': 'bool', + 'edit_jcl': 'bool' } attribute_map = { - "view_properties": "ViewProperties", - "documentation": "Documentation", - "log": "Log", - "statistics": "Statistics", - "view_output_list": "ViewOutputList", - "view_jcl": "ViewJcl", - "why": "Why", - "hold": "Hold", - "free": "Free", - "confirm": "Confirm", - "rerun": "Rerun", - "react": "React", - "restart": "Restart", - "kill": "Kill", - "bypass": "Bypass", - "delete": "Delete", - "undelete": "Undelete", - "set_to_ok": "SetToOk", - "edit_properties": "EditProperties", - "edit_jcl": "EditJcl", + 'view_properties': 'ViewProperties', + 'documentation': 'Documentation', + 'log': 'Log', + 'statistics': 'Statistics', + 'view_output_list': 'ViewOutputList', + 'view_jcl': 'ViewJcl', + 'why': 'Why', + 'hold': 'Hold', + 'free': 'Free', + 'confirm': 'Confirm', + 'rerun': 'Rerun', + 'react': 'React', + 'restart': 'Restart', + 'kill': 'Kill', + 'bypass': 'Bypass', + 'delete': 'Delete', + 'undelete': 'Undelete', + 'set_to_ok': 'SetToOk', + 'edit_properties': 'EditProperties', + 'edit_jcl': 'EditJcl' } - def __init__( - self, - view_properties=None, - documentation=None, - log=None, - statistics=None, - view_output_list=None, - view_jcl=None, - why=None, - hold=None, - free=None, - confirm=None, - rerun=None, - react=None, - restart=None, - kill=None, - bypass=None, - delete=None, - undelete=None, - set_to_ok=None, - edit_properties=None, - edit_jcl=None, - _configuration=None, - ): # noqa: E501 - """AllowedJobActions - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, view_properties=None, documentation=None, log=None, statistics=None, view_output_list=None, view_jcl=None, why=None, hold=None, free=None, confirm=None, rerun=None, react=None, restart=None, kill=None, bypass=None, delete=None, undelete=None, set_to_ok=None, edit_properties=None, edit_jcl=None, local_vars_configuration=None): # noqa: E501 + """AllowedJobActions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._view_properties = None self._documentation = None @@ -188,7 +169,7 @@ def view_properties(self, view_properties): True if Properties action is allowed # noqa: E501 :param view_properties: The view_properties of this AllowedJobActions. # noqa: E501 - :type: bool + :type view_properties: bool """ self._view_properties = view_properties @@ -211,7 +192,7 @@ def documentation(self, documentation): True if Documentation action is allowed # noqa: E501 :param documentation: The documentation of this AllowedJobActions. # noqa: E501 - :type: bool + :type documentation: bool """ self._documentation = documentation @@ -234,7 +215,7 @@ def log(self, log): True if Log action is allowed # noqa: E501 :param log: The log of this AllowedJobActions. # noqa: E501 - :type: bool + :type log: bool """ self._log = log @@ -257,7 +238,7 @@ def statistics(self, statistics): True if Statistics action is allowed # noqa: E501 :param statistics: The statistics of this AllowedJobActions. # noqa: E501 - :type: bool + :type statistics: bool """ self._statistics = statistics @@ -280,7 +261,7 @@ def view_output_list(self, view_output_list): True if ViewOutputList action is allowed # noqa: E501 :param view_output_list: The view_output_list of this AllowedJobActions. # noqa: E501 - :type: bool + :type view_output_list: bool """ self._view_output_list = view_output_list @@ -303,7 +284,7 @@ def view_jcl(self, view_jcl): True if ViewJcl action is allowed # noqa: E501 :param view_jcl: The view_jcl of this AllowedJobActions. # noqa: E501 - :type: bool + :type view_jcl: bool """ self._view_jcl = view_jcl @@ -326,7 +307,7 @@ def why(self, why): True if Why action is allowed # noqa: E501 :param why: The why of this AllowedJobActions. # noqa: E501 - :type: bool + :type why: bool """ self._why = why @@ -349,7 +330,7 @@ def hold(self, hold): True if Hold action is allowed # noqa: E501 :param hold: The hold of this AllowedJobActions. # noqa: E501 - :type: bool + :type hold: bool """ self._hold = hold @@ -372,7 +353,7 @@ def free(self, free): True if Free action is allowed # noqa: E501 :param free: The free of this AllowedJobActions. # noqa: E501 - :type: bool + :type free: bool """ self._free = free @@ -395,7 +376,7 @@ def confirm(self, confirm): True if Confirm action is allowed # noqa: E501 :param confirm: The confirm of this AllowedJobActions. # noqa: E501 - :type: bool + :type confirm: bool """ self._confirm = confirm @@ -418,7 +399,7 @@ def rerun(self, rerun): True if Rerun action is allowed # noqa: E501 :param rerun: The rerun of this AllowedJobActions. # noqa: E501 - :type: bool + :type rerun: bool """ self._rerun = rerun @@ -441,7 +422,7 @@ def react(self, react): True if React action is allowed # noqa: E501 :param react: The react of this AllowedJobActions. # noqa: E501 - :type: bool + :type react: bool """ self._react = react @@ -464,7 +445,7 @@ def restart(self, restart): True if Restart action is allowed # noqa: E501 :param restart: The restart of this AllowedJobActions. # noqa: E501 - :type: bool + :type restart: bool """ self._restart = restart @@ -487,7 +468,7 @@ def kill(self, kill): True if Kill action is allowed # noqa: E501 :param kill: The kill of this AllowedJobActions. # noqa: E501 - :type: bool + :type kill: bool """ self._kill = kill @@ -510,7 +491,7 @@ def bypass(self, bypass): True if Bypass action is allowed # noqa: E501 :param bypass: The bypass of this AllowedJobActions. # noqa: E501 - :type: bool + :type bypass: bool """ self._bypass = bypass @@ -533,7 +514,7 @@ def delete(self, delete): True if Delete action is allowed # noqa: E501 :param delete: The delete of this AllowedJobActions. # noqa: E501 - :type: bool + :type delete: bool """ self._delete = delete @@ -556,7 +537,7 @@ def undelete(self, undelete): True if Undelete action is allowed # noqa: E501 :param undelete: The undelete of this AllowedJobActions. # noqa: E501 - :type: bool + :type undelete: bool """ self._undelete = undelete @@ -579,7 +560,7 @@ def set_to_ok(self, set_to_ok): True if SetToOk action is allowed # noqa: E501 :param set_to_ok: The set_to_ok of this AllowedJobActions. # noqa: E501 - :type: bool + :type set_to_ok: bool """ self._set_to_ok = set_to_ok @@ -602,7 +583,7 @@ def edit_properties(self, edit_properties): True if EditProperties action is allowed # noqa: E501 :param edit_properties: The edit_properties of this AllowedJobActions. # noqa: E501 - :type: bool + :type edit_properties: bool """ self._edit_properties = edit_properties @@ -625,37 +606,40 @@ def edit_jcl(self, edit_jcl): True if EditJcl action is allowed # noqa: E501 :param edit_jcl: The edit_jcl of this AllowedJobActions. # noqa: E501 - :type: bool + :type edit_jcl: bool """ self._edit_jcl = edit_jcl - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AllowedJobActions, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/allowed_jobs.py b/src/clients/ctm_api_client/models/allowed_jobs.py index 81d3dbc..5b467f3 100644 --- a/src/clients/ctm_api_client/models/allowed_jobs.py +++ b/src/clients/ctm_api_client/models/allowed_jobs.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AllowedJobs(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"included": "list[TermGroup]", "excluded": "list[TermGroup]"} - - attribute_map = {"included": "Included", "excluded": "Excluded"} - - def __init__(self, included=None, excluded=None, _configuration=None): # noqa: E501 - """AllowedJobs - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'included': 'list[list]', + 'excluded': 'list[list]' + } + + attribute_map = { + 'included': 'Included', + 'excluded': 'Excluded' + } + + def __init__(self, included=None, excluded=None, local_vars_configuration=None): # noqa: E501 + """AllowedJobs - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._included = None self._excluded = None @@ -58,7 +68,7 @@ def included(self): list of including term Groups, combined by OR # noqa: E501 :return: The included of this AllowedJobs. # noqa: E501 - :rtype: list[TermGroup] + :rtype: list[list] """ return self._included @@ -69,7 +79,7 @@ def included(self, included): list of including term Groups, combined by OR # noqa: E501 :param included: The included of this AllowedJobs. # noqa: E501 - :type: list[TermGroup] + :type included: list[list] """ self._included = included @@ -81,7 +91,7 @@ def excluded(self): list of excluding term Groups, combined by OR # noqa: E501 :return: The excluded of this AllowedJobs. # noqa: E501 - :rtype: list[TermGroup] + :rtype: list[list] """ return self._excluded @@ -92,37 +102,40 @@ def excluded(self, excluded): list of excluding term Groups, combined by OR # noqa: E501 :param excluded: The excluded of this AllowedJobs. # noqa: E501 - :type: list[TermGroup] + :type excluded: list[list] """ self._excluded = excluded - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AllowedJobs, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/annotation_details.py b/src/clients/ctm_api_client/models/annotation_details.py index 05044dc..b1bf66f 100644 --- a/src/clients/ctm_api_client/models/annotation_details.py +++ b/src/clients/ctm_api_client/models/annotation_details.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AnnotationDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"category": "str", "note": "str"} - - attribute_map = {"category": "category", "note": "note"} - - def __init__(self, category=None, note=None, _configuration=None): # noqa: E501 - """AnnotationDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'category': 'str', + 'note': 'str' + } + + attribute_map = { + 'category': 'category', + 'note': 'note' + } + + def __init__(self, category=None, note=None, local_vars_configuration=None): # noqa: E501 + """AnnotationDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._category = None self._note = None @@ -67,7 +77,7 @@ def category(self, category): :param category: The category of this AnnotationDetails. # noqa: E501 - :type: str + :type category: str """ self._category = category @@ -88,37 +98,40 @@ def note(self, note): :param note: The note of this AnnotationDetails. # noqa: E501 - :type: str + :type note: str """ self._note = note - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AnnotationDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/api_gtw_session.py b/src/clients/ctm_api_client/models/api_gtw_session.py index d3a857d..029371b 100644 --- a/src/clients/ctm_api_client/models/api_gtw_session.py +++ b/src/clients/ctm_api_client/models/api_gtw_session.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ApiGtwSession(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"session_id": "str"} + openapi_types = { + 'session_id': 'str' + } - attribute_map = {"session_id": "session_id"} + attribute_map = { + 'session_id': 'session_id' + } - def __init__(self, session_id=None, _configuration=None): # noqa: E501 - """ApiGtwSession - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, session_id=None, local_vars_configuration=None): # noqa: E501 + """ApiGtwSession - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._session_id = None self.discriminator = None @@ -64,37 +72,40 @@ def session_id(self, session_id): :param session_id: The session_id of this ApiGtwSession. # noqa: E501 - :type: str + :type session_id: str """ self._session_id = session_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ApiGtwSession, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/api_throwable.py b/src/clients/ctm_api_client/models/api_throwable.py index 86cd655..29c37eb 100644 --- a/src/clients/ctm_api_client/models/api_throwable.py +++ b/src/clients/ctm_api_client/models/api_throwable.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ApiThrowable(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"localized_message": "str", "message": "str"} - - attribute_map = {"localized_message": "localized_message", "message": "message"} - - def __init__( - self, localized_message=None, message=None, _configuration=None - ): # noqa: E501 - """ApiThrowable - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'localized_message': 'str', + 'message': 'str' + } + + attribute_map = { + 'localized_message': 'localized_message', + 'message': 'message' + } + + def __init__(self, localized_message=None, message=None, local_vars_configuration=None): # noqa: E501 + """ApiThrowable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._localized_message = None self._message = None @@ -69,7 +77,7 @@ def localized_message(self, localized_message): :param localized_message: The localized_message of this ApiThrowable. # noqa: E501 - :type: str + :type localized_message: str """ self._localized_message = localized_message @@ -90,37 +98,40 @@ def message(self, message): :param message: The message of this ApiThrowable. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ApiThrowable, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/app.py b/src/clients/ctm_api_client/models/app.py index 82ca42d..ebbbb6f 100644 --- a/src/clients/ctm_api_client/models/app.py +++ b/src/clients/ctm_api_client/models/app.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class App(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "displayname": "str", - "name": "str", - "desc": "str", - "default_type": "str", - "last_modified": "str", - "created_on": "str", - "created_by": "str", + openapi_types = { + 'displayname': 'str', + 'name': 'str', + 'desc': 'str', + 'default_type': 'str', + 'last_modified': 'str', + 'created_on': 'str', + 'created_by': 'str' } attribute_map = { - "displayname": "displayname", - "name": "name", - "desc": "desc", - "default_type": "defaultType", - "last_modified": "lastModified", - "created_on": "createdOn", - "created_by": "createdBy", + 'displayname': 'displayname', + 'name': 'name', + 'desc': 'desc', + 'default_type': 'defaultType', + 'last_modified': 'lastModified', + 'created_on': 'createdOn', + 'created_by': 'createdBy' } - def __init__( - self, - displayname=None, - name=None, - desc=None, - default_type=None, - last_modified=None, - created_on=None, - created_by=None, - _configuration=None, - ): # noqa: E501 - """App - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, displayname=None, name=None, desc=None, default_type=None, last_modified=None, created_on=None, created_by=None, local_vars_configuration=None): # noqa: E501 + """App - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._displayname = None self._name = None @@ -110,7 +104,7 @@ def displayname(self, displayname): job type display name # noqa: E501 :param displayname: The displayname of this App. # noqa: E501 - :type: str + :type displayname: str """ self._displayname = displayname @@ -133,7 +127,7 @@ def name(self, name): job type name # noqa: E501 :param name: The name of this App. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -156,7 +150,7 @@ def desc(self, desc): description # noqa: E501 :param desc: The desc of this App. # noqa: E501 - :type: str + :type desc: str """ self._desc = desc @@ -179,7 +173,7 @@ def default_type(self, default_type): default type # noqa: E501 :param default_type: The default_type of this App. # noqa: E501 - :type: str + :type default_type: str """ self._default_type = default_type @@ -202,7 +196,7 @@ def last_modified(self, last_modified): last modification date # noqa: E501 :param last_modified: The last_modified of this App. # noqa: E501 - :type: str + :type last_modified: str """ self._last_modified = last_modified @@ -225,7 +219,7 @@ def created_on(self, created_on): creation date # noqa: E501 :param created_on: The created_on of this App. # noqa: E501 - :type: str + :type created_on: str """ self._created_on = created_on @@ -248,37 +242,40 @@ def created_by(self, created_by): creation author # noqa: E501 :param created_by: The created_by of this App. # noqa: E501 - :type: str + :type created_by: str """ self._created_by = created_by - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(App, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/app_deploy_response.py b/src/clients/ctm_api_client/models/app_deploy_response.py index 404b482..074d242 100644 --- a/src/clients/ctm_api_client/models/app_deploy_response.py +++ b/src/clients/ctm_api_client/models/app_deploy_response.py @@ -5,60 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AppDeployResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"status": "str", "message": "str", "agent_name": "str"} + openapi_types = { + 'status': 'str', + 'message': 'str', + 'agent_name': 'str' + } attribute_map = { - "status": "status", - "message": "message", - "agent_name": "agentName", + 'status': 'status', + 'message': 'message', + 'agent_name': 'agentName' } - def __init__( - self, status=None, message=None, agent_name=None, _configuration=None - ): # noqa: E501 - """AppDeployResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, status=None, message=None, agent_name=None, local_vars_configuration=None): # noqa: E501 + """AppDeployResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._status = None self._message = None self._agent_name = None self.discriminator = None - if status is not None: - self.status = status + self.status = status if message is not None: self.message = message - if agent_name is not None: - self.agent_name = agent_name + self.agent_name = agent_name @property def status(self): @@ -78,7 +82,7 @@ def status(self, status): status # noqa: E501 :param status: The status of this AppDeployResponse. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -101,7 +105,7 @@ def message(self, message): message # noqa: E501 :param message: The message of this AppDeployResponse. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -124,37 +128,40 @@ def agent_name(self, agent_name): agent name # noqa: E501 :param agent_name: The agent_name of this AppDeployResponse. # noqa: E501 - :type: str + :type agent_name: str """ self._agent_name = agent_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AppDeployResponse, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/app_deployed.py b/src/clients/ctm_api_client/models/app_deployed.py index 81a8014..c2b82ff 100644 --- a/src/clients/ctm_api_client/models/app_deployed.py +++ b/src/clients/ctm_api_client/models/app_deployed.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AppDeployed(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "displayname": "str", - "name": "str", - "version": "str", - "default_type": "str", - "last_deployed": "str", - "last_published": "str", - "icon_base64": "str", - "created_on": "str", - "created_by": "str", + openapi_types = { + 'displayname': 'str', + 'name': 'str', + 'version': 'str', + 'default_type': 'str', + 'last_deployed': 'str', + 'last_published': 'str', + 'icon_base64': 'str', + 'created_on': 'str', + 'created_by': 'str' } attribute_map = { - "displayname": "displayname", - "name": "name", - "version": "version", - "default_type": "defaultType", - "last_deployed": "lastDeployed", - "last_published": "lastPublished", - "icon_base64": "iconBase64", - "created_on": "createdOn", - "created_by": "createdBy", + 'displayname': 'displayname', + 'name': 'name', + 'version': 'version', + 'default_type': 'defaultType', + 'last_deployed': 'lastDeployed', + 'last_published': 'lastPublished', + 'icon_base64': 'iconBase64', + 'created_on': 'createdOn', + 'created_by': 'createdBy' } - def __init__( - self, - displayname=None, - name=None, - version=None, - default_type=None, - last_deployed=None, - last_published=None, - icon_base64=None, - created_on=None, - created_by=None, - _configuration=None, - ): # noqa: E501 - """AppDeployed - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, displayname=None, name=None, version=None, default_type=None, last_deployed=None, last_published=None, icon_base64=None, created_on=None, created_by=None, local_vars_configuration=None): # noqa: E501 + """AppDeployed - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._displayname = None self._name = None @@ -122,7 +114,7 @@ def displayname(self, displayname): job type display name # noqa: E501 :param displayname: The displayname of this AppDeployed. # noqa: E501 - :type: str + :type displayname: str """ self._displayname = displayname @@ -145,7 +137,7 @@ def name(self, name): job type name # noqa: E501 :param name: The name of this AppDeployed. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -168,7 +160,7 @@ def version(self, version): version # noqa: E501 :param version: The version of this AppDeployed. # noqa: E501 - :type: str + :type version: str """ self._version = version @@ -191,7 +183,7 @@ def default_type(self, default_type): default type # noqa: E501 :param default_type: The default_type of this AppDeployed. # noqa: E501 - :type: str + :type default_type: str """ self._default_type = default_type @@ -214,7 +206,7 @@ def last_deployed(self, last_deployed): last deployment date # noqa: E501 :param last_deployed: The last_deployed of this AppDeployed. # noqa: E501 - :type: str + :type last_deployed: str """ self._last_deployed = last_deployed @@ -237,7 +229,7 @@ def last_published(self, last_published): last publishment date # noqa: E501 :param last_published: The last_published of this AppDeployed. # noqa: E501 - :type: str + :type last_published: str """ self._last_published = last_published @@ -260,7 +252,7 @@ def icon_base64(self, icon_base64): base64 icon job # noqa: E501 :param icon_base64: The icon_base64 of this AppDeployed. # noqa: E501 - :type: str + :type icon_base64: str """ self._icon_base64 = icon_base64 @@ -283,7 +275,7 @@ def created_on(self, created_on): creation date # noqa: E501 :param created_on: The created_on of this AppDeployed. # noqa: E501 - :type: str + :type created_on: str """ self._created_on = created_on @@ -306,37 +298,40 @@ def created_by(self, created_by): creation author # noqa: E501 :param created_by: The created_by of this AppDeployed. # noqa: E501 - :type: str + :type created_by: str """ self._created_by = created_by - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AppDeployed, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/app_details.py b/src/clients/ctm_api_client/models/app_details.py index 6c38295..7661ebb 100644 --- a/src/clients/ctm_api_client/models/app_details.py +++ b/src/clients/ctm_api_client/models/app_details.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AppDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "description": "str", - "last_published": "str", - "code": "str", - "message": "str", + openapi_types = { + 'description': 'str', + 'last_published': 'str', + 'code': 'str', + 'message': 'str' } attribute_map = { - "description": "description", - "last_published": "lastPublished", - "code": "code", - "message": "message", + 'description': 'description', + 'last_published': 'lastPublished', + 'code': 'code', + 'message': 'message' } - def __init__( - self, - description=None, - last_published=None, - code=None, - message=None, - _configuration=None, - ): # noqa: E501 - """AppDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, description=None, last_published=None, code=None, message=None, local_vars_configuration=None): # noqa: E501 + """AppDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._description = None self._last_published = None @@ -65,14 +62,10 @@ def __init__( self._message = None self.discriminator = None - if description is not None: - self.description = description - if last_published is not None: - self.last_published = last_published - if code is not None: - self.code = code - if message is not None: - self.message = message + self.description = description + self.last_published = last_published + self.code = code + self.message = message @property def description(self): @@ -92,7 +85,7 @@ def description(self, description): base64 description # noqa: E501 :param description: The description of this AppDetails. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -115,7 +108,7 @@ def last_published(self, last_published): last published date # noqa: E501 :param last_published: The last_published of this AppDetails. # noqa: E501 - :type: str + :type last_published: str """ self._last_published = last_published @@ -138,7 +131,7 @@ def code(self, code): error code # noqa: E501 :param code: The code of this AppDetails. # noqa: E501 - :type: str + :type code: str """ self._code = code @@ -161,37 +154,40 @@ def message(self, message): error message # noqa: E501 :param message: The message of this AppDetails. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AppDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/app_list.py b/src/clients/ctm_api_client/models/app_list.py index e8ca43c..a38bb8d 100644 --- a/src/clients/ctm_api_client/models/app_list.py +++ b/src/clients/ctm_api_client/models/app_list.py @@ -5,53 +5,59 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AppList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"app_names": "list[App]", "deployed_names": "list[AppDeployed]"} - - attribute_map = {"app_names": "appNames", "deployed_names": "deployedNames"} - - def __init__( - self, app_names=None, deployed_names=None, _configuration=None - ): # noqa: E501 - """AppList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'app_names': 'list[App]', + 'deployed_names': 'list[AppDeployed]' + } + + attribute_map = { + 'app_names': 'appNames', + 'deployed_names': 'deployedNames' + } + + def __init__(self, app_names=None, deployed_names=None, local_vars_configuration=None): # noqa: E501 + """AppList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._app_names = None self._deployed_names = None self.discriminator = None - if app_names is not None: - self.app_names = app_names - if deployed_names is not None: - self.deployed_names = deployed_names + self.app_names = app_names + self.deployed_names = deployed_names @property def app_names(self): @@ -69,7 +75,7 @@ def app_names(self, app_names): :param app_names: The app_names of this AppList. # noqa: E501 - :type: list[App] + :type app_names: list[App] """ self._app_names = app_names @@ -90,37 +96,40 @@ def deployed_names(self, deployed_names): :param deployed_names: The deployed_names of this AppList. # noqa: E501 - :type: list[AppDeployed] + :type deployed_names: list[AppDeployed] """ self._deployed_names = deployed_names - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AppList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/app_predeploy_response.py b/src/clients/ctm_api_client/models/app_predeploy_response.py index 7c647a6..4e8a33a 100644 --- a/src/clients/ctm_api_client/models/app_predeploy_response.py +++ b/src/clients/ctm_api_client/models/app_predeploy_response.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AppPredeployResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"app_name": "str", "ready_status": "str"} - - attribute_map = {"app_name": "appName", "ready_status": "readyStatus"} - - def __init__( - self, app_name=None, ready_status=None, _configuration=None - ): # noqa: E501 - """AppPredeployResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'app_name': 'str', + 'ready_status': 'str' + } + + attribute_map = { + 'app_name': 'appName', + 'ready_status': 'readyStatus' + } + + def __init__(self, app_name=None, ready_status=None, local_vars_configuration=None): # noqa: E501 + """AppPredeployResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._app_name = None self._ready_status = None @@ -71,7 +79,7 @@ def app_name(self, app_name): app name # noqa: E501 :param app_name: The app_name of this AppPredeployResponse. # noqa: E501 - :type: str + :type app_name: str """ self._app_name = app_name @@ -94,37 +102,40 @@ def ready_status(self, ready_status): ready status # noqa: E501 :param ready_status: The ready_status of this AppPredeployResponse. # noqa: E501 - :type: str + :type ready_status: str """ self._ready_status = ready_status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AppPredeployResponse, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/archive_jobs_list.py b/src/clients/ctm_api_client/models/archive_jobs_list.py index b380404..9aa849c 100644 --- a/src/clients/ctm_api_client/models/archive_jobs_list.py +++ b/src/clients/ctm_api_client/models/archive_jobs_list.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ArchiveJobsList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "jobs": "list[Job]", - "returned": "int", - "additional_jobs_match_search_criteria": "bool", + openapi_types = { + 'jobs': 'list[Job]', + 'returned': 'int', + 'additional_jobs_match_search_criteria': 'bool' } attribute_map = { - "jobs": "jobs", - "returned": "returned", - "additional_jobs_match_search_criteria": "additionalJobsMatchSearchCriteria", + 'jobs': 'jobs', + 'returned': 'returned', + 'additional_jobs_match_search_criteria': 'additionalJobsMatchSearchCriteria' } - def __init__( - self, - jobs=None, - returned=None, - additional_jobs_match_search_criteria=None, - _configuration=None, - ): # noqa: E501 - """ArchiveJobsList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, jobs=None, returned=None, additional_jobs_match_search_criteria=None, local_vars_configuration=None): # noqa: E501 + """ArchiveJobsList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._jobs = None self._returned = None @@ -66,9 +64,7 @@ def __init__( if returned is not None: self.returned = returned if additional_jobs_match_search_criteria is not None: - self.additional_jobs_match_search_criteria = ( - additional_jobs_match_search_criteria - ) + self.additional_jobs_match_search_criteria = additional_jobs_match_search_criteria @property def jobs(self): @@ -86,7 +82,7 @@ def jobs(self, jobs): :param jobs: The jobs of this ArchiveJobsList. # noqa: E501 - :type: list[Job] + :type jobs: list[Job] """ self._jobs = jobs @@ -107,7 +103,7 @@ def returned(self, returned): :param returned: The returned of this ArchiveJobsList. # noqa: E501 - :type: int + :type returned: int """ self._returned = returned @@ -123,46 +119,45 @@ def additional_jobs_match_search_criteria(self): return self._additional_jobs_match_search_criteria @additional_jobs_match_search_criteria.setter - def additional_jobs_match_search_criteria( - self, additional_jobs_match_search_criteria - ): + def additional_jobs_match_search_criteria(self, additional_jobs_match_search_criteria): """Sets the additional_jobs_match_search_criteria of this ArchiveJobsList. :param additional_jobs_match_search_criteria: The additional_jobs_match_search_criteria of this ArchiveJobsList. # noqa: E501 - :type: bool + :type additional_jobs_match_search_criteria: bool """ - self._additional_jobs_match_search_criteria = ( - additional_jobs_match_search_criteria - ) + self._additional_jobs_match_search_criteria = additional_jobs_match_search_criteria - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ArchiveJobsList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/archive_rule.py b/src/clients/ctm_api_client/models/archive_rule.py index 9530d14..3e343f3 100644 --- a/src/clients/ctm_api_client/models/archive_rule.py +++ b/src/clients/ctm_api_client/models/archive_rule.py @@ -5,77 +5,68 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ArchiveRule(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "description": "str", - "max_output_size": "str", - "max_output_size_type": "str", - "trim_type": "str", - "retention": "str", - "retention_type": "str", - "is_active": "str", - "archived_type": "str", - "rule_parameters": "list[RuleCriteria]", + openapi_types = { + 'name': 'str', + 'description': 'str', + 'max_output_size': 'str', + 'max_output_size_type': 'str', + 'trim_type': 'str', + 'retention': 'str', + 'retention_type': 'str', + 'is_active': 'str', + 'archived_type': 'str', + 'rule_parameters': 'list[RuleCriteria]' } attribute_map = { - "name": "name", - "description": "description", - "max_output_size": "maxOutputSize", - "max_output_size_type": "maxOutputSizeType", - "trim_type": "trimType", - "retention": "retention", - "retention_type": "retentionType", - "is_active": "isActive", - "archived_type": "archivedType", - "rule_parameters": "ruleParameters", + 'name': 'name', + 'description': 'description', + 'max_output_size': 'maxOutputSize', + 'max_output_size_type': 'maxOutputSizeType', + 'trim_type': 'trimType', + 'retention': 'retention', + 'retention_type': 'retentionType', + 'is_active': 'isActive', + 'archived_type': 'archivedType', + 'rule_parameters': 'ruleParameters' } - def __init__( - self, - name=None, - description=None, - max_output_size=None, - max_output_size_type=None, - trim_type=None, - retention=None, - retention_type=None, - is_active=None, - archived_type=None, - rule_parameters=None, - _configuration=None, - ): # noqa: E501 - """ArchiveRule - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, description=None, max_output_size=None, max_output_size_type=None, trim_type=None, retention=None, retention_type=None, is_active=None, archived_type=None, rule_parameters=None, local_vars_configuration=None): # noqa: E501 + """ArchiveRule - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._description = None @@ -128,7 +119,7 @@ def name(self, name): The Control-M Workload Archiving rule name. REQUIRED. HIDDEN. # noqa: E501 :param name: The name of this ArchiveRule. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -151,7 +142,7 @@ def description(self, description): The description of Control-M Workload Archiving rule. HIDDEN. # noqa: E501 :param description: The description of this ArchiveRule. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -174,7 +165,7 @@ def max_output_size(self, max_output_size): The maximum job's output size to collect. HIDDEN. # noqa: E501 :param max_output_size: The max_output_size of this ArchiveRule. # noqa: E501 - :type: str + :type max_output_size: str """ self._max_output_size = max_output_size @@ -197,7 +188,7 @@ def max_output_size_type(self, max_output_size_type): The maximum job's output size type to collect - KB or MB. The default is MB. HIDDEN. # noqa: E501 :param max_output_size_type: The max_output_size_type of this ArchiveRule. # noqa: E501 - :type: str + :type max_output_size_type: str """ self._max_output_size_type = max_output_size_type @@ -220,7 +211,7 @@ def trim_type(self, trim_type): Trim in case the output exceed the maximum job's output - Omit , Beginning, End. The default is to Omit. HIDDEN. # noqa: E501 :param trim_type: The trim_type of this ArchiveRule. # noqa: E501 - :type: str + :type trim_type: str """ self._trim_type = trim_type @@ -243,7 +234,7 @@ def retention(self, retention): The retention period to keep archive job by rule. The default is 1. HIDDEN. # noqa: E501 :param retention: The retention of this ArchiveRule. # noqa: E501 - :type: str + :type retention: str """ self._retention = retention @@ -266,7 +257,7 @@ def retention_type(self, retention_type): The retention period type to keep archive job by rule- Years, Months and Days are available. The default is Years. HIDDEN. # noqa: E501 :param retention_type: The retention_type of this ArchiveRule. # noqa: E501 - :type: str + :type retention_type: str """ self._retention_type = retention_type @@ -289,7 +280,7 @@ def is_active(self, is_active): Is Control-M Workload Archiving rule is active. HIDDEN. # noqa: E501 :param is_active: The is_active of this ArchiveRule. # noqa: E501 - :type: str + :type is_active: str """ self._is_active = is_active @@ -312,7 +303,7 @@ def archived_type(self, archived_type): The rule archived data - logs, output or both. The default is both. HIDDEN. # noqa: E501 :param archived_type: The archived_type of this ArchiveRule. # noqa: E501 - :type: str + :type archived_type: str """ self._archived_type = archived_type @@ -335,37 +326,40 @@ def rule_parameters(self, rule_parameters): Rule parameters - ctm, type, jobName, jobType, application, subApplication, jobStatus, folder and library. HIDDEN. # noqa: E501 :param rule_parameters: The rule_parameters of this ArchiveRule. # noqa: E501 - :type: list[RuleCriteria] + :type rule_parameters: list[RuleCriteria] """ self._rule_parameters = rule_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ArchiveRule, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/archive_rules_list.py b/src/clients/ctm_api_client/models/archive_rules_list.py index dd55346..0c1ec5e 100644 --- a/src/clients/ctm_api_client/models/archive_rules_list.py +++ b/src/clients/ctm_api_client/models/archive_rules_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ArchiveRulesList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"rules": "list[ArchiveRule]"} + openapi_types = { + 'rules': 'list[ArchiveRule]' + } - attribute_map = {"rules": "rules"} + attribute_map = { + 'rules': 'rules' + } - def __init__(self, rules=None, _configuration=None): # noqa: E501 - """ArchiveRulesList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, rules=None, local_vars_configuration=None): # noqa: E501 + """ArchiveRulesList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._rules = None self.discriminator = None @@ -64,37 +72,40 @@ def rules(self, rules): :param rules: The rules of this ArchiveRulesList. # noqa: E501 - :type: list[ArchiveRule] + :type rules: list[ArchiveRule] """ self._rules = rules - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ArchiveRulesList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/as2_key_data.py b/src/clients/ctm_api_client/models/as2_key_data.py index 95a04e6..d92dec7 100644 --- a/src/clients/ctm_api_client/models/as2_key_data.py +++ b/src/clients/ctm_api_client/models/as2_key_data.py @@ -5,52 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class As2KeyData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"as2_id": "str", "certificate": "str", "destination_folder": "str"} + openapi_types = { + 'as2_id': 'str', + 'certificate': 'str', + 'destination_folder': 'str' + } attribute_map = { - "as2_id": "as2Id", - "certificate": "certificate", - "destination_folder": "destinationFolder", + 'as2_id': 'as2Id', + 'certificate': 'certificate', + 'destination_folder': 'destinationFolder' } - def __init__( - self, - as2_id=None, - certificate=None, - destination_folder=None, - _configuration=None, - ): # noqa: E501 - """As2KeyData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, as2_id=None, certificate=None, destination_folder=None, local_vars_configuration=None): # noqa: E501 + """As2KeyData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._as2_id = None self._certificate = None @@ -82,7 +84,7 @@ def as2_id(self, as2_id): as2 id HIDDEN # noqa: E501 :param as2_id: The as2_id of this As2KeyData. # noqa: E501 - :type: str + :type as2_id: str """ self._as2_id = as2_id @@ -105,7 +107,7 @@ def certificate(self, certificate): partners certificate alias HIDDEN # noqa: E501 :param certificate: The certificate of this As2KeyData. # noqa: E501 - :type: str + :type certificate: str """ self._certificate = certificate @@ -128,37 +130,40 @@ def destination_folder(self, destination_folder): AS2 destination folder HIDDEN # noqa: E501 :param destination_folder: The destination_folder of this As2KeyData. # noqa: E501 - :type: str + :type destination_folder: str """ self._destination_folder = destination_folder - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(As2KeyData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/associate_data.py b/src/clients/ctm_api_client/models/associate_data.py index e623968..228fe1c 100644 --- a/src/clients/ctm_api_client/models/associate_data.py +++ b/src/clients/ctm_api_client/models/associate_data.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AssociateData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"type": "str", "name": "str"} - - attribute_map = {"type": "type", "name": "name"} - - def __init__(self, type=None, name=None, _configuration=None): # noqa: E501 - """AssociateData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'type': 'str', + 'name': 'str' + } + + attribute_map = { + 'type': 'type', + 'name': 'name' + } + + def __init__(self, type=None, name=None, local_vars_configuration=None): # noqa: E501 + """AssociateData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._type = None self._name = None @@ -69,7 +79,7 @@ def type(self, type): associate typed REQUIRED # noqa: E501 :param type: The type of this AssociateData. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -92,37 +102,40 @@ def name(self, name): associate name REQUIRED # noqa: E501 :param name: The name of this AssociateData. # noqa: E501 - :type: str + :type name: str """ self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AssociateData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/authenticate_credentials.py b/src/clients/ctm_api_client/models/authenticate_credentials.py index 4ae5666..1c51b80 100644 --- a/src/clients/ctm_api_client/models/authenticate_credentials.py +++ b/src/clients/ctm_api_client/models/authenticate_credentials.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AuthenticateCredentials(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "username": "str", - "msg": "str", - "sessiontoken": "str", - "groups": "list[str]", - "additional_attributes": "list[object]", + openapi_types = { + 'username': 'str', + 'msg': 'str', + 'sessiontoken': 'str', + 'groups': 'list[str]', + 'additional_attributes': 'list[AuthenticateCredentialsAdditionalAttributes]' } attribute_map = { - "username": "username", - "msg": "msg", - "sessiontoken": "sessiontoken", - "groups": "groups", - "additional_attributes": "additionalAttributes", + 'username': 'username', + 'msg': 'msg', + 'sessiontoken': 'sessiontoken', + 'groups': 'groups', + 'additional_attributes': 'additionalAttributes' } - def __init__( - self, - username=None, - msg=None, - sessiontoken=None, - groups=None, - additional_attributes=None, - _configuration=None, - ): # noqa: E501 - """AuthenticateCredentials - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, username=None, msg=None, sessiontoken=None, groups=None, additional_attributes=None, local_vars_configuration=None): # noqa: E501 + """AuthenticateCredentials - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._username = None self._msg = None @@ -69,16 +65,11 @@ def __init__( self._additional_attributes = None self.discriminator = None - if username is not None: - self.username = username - if msg is not None: - self.msg = msg - if sessiontoken is not None: - self.sessiontoken = sessiontoken - if groups is not None: - self.groups = groups - if additional_attributes is not None: - self.additional_attributes = additional_attributes + self.username = username + self.msg = msg + self.sessiontoken = sessiontoken + self.groups = groups + self.additional_attributes = additional_attributes @property def username(self): @@ -96,7 +87,7 @@ def username(self, username): :param username: The username of this AuthenticateCredentials. # noqa: E501 - :type: str + :type username: str """ self._username = username @@ -117,7 +108,7 @@ def msg(self, msg): :param msg: The msg of this AuthenticateCredentials. # noqa: E501 - :type: str + :type msg: str """ self._msg = msg @@ -138,7 +129,7 @@ def sessiontoken(self, sessiontoken): :param sessiontoken: The sessiontoken of this AuthenticateCredentials. # noqa: E501 - :type: str + :type sessiontoken: str """ self._sessiontoken = sessiontoken @@ -159,7 +150,7 @@ def groups(self, groups): :param groups: The groups of this AuthenticateCredentials. # noqa: E501 - :type: list[str] + :type groups: list[str] """ self._groups = groups @@ -170,7 +161,7 @@ def additional_attributes(self): :return: The additional_attributes of this AuthenticateCredentials. # noqa: E501 - :rtype: list[object] + :rtype: list[AuthenticateCredentialsAdditionalAttributes] """ return self._additional_attributes @@ -180,37 +171,40 @@ def additional_attributes(self, additional_attributes): :param additional_attributes: The additional_attributes of this AuthenticateCredentials. # noqa: E501 - :type: list[object] + :type additional_attributes: list[AuthenticateCredentialsAdditionalAttributes] """ self._additional_attributes = additional_attributes - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AuthenticateCredentials, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/authentication_data.py b/src/clients/ctm_api_client/models/authentication_data.py index 838749e..59e8984 100644 --- a/src/clients/ctm_api_client/models/authentication_data.py +++ b/src/clients/ctm_api_client/models/authentication_data.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class AuthenticationData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "control_m": "ControlMAuthenticationData", - "external_provider": "ExternalProviderAuthenticationData", + openapi_types = { + 'control_m': 'ControlMAuthenticationData', + 'external_provider': 'ExternalProviderAuthenticationData' } - attribute_map = {"control_m": "ControlM", "external_provider": "ExternalProvider"} + attribute_map = { + 'control_m': 'ControlM', + 'external_provider': 'ExternalProvider' + } - def __init__( - self, control_m=None, external_provider=None, _configuration=None - ): # noqa: E501 - """AuthenticationData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, control_m=None, external_provider=None, local_vars_configuration=None): # noqa: E501 + """AuthenticationData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._control_m = None self._external_provider = None @@ -72,7 +77,7 @@ def control_m(self, control_m): :param control_m: The control_m of this AuthenticationData. # noqa: E501 - :type: ControlMAuthenticationData + :type control_m: ControlMAuthenticationData """ self._control_m = control_m @@ -93,37 +98,40 @@ def external_provider(self, external_provider): :param external_provider: The external_provider of this AuthenticationData. # noqa: E501 - :type: ExternalProviderAuthenticationData + :type external_provider: ExternalProviderAuthenticationData """ self._external_provider = external_provider - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(AuthenticationData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/availability.py b/src/clients/ctm_api_client/models/availability.py index ee0750a..1539d3b 100644 --- a/src/clients/ctm_api_client/models/availability.py +++ b/src/clients/ctm_api_client/models/availability.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Availability(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "type": "str", - "name": "str", - "status": "str", - "message": "str", - "key": "str", + openapi_types = { + 'type': 'str', + 'name': 'str', + 'status': 'str', + 'message': 'str', + 'key': 'str' } attribute_map = { - "type": "type", - "name": "name", - "status": "status", - "message": "message", - "key": "key", + 'type': 'type', + 'name': 'name', + 'status': 'status', + 'message': 'message', + 'key': 'key' } - def __init__( - self, - type=None, - name=None, - status=None, - message=None, - key=None, - _configuration=None, - ): # noqa: E501 - """Availability - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, type=None, name=None, status=None, message=None, key=None, local_vars_configuration=None): # noqa: E501 + """Availability - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._type = None self._name = None @@ -98,7 +94,7 @@ def type(self, type): the type of the availability stat # noqa: E501 :param type: The type of this Availability. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -121,7 +117,7 @@ def name(self, name): the name of the stat # noqa: E501 :param name: The name of this Availability. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -144,7 +140,7 @@ def status(self, status): the current status # noqa: E501 :param status: The status of this Availability. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -167,7 +163,7 @@ def message(self, message): A message representing the problem # noqa: E501 :param message: The message of this Availability. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -190,37 +186,40 @@ def key(self, key): A unique key for the metric # noqa: E501 :param key: The key of this Availability. # noqa: E501 - :type: str + :type key: str """ self._key = key - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Availability, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/certificate_signing_request_data.py b/src/clients/ctm_api_client/models/certificate_signing_request_data.py index 0955b4f..899b0fd 100644 --- a/src/clients/ctm_api_client/models/certificate_signing_request_data.py +++ b/src/clients/ctm_api_client/models/certificate_signing_request_data.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CertificateSigningRequestData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "organization": "str", - "organization_unit": "str", - "city_locality": "str", - "state_province": "str", - "country": "str", - "email_address": "str", + openapi_types = { + 'organization': 'str', + 'organization_unit': 'str', + 'city_locality': 'str', + 'state_province': 'str', + 'country': 'str', + 'email_address': 'str' } attribute_map = { - "organization": "organization", - "organization_unit": "organizationUnit", - "city_locality": "cityLocality", - "state_province": "stateProvince", - "country": "country", - "email_address": "emailAddress", + 'organization': 'organization', + 'organization_unit': 'organizationUnit', + 'city_locality': 'cityLocality', + 'state_province': 'stateProvince', + 'country': 'country', + 'email_address': 'emailAddress' } - def __init__( - self, - organization=None, - organization_unit=None, - city_locality=None, - state_province=None, - country=None, - email_address=None, - _configuration=None, - ): # noqa: E501 - """CertificateSigningRequestData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, organization=None, organization_unit=None, city_locality=None, state_province=None, country=None, email_address=None, local_vars_configuration=None): # noqa: E501 + """CertificateSigningRequestData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._organization = None self._organization_unit = None @@ -104,7 +99,7 @@ def organization(self, organization): The organization HIDDEN # noqa: E501 :param organization: The organization of this CertificateSigningRequestData. # noqa: E501 - :type: str + :type organization: str """ self._organization = organization @@ -127,7 +122,7 @@ def organization_unit(self, organization_unit): The organizationUnit HIDDEN # noqa: E501 :param organization_unit: The organization_unit of this CertificateSigningRequestData. # noqa: E501 - :type: str + :type organization_unit: str """ self._organization_unit = organization_unit @@ -150,7 +145,7 @@ def city_locality(self, city_locality): The cityLocality HIDDEN # noqa: E501 :param city_locality: The city_locality of this CertificateSigningRequestData. # noqa: E501 - :type: str + :type city_locality: str """ self._city_locality = city_locality @@ -173,7 +168,7 @@ def state_province(self, state_province): The stateProvince HIDDEN # noqa: E501 :param state_province: The state_province of this CertificateSigningRequestData. # noqa: E501 - :type: str + :type state_province: str """ self._state_province = state_province @@ -196,7 +191,7 @@ def country(self, country): The country HIDDEN # noqa: E501 :param country: The country of this CertificateSigningRequestData. # noqa: E501 - :type: str + :type country: str """ self._country = country @@ -219,37 +214,40 @@ def email_address(self, email_address): The emailAddress HIDDEN # noqa: E501 :param email_address: The email_address of this CertificateSigningRequestData. # noqa: E501 - :type: str + :type email_address: str """ self._email_address = email_address - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CertificateSigningRequestData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/client_access_privilege_category.py b/src/clients/ctm_api_client/models/client_access_privilege_category.py index 4d16de5..d09fcf2 100644 --- a/src/clients/ctm_api_client/models/client_access_privilege_category.py +++ b/src/clients/ctm_api_client/models/client_access_privilege_category.py @@ -5,68 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ClientAccessPrivilegeCategory(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "controlm_web_client_access": "str", - "self_service_access": "str", - "workload_change_manager_access": "str", - "utilities_access": "str", - "application_integrator_access": "str", - "automation_api_access": "str", - "workflow_insights_access": "str", + openapi_types = { + 'controlm_web_client_access': 'str', + 'self_service_access': 'str', + 'workload_change_manager_access': 'str', + 'utilities_access': 'str', + 'application_integrator_access': 'str', + 'automation_api_access': 'str', + 'workflow_insights_access': 'str', + 'enable_service_token_creation': 'str' } attribute_map = { - "controlm_web_client_access": "ControlmWebClientAccess", - "self_service_access": "SelfServiceAccess", - "workload_change_manager_access": "WorkloadChangeManagerAccess", - "utilities_access": "UtilitiesAccess", - "application_integrator_access": "ApplicationIntegratorAccess", - "automation_api_access": "AutomationAPIAccess", - "workflow_insights_access": "WorkflowInsightsAccess", + 'controlm_web_client_access': 'ControlmWebClientAccess', + 'self_service_access': 'SelfServiceAccess', + 'workload_change_manager_access': 'WorkloadChangeManagerAccess', + 'utilities_access': 'UtilitiesAccess', + 'application_integrator_access': 'ApplicationIntegratorAccess', + 'automation_api_access': 'AutomationAPIAccess', + 'workflow_insights_access': 'WorkflowInsightsAccess', + 'enable_service_token_creation': 'EnableServiceTokenCreation' } - def __init__( - self, - controlm_web_client_access=None, - self_service_access=None, - workload_change_manager_access=None, - utilities_access=None, - application_integrator_access=None, - automation_api_access=None, - workflow_insights_access=None, - _configuration=None, - ): # noqa: E501 - """ClientAccessPrivilegeCategory - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, controlm_web_client_access=None, self_service_access=None, workload_change_manager_access=None, utilities_access=None, application_integrator_access=None, automation_api_access=None, workflow_insights_access=None, enable_service_token_creation=None, local_vars_configuration=None): # noqa: E501 + """ClientAccessPrivilegeCategory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._controlm_web_client_access = None self._self_service_access = None @@ -75,6 +71,7 @@ def __init__( self._application_integrator_access = None self._automation_api_access = None self._workflow_insights_access = None + self._enable_service_token_creation = None self.discriminator = None if controlm_web_client_access is not None: @@ -91,6 +88,8 @@ def __init__( self.automation_api_access = automation_api_access if workflow_insights_access is not None: self.workflow_insights_access = workflow_insights_access + if enable_service_token_creation is not None: + self.enable_service_token_creation = enable_service_token_creation @property def controlm_web_client_access(self): @@ -110,7 +109,7 @@ def controlm_web_client_access(self, controlm_web_client_access): Control-M Web clientaccess level (None, Full) # noqa: E501 :param controlm_web_client_access: The controlm_web_client_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type controlm_web_client_access: str """ self._controlm_web_client_access = controlm_web_client_access @@ -133,7 +132,7 @@ def self_service_access(self, self_service_access): Control-M Self Service access level (None, Full) # noqa: E501 :param self_service_access: The self_service_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type self_service_access: str """ self._self_service_access = self_service_access @@ -156,7 +155,7 @@ def workload_change_manager_access(self, workload_change_manager_access): Control-M Workload Change Manager access level (None, Full) # noqa: E501 :param workload_change_manager_access: The workload_change_manager_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type workload_change_manager_access: str """ self._workload_change_manager_access = workload_change_manager_access @@ -179,7 +178,7 @@ def utilities_access(self, utilities_access): Control-M, Utilitiesm EM API, BIM Web, UI access level (None, Full) # noqa: E501 :param utilities_access: The utilities_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type utilities_access: str """ self._utilities_access = utilities_access @@ -202,7 +201,7 @@ def application_integrator_access(self, application_integrator_access): Control-M Application Integrator access level (None, Full) # noqa: E501 :param application_integrator_access: The application_integrator_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type application_integrator_access: str """ self._application_integrator_access = application_integrator_access @@ -225,7 +224,7 @@ def automation_api_access(self, automation_api_access): Control-M Automation API access level (None, Full) # noqa: E501 :param automation_api_access: The automation_api_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type automation_api_access: str """ self._automation_api_access = automation_api_access @@ -248,37 +247,63 @@ def workflow_insights_access(self, workflow_insights_access): Control-M Workflow Insights access level (None, Full) # noqa: E501 :param workflow_insights_access: The workflow_insights_access of this ClientAccessPrivilegeCategory. # noqa: E501 - :type: str + :type workflow_insights_access: str """ self._workflow_insights_access = workflow_insights_access - def to_dict(self): + @property + def enable_service_token_creation(self): + """Gets the enable_service_token_creation of this ClientAccessPrivilegeCategory. # noqa: E501 + + Control-M Service Token access level (None, Full) # noqa: E501 + + :return: The enable_service_token_creation of this ClientAccessPrivilegeCategory. # noqa: E501 + :rtype: str + """ + return self._enable_service_token_creation + + @enable_service_token_creation.setter + def enable_service_token_creation(self, enable_service_token_creation): + """Sets the enable_service_token_creation of this ClientAccessPrivilegeCategory. + + Control-M Service Token access level (None, Full) # noqa: E501 + + :param enable_service_token_creation: The enable_service_token_creation of this ClientAccessPrivilegeCategory. # noqa: E501 + :type enable_service_token_creation: str + """ + + self._enable_service_token_creation = enable_service_token_creation + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ClientAccessPrivilegeCategory, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/cluster.py b/src/clients/ctm_api_client/models/cluster.py index 30f01e7..744a8d4 100644 --- a/src/clients/ctm_api_client/models/cluster.py +++ b/src/clients/ctm_api_client/models/cluster.py @@ -5,52 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Cluster(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "nodes": "list[Node]", - "availability": "list[Availability]", - "performance": "list[Performance]", + openapi_types = { + 'nodes': 'list[Node]', + 'availability': 'list[Availability]', + 'performance': 'list[Performance]' } attribute_map = { - "nodes": "nodes", - "availability": "availability", - "performance": "performance", + 'nodes': 'nodes', + 'availability': 'availability', + 'performance': 'performance' } - def __init__( - self, nodes=None, availability=None, performance=None, _configuration=None - ): # noqa: E501 - """Cluster - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, nodes=None, availability=None, performance=None, local_vars_configuration=None): # noqa: E501 + """Cluster - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._nodes = None self._availability = None @@ -80,7 +82,7 @@ def nodes(self, nodes): :param nodes: The nodes of this Cluster. # noqa: E501 - :type: list[Node] + :type nodes: list[Node] """ self._nodes = nodes @@ -101,7 +103,7 @@ def availability(self, availability): :param availability: The availability of this Cluster. # noqa: E501 - :type: list[Availability] + :type availability: list[Availability] """ self._availability = availability @@ -122,37 +124,40 @@ def performance(self, performance): :param performance: The performance of this Cluster. # noqa: E501 - :type: list[Performance] + :type performance: list[Performance] """ self._performance = performance - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Cluster, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/cluster_authorization_data.py b/src/clients/ctm_api_client/models/cluster_authorization_data.py index ccf23b7..3b4fbdc 100644 --- a/src/clients/ctm_api_client/models/cluster_authorization_data.py +++ b/src/clients/ctm_api_client/models/cluster_authorization_data.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ClusterAuthorizationData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"host_list": "list[HostnamePortPair]"} + openapi_types = { + 'host_list': 'list[HostnamePortPair]' + } - attribute_map = {"host_list": "hostList"} + attribute_map = { + 'host_list': 'hostList' + } - def __init__(self, host_list=None, _configuration=None): # noqa: E501 - """ClusterAuthorizationData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, host_list=None, local_vars_configuration=None): # noqa: E501 + """ClusterAuthorizationData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host_list = None self.discriminator = None @@ -66,37 +74,40 @@ def host_list(self, host_list): hostnames and ports list HIDDEN # noqa: E501 :param host_list: The host_list of this ClusterAuthorizationData. # noqa: E501 - :type: list[HostnamePortPair] + :type host_list: list[HostnamePortPair] """ self._host_list = host_list - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ClusterAuthorizationData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/communication_analysis_response_type.py b/src/clients/ctm_api_client/models/communication_analysis_response_type.py index 879371e..e5e2d6a 100644 --- a/src/clients/ctm_api_client/models/communication_analysis_response_type.py +++ b/src/clients/ctm_api_client/models/communication_analysis_response_type.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CommunicationAnalysisResponseType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "basic_info": "CtmagentBasicInfoType", - "ctmagent_ctm_tests_type": "list[CtmagentCtmTestType]", - "ctmagent_states_changed_type": "list[CtmagentStateChangedType]", + openapi_types = { + 'basic_info': 'CtmagentBasicInfoType', + 'ctmagent_ctm_tests_type': 'list[CtmagentCtmTestType]', + 'ctmagent_states_changed_type': 'list[CtmagentStateChangedType]' } attribute_map = { - "basic_info": "basicInfo", - "ctmagent_ctm_tests_type": "ctmagentCtmTestsType", - "ctmagent_states_changed_type": "ctmagentStatesChangedType", + 'basic_info': 'basicInfo', + 'ctmagent_ctm_tests_type': 'ctmagentCtmTestsType', + 'ctmagent_states_changed_type': 'ctmagentStatesChangedType' } - def __init__( - self, - basic_info=None, - ctmagent_ctm_tests_type=None, - ctmagent_states_changed_type=None, - _configuration=None, - ): # noqa: E501 - """CommunicationAnalysisResponseType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, basic_info=None, ctmagent_ctm_tests_type=None, ctmagent_states_changed_type=None, local_vars_configuration=None): # noqa: E501 + """CommunicationAnalysisResponseType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._basic_info = None self._ctmagent_ctm_tests_type = None @@ -72,7 +70,6 @@ def __init__( def basic_info(self): """Gets the basic_info of this CommunicationAnalysisResponseType. # noqa: E501 - The basic information pat of the report # noqa: E501 :return: The basic_info of this CommunicationAnalysisResponseType. # noqa: E501 :rtype: CtmagentBasicInfoType @@ -83,10 +80,9 @@ def basic_info(self): def basic_info(self, basic_info): """Sets the basic_info of this CommunicationAnalysisResponseType. - The basic information pat of the report # noqa: E501 :param basic_info: The basic_info of this CommunicationAnalysisResponseType. # noqa: E501 - :type: CtmagentBasicInfoType + :type basic_info: CtmagentBasicInfoType """ self._basic_info = basic_info @@ -109,7 +105,7 @@ def ctmagent_ctm_tests_type(self, ctmagent_ctm_tests_type): The list of 4 tests executed and their output # noqa: E501 :param ctmagent_ctm_tests_type: The ctmagent_ctm_tests_type of this CommunicationAnalysisResponseType. # noqa: E501 - :type: list[CtmagentCtmTestType] + :type ctmagent_ctm_tests_type: list[CtmagentCtmTestType] """ self._ctmagent_ctm_tests_type = ctmagent_ctm_tests_type @@ -132,37 +128,40 @@ def ctmagent_states_changed_type(self, ctmagent_states_changed_type): The list of 10 latest Agent's state changed to Unavailable and timestamp # noqa: E501 :param ctmagent_states_changed_type: The ctmagent_states_changed_type of this CommunicationAnalysisResponseType. # noqa: E501 - :type: list[CtmagentStateChangedType] + :type ctmagent_states_changed_type: list[CtmagentStateChangedType] """ self._ctmagent_states_changed_type = ctmagent_states_changed_type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CommunicationAnalysisResponseType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/component_key_with_status_type.py b/src/clients/ctm_api_client/models/component_key_with_status_type.py index 525e031..7f51cf3 100644 --- a/src/clients/ctm_api_client/models/component_key_with_status_type.py +++ b/src/clients/ctm_api_client/models/component_key_with_status_type.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ComponentKeyWithStatusType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"component_key": "ComponentMftKeyType", "status": "int"} - - attribute_map = {"component_key": "componentKey", "status": "status"} - - def __init__( - self, component_key=None, status=None, _configuration=None - ): # noqa: E501 - """ComponentKeyWithStatusType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'component_key': 'ComponentMftKeyType', + 'status': 'int' + } + + attribute_map = { + 'component_key': 'componentKey', + 'status': 'status' + } + + def __init__(self, component_key=None, status=None, local_vars_configuration=None): # noqa: E501 + """ComponentKeyWithStatusType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._component_key = None self._status = None @@ -57,7 +65,6 @@ def __init__( def component_key(self): """Gets the component_key of this ComponentKeyWithStatusType. # noqa: E501 - MFT component details # noqa: E501 :return: The component_key of this ComponentKeyWithStatusType. # noqa: E501 :rtype: ComponentMftKeyType @@ -68,10 +75,9 @@ def component_key(self): def component_key(self, component_key): """Sets the component_key of this ComponentKeyWithStatusType. - MFT component details # noqa: E501 :param component_key: The component_key of this ComponentKeyWithStatusType. # noqa: E501 - :type: ComponentMftKeyType + :type component_key: ComponentMftKeyType """ self._component_key = component_key @@ -94,37 +100,40 @@ def status(self, status): Component status # noqa: E501 :param status: The status of this ComponentKeyWithStatusType. # noqa: E501 - :type: int + :type status: int """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ComponentKeyWithStatusType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/component_meta_data_properties.py b/src/clients/ctm_api_client/models/component_meta_data_properties.py index 77646ec..6b76ddc 100644 --- a/src/clients/ctm_api_client/models/component_meta_data_properties.py +++ b/src/clients/ctm_api_client/models/component_meta_data_properties.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ComponentMetaDataProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "display_name": "str", - "display_name_id": "str", - "name": "str", - "sections": "list[SectionMetadataProperties]", + openapi_types = { + 'display_name': 'str', + 'display_name_id': 'str', + 'name': 'str', + 'sections': 'list[SectionMetadataProperties]' } attribute_map = { - "display_name": "displayName", - "display_name_id": "displayNameID", - "name": "name", - "sections": "sections", + 'display_name': 'displayName', + 'display_name_id': 'displayNameID', + 'name': 'name', + 'sections': 'sections' } - def __init__( - self, - display_name=None, - display_name_id=None, - name=None, - sections=None, - _configuration=None, - ): # noqa: E501 - """ComponentMetaDataProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, display_name=None, display_name_id=None, name=None, sections=None, local_vars_configuration=None): # noqa: E501 + """ComponentMetaDataProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._display_name = None self._display_name_id = None @@ -90,7 +87,7 @@ def display_name(self, display_name): :param display_name: The display_name of this ComponentMetaDataProperties. # noqa: E501 - :type: str + :type display_name: str """ self._display_name = display_name @@ -111,7 +108,7 @@ def display_name_id(self, display_name_id): :param display_name_id: The display_name_id of this ComponentMetaDataProperties. # noqa: E501 - :type: str + :type display_name_id: str """ self._display_name_id = display_name_id @@ -132,7 +129,7 @@ def name(self, name): :param name: The name of this ComponentMetaDataProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -153,37 +150,40 @@ def sections(self, sections): :param sections: The sections of this ComponentMetaDataProperties. # noqa: E501 - :type: list[SectionMetadataProperties] + :type sections: list[SectionMetadataProperties] """ self._sections = sections - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ComponentMetaDataProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/component_mft_key_type.py b/src/clients/ctm_api_client/models/component_mft_key_type.py index bc7aa05..2332328 100644 --- a/src/clients/ctm_api_client/models/component_mft_key_type.py +++ b/src/clients/ctm_api_client/models/component_mft_key_type.py @@ -5,68 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ComponentMftKeyType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "type": "str", - "name": "str", - "host": "str", - "node_id": "str", - "appl_type": "str", - "appl_ver": "str", - "cm_ver": "str", + openapi_types = { + 'type': 'str', + 'name': 'str', + 'host': 'str', + 'node_id': 'str', + 'appl_type': 'str', + 'appl_ver': 'str', + 'cm_ver': 'str', + 'ctm_owned_by': 'str' } attribute_map = { - "type": "type", - "name": "name", - "host": "host", - "node_id": "nodeId", - "appl_type": "applType", - "appl_ver": "applVer", - "cm_ver": "cmVer", + 'type': 'type', + 'name': 'name', + 'host': 'host', + 'node_id': 'nodeId', + 'appl_type': 'applType', + 'appl_ver': 'applVer', + 'cm_ver': 'cmVer', + 'ctm_owned_by': 'ctmOwnedBy' } - def __init__( - self, - type=None, - name=None, - host=None, - node_id=None, - appl_type=None, - appl_ver=None, - cm_ver=None, - _configuration=None, - ): # noqa: E501 - """ComponentMftKeyType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, type=None, name=None, host=None, node_id=None, appl_type=None, appl_ver=None, cm_ver=None, ctm_owned_by=None, local_vars_configuration=None): # noqa: E501 + """ComponentMftKeyType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._type = None self._name = None @@ -75,6 +71,7 @@ def __init__( self._appl_type = None self._appl_ver = None self._cm_ver = None + self._ctm_owned_by = None self.discriminator = None if type is not None: @@ -91,6 +88,8 @@ def __init__( self.appl_ver = appl_ver if cm_ver is not None: self.cm_ver = cm_ver + if ctm_owned_by is not None: + self.ctm_owned_by = ctm_owned_by @property def type(self): @@ -110,7 +109,7 @@ def type(self, type): type # noqa: E501 :param type: The type of this ComponentMftKeyType. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -133,7 +132,7 @@ def name(self, name): name # noqa: E501 :param name: The name of this ComponentMftKeyType. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -156,7 +155,7 @@ def host(self, host): host # noqa: E501 :param host: The host of this ComponentMftKeyType. # noqa: E501 - :type: str + :type host: str """ self._host = host @@ -179,7 +178,7 @@ def node_id(self, node_id): node id # noqa: E501 :param node_id: The node_id of this ComponentMftKeyType. # noqa: E501 - :type: str + :type node_id: str """ self._node_id = node_id @@ -202,7 +201,7 @@ def appl_type(self, appl_type): application type # noqa: E501 :param appl_type: The appl_type of this ComponentMftKeyType. # noqa: E501 - :type: str + :type appl_type: str """ self._appl_type = appl_type @@ -225,7 +224,7 @@ def appl_ver(self, appl_ver): application version # noqa: E501 :param appl_ver: The appl_ver of this ComponentMftKeyType. # noqa: E501 - :type: str + :type appl_ver: str """ self._appl_ver = appl_ver @@ -248,37 +247,63 @@ def cm_ver(self, cm_ver): cm version # noqa: E501 :param cm_ver: The cm_ver of this ComponentMftKeyType. # noqa: E501 - :type: str + :type cm_ver: str """ self._cm_ver = cm_ver - def to_dict(self): + @property + def ctm_owned_by(self): + """Gets the ctm_owned_by of this ComponentMftKeyType. # noqa: E501 + + ctm owned by # noqa: E501 + + :return: The ctm_owned_by of this ComponentMftKeyType. # noqa: E501 + :rtype: str + """ + return self._ctm_owned_by + + @ctm_owned_by.setter + def ctm_owned_by(self, ctm_owned_by): + """Sets the ctm_owned_by of this ComponentMftKeyType. + + ctm owned by # noqa: E501 + + :param ctm_owned_by: The ctm_owned_by of this ComponentMftKeyType. # noqa: E501 + :type ctm_owned_by: str + """ + + self._ctm_owned_by = ctm_owned_by + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ComponentMftKeyType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/condition_properties.py b/src/clients/ctm_api_client/models/condition_properties.py index 8f7adb0..752249b 100644 --- a/src/clients/ctm_api_client/models/condition_properties.py +++ b/src/clients/ctm_api_client/models/condition_properties.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ConditionProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"key": "SettingKeyProperties", "operator": "str", "value": "str"} - - attribute_map = {"key": "key", "operator": "operator", "value": "value"} - - def __init__( - self, key=None, operator=None, value=None, _configuration=None - ): # noqa: E501 - """ConditionProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'key': 'SettingKeyProperties', + 'operator': 'str', + 'value': 'str' + } + + attribute_map = { + 'key': 'key', + 'operator': 'operator', + 'value': 'value' + } + + def __init__(self, key=None, operator=None, value=None, local_vars_configuration=None): # noqa: E501 + """ConditionProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._key = None self._operator = None @@ -72,7 +82,7 @@ def key(self, key): :param key: The key of this ConditionProperties. # noqa: E501 - :type: SettingKeyProperties + :type key: SettingKeyProperties """ self._key = key @@ -93,7 +103,7 @@ def operator(self, operator): :param operator: The operator of this ConditionProperties. # noqa: E501 - :type: str + :type operator: str """ self._operator = operator @@ -114,37 +124,40 @@ def value(self, value): :param value: The value of this ConditionProperties. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ConditionProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/configuration_manager_privilege_category.py b/src/clients/ctm_api_client/models/configuration_manager_privilege_category.py index affaab6..c28994c 100644 --- a/src/clients/ctm_api_client/models/configuration_manager_privilege_category.py +++ b/src/clients/ctm_api_client/models/configuration_manager_privilege_category.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ConfigurationManagerPrivilegeCategory(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "authorization": "str", - "configuration_manager_access": "str", - "configuration": "str", - "operation": "str", - "database": "str", - "controlm_security": "str", + openapi_types = { + 'authorization': 'str', + 'configuration_manager_access': 'str', + 'configuration': 'str', + 'operation': 'str', + 'database': 'str', + 'controlm_security': 'str' } attribute_map = { - "authorization": "Authorization", - "configuration_manager_access": "ConfigurationManagerAccess", - "configuration": "Configuration", - "operation": "Operation", - "database": "Database", - "controlm_security": "ControlmSecurity", + 'authorization': 'Authorization', + 'configuration_manager_access': 'ConfigurationManagerAccess', + 'configuration': 'Configuration', + 'operation': 'Operation', + 'database': 'Database', + 'controlm_security': 'ControlmSecurity' } - def __init__( - self, - authorization=None, - configuration_manager_access=None, - configuration=None, - operation=None, - database=None, - controlm_security=None, - _configuration=None, - ): # noqa: E501 - """ConfigurationManagerPrivilegeCategory - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, authorization=None, configuration_manager_access=None, configuration=None, operation=None, database=None, controlm_security=None, local_vars_configuration=None): # noqa: E501 + """ConfigurationManagerPrivilegeCategory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._authorization = None self._configuration_manager_access = None @@ -104,7 +99,7 @@ def authorization(self, authorization): Authorization access level (None, Browse, Update, Full) # noqa: E501 :param authorization: The authorization of this ConfigurationManagerPrivilegeCategory. # noqa: E501 - :type: str + :type authorization: str """ self._authorization = authorization @@ -127,7 +122,7 @@ def configuration_manager_access(self, configuration_manager_access): Control-M Configuration Manager access level (None, Full) # noqa: E501 :param configuration_manager_access: The configuration_manager_access of this ConfigurationManagerPrivilegeCategory. # noqa: E501 - :type: str + :type configuration_manager_access: str """ self._configuration_manager_access = configuration_manager_access @@ -150,7 +145,7 @@ def configuration(self, configuration): Configuration access level (None, Browse, Update, Full) # noqa: E501 :param configuration: The configuration of this ConfigurationManagerPrivilegeCategory. # noqa: E501 - :type: str + :type configuration: str """ self._configuration = configuration @@ -173,7 +168,7 @@ def operation(self, operation): Operation access level (None, Browse, Update, Full) # noqa: E501 :param operation: The operation of this ConfigurationManagerPrivilegeCategory. # noqa: E501 - :type: str + :type operation: str """ self._operation = operation @@ -196,7 +191,7 @@ def database(self, database): Database Maintenance access level (None, Browse, Update, Full) # noqa: E501 :param database: The database of this ConfigurationManagerPrivilegeCategory. # noqa: E501 - :type: str + :type database: str """ self._database = database @@ -219,37 +214,40 @@ def controlm_security(self, controlm_security): Security access level (None, Browse, Update, Full) # noqa: E501 :param controlm_security: The controlm_security of this ConfigurationManagerPrivilegeCategory. # noqa: E501 - :type: str + :type controlm_security: str """ self._controlm_security = controlm_security - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ConfigurationManagerPrivilegeCategory, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/connection_profile_deployment_info.py b/src/clients/ctm_api_client/models/connection_profile_deployment_info.py index a5127d0..ff3fbde 100644 --- a/src/clients/ctm_api_client/models/connection_profile_deployment_info.py +++ b/src/clients/ctm_api_client/models/connection_profile_deployment_info.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ConnectionProfileDeploymentInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm_name": "str", - "status": "str", - "status_code": "int", - "last_update": "str", - "message": "str", + openapi_types = { + 'ctm_name': 'str', + 'status': 'str', + 'status_code': 'int', + 'last_update': 'str', + 'message': 'str' } attribute_map = { - "ctm_name": "ctmName", - "status": "status", - "status_code": "statusCode", - "last_update": "lastUpdate", - "message": "message", + 'ctm_name': 'ctmName', + 'status': 'status', + 'status_code': 'statusCode', + 'last_update': 'lastUpdate', + 'message': 'message' } - def __init__( - self, - ctm_name=None, - status=None, - status_code=None, - last_update=None, - message=None, - _configuration=None, - ): # noqa: E501 - """ConnectionProfileDeploymentInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm_name=None, status=None, status_code=None, last_update=None, message=None, local_vars_configuration=None): # noqa: E501 + """ConnectionProfileDeploymentInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm_name = None self._status = None @@ -98,7 +94,7 @@ def ctm_name(self, ctm_name): The logical name of Control-M/Server # noqa: E501 :param ctm_name: The ctm_name of this ConnectionProfileDeploymentInfo. # noqa: E501 - :type: str + :type ctm_name: str """ self._ctm_name = ctm_name @@ -121,7 +117,7 @@ def status(self, status): The deployment status of connection profile # noqa: E501 :param status: The status of this ConnectionProfileDeploymentInfo. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -144,7 +140,7 @@ def status_code(self, status_code): The deployment status code of connection profile # noqa: E501 :param status_code: The status_code of this ConnectionProfileDeploymentInfo. # noqa: E501 - :type: int + :type status_code: int """ self._status_code = status_code @@ -167,7 +163,7 @@ def last_update(self, last_update): UTC date of the modification # noqa: E501 :param last_update: The last_update of this ConnectionProfileDeploymentInfo. # noqa: E501 - :type: str + :type last_update: str """ self._last_update = last_update @@ -190,37 +186,40 @@ def message(self, message): Status information # noqa: E501 :param message: The message of this ConnectionProfileDeploymentInfo. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ConnectionProfileDeploymentInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/connection_profile_status.py b/src/clients/ctm_api_client/models/connection_profile_status.py index d56a915..3c09d4b 100644 --- a/src/clients/ctm_api_client/models/connection_profile_status.py +++ b/src/clients/ctm_api_client/models/connection_profile_status.py @@ -5,71 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ConnectionProfileStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "type": "str", - "description": "str", - "time_modified": "str", - "time_created": "str", - "creator_name": "str", - "modifier_name": "str", - "sync_status": "str", + openapi_types = { + 'name': 'str', + 'type': 'str', + 'description': 'str', + 'time_modified': 'str', + 'time_created': 'str', + 'creator_name': 'str', + 'modifier_name': 'str', + 'sync_status': 'str' } attribute_map = { - "name": "name", - "type": "type", - "description": "description", - "time_modified": "timeModified", - "time_created": "timeCreated", - "creator_name": "creatorName", - "modifier_name": "modifierName", - "sync_status": "syncStatus", + 'name': 'name', + 'type': 'type', + 'description': 'description', + 'time_modified': 'timeModified', + 'time_created': 'timeCreated', + 'creator_name': 'creatorName', + 'modifier_name': 'modifierName', + 'sync_status': 'syncStatus' } - def __init__( - self, - name=None, - type=None, - description=None, - time_modified=None, - time_created=None, - creator_name=None, - modifier_name=None, - sync_status=None, - _configuration=None, - ): # noqa: E501 - """ConnectionProfileStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, type=None, description=None, time_modified=None, time_created=None, creator_name=None, modifier_name=None, sync_status=None, local_vars_configuration=None): # noqa: E501 + """ConnectionProfileStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._type = None @@ -116,7 +109,7 @@ def name(self, name): connection profile name # noqa: E501 :param name: The name of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -139,7 +132,7 @@ def type(self, type): connection profile type # noqa: E501 :param type: The type of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -162,7 +155,7 @@ def description(self, description): connection profile description # noqa: E501 :param description: The description of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -185,7 +178,7 @@ def time_modified(self, time_modified): UTC date of the modification # noqa: E501 :param time_modified: The time_modified of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type time_modified: str """ self._time_modified = time_modified @@ -208,7 +201,7 @@ def time_created(self, time_created): UTC date of the creation # noqa: E501 :param time_created: The time_created of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type time_created: str """ self._time_created = time_created @@ -231,7 +224,7 @@ def creator_name(self, creator_name): creator's name # noqa: E501 :param creator_name: The creator_name of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type creator_name: str """ self._creator_name = creator_name @@ -254,7 +247,7 @@ def modifier_name(self, modifier_name): modifier's name # noqa: E501 :param modifier_name: The modifier_name of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type modifier_name: str """ self._modifier_name = modifier_name @@ -277,37 +270,40 @@ def sync_status(self, sync_status): Status calculated by the server according to the list of statuses with each server # noqa: E501 :param sync_status: The sync_status of this ConnectionProfileStatus. # noqa: E501 - :type: str + :type sync_status: str """ self._sync_status = sync_status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ConnectionProfileStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/connection_profiles_deployment_status_result.py b/src/clients/ctm_api_client/models/connection_profiles_deployment_status_result.py index 5be40d4..480484b 100644 --- a/src/clients/ctm_api_client/models/connection_profiles_deployment_status_result.py +++ b/src/clients/ctm_api_client/models/connection_profiles_deployment_status_result.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ConnectionProfilesDeploymentStatusResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "deployment_status": "str", - "deployment_info": "list[ConnectionProfileDeploymentInfo]", + openapi_types = { + 'deployment_status': 'str', + 'deployment_info': 'list[ConnectionProfileDeploymentInfo]' } attribute_map = { - "deployment_status": "deploymentStatus", - "deployment_info": "deploymentInfo", + 'deployment_status': 'deploymentStatus', + 'deployment_info': 'deploymentInfo' } - def __init__( - self, deployment_status=None, deployment_info=None, _configuration=None - ): # noqa: E501 - """ConnectionProfilesDeploymentStatusResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, deployment_status=None, deployment_info=None, local_vars_configuration=None): # noqa: E501 + """ConnectionProfilesDeploymentStatusResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._deployment_status = None self._deployment_info = None @@ -77,7 +79,7 @@ def deployment_status(self, deployment_status): Deployment status calculated by the server according to the list of statuses with each Control-M/Server # noqa: E501 :param deployment_status: The deployment_status of this ConnectionProfilesDeploymentStatusResult. # noqa: E501 - :type: str + :type deployment_status: str """ self._deployment_status = deployment_status @@ -100,37 +102,40 @@ def deployment_info(self, deployment_info): The detailed deployment status per Control-M/Server # noqa: E501 :param deployment_info: The deployment_info of this ConnectionProfilesDeploymentStatusResult. # noqa: E501 - :type: list[ConnectionProfileDeploymentInfo] + :type deployment_info: list[ConnectionProfileDeploymentInfo] """ self._deployment_info = deployment_info - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ConnectionProfilesDeploymentStatusResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/connection_profiles_status_result.py b/src/clients/ctm_api_client/models/connection_profiles_status_result.py index 50d474c..7f9e71e 100644 --- a/src/clients/ctm_api_client/models/connection_profiles_status_result.py +++ b/src/clients/ctm_api_client/models/connection_profiles_status_result.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ConnectionProfilesStatusResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "statuses": "list[ConnectionProfileStatus]", - "returned": "int", - "total": "int", + openapi_types = { + 'statuses': 'list[ConnectionProfileStatus]', + 'returned': 'int', + 'total': 'int' } - attribute_map = {"statuses": "statuses", "returned": "returned", "total": "total"} + attribute_map = { + 'statuses': 'statuses', + 'returned': 'returned', + 'total': 'total' + } - def __init__( - self, statuses=None, returned=None, total=None, _configuration=None - ): # noqa: E501 - """ConnectionProfilesStatusResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, statuses=None, returned=None, total=None, local_vars_configuration=None): # noqa: E501 + """ConnectionProfilesStatusResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._statuses = None self._returned = None @@ -78,7 +84,7 @@ def statuses(self, statuses): The list of statuses tracked by the given runId. # noqa: E501 :param statuses: The statuses of this ConnectionProfilesStatusResult. # noqa: E501 - :type: list[ConnectionProfileStatus] + :type statuses: list[ConnectionProfileStatus] """ self._statuses = statuses @@ -101,7 +107,7 @@ def returned(self, returned): The number of the return items by the search. # noqa: E501 :param returned: The returned of this ConnectionProfilesStatusResult. # noqa: E501 - :type: int + :type returned: int """ self._returned = returned @@ -124,37 +130,40 @@ def total(self, total): The total number of items. # noqa: E501 :param total: The total of this ConnectionProfilesStatusResult. # noqa: E501 - :type: int + :type total: int """ self._total = total - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ConnectionProfilesStatusResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/control_m_authentication_data.py b/src/clients/ctm_api_client/models/control_m_authentication_data.py index 5dda3b7..9bc01bb 100644 --- a/src/clients/ctm_api_client/models/control_m_authentication_data.py +++ b/src/clients/ctm_api_client/models/control_m_authentication_data.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ControlMAuthenticationData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "password": "str", - "password_expiration_days": "int", - "change_password_at_next_login": "bool", - "lock_account": "bool", - "account_locked_on_date": "str", + openapi_types = { + 'password': 'str', + 'password_expiration_days': 'int', + 'change_password_at_next_login': 'bool', + 'lock_account': 'bool', + 'account_locked_on_date': 'str' } attribute_map = { - "password": "Password", - "password_expiration_days": "PasswordExpirationDays", - "change_password_at_next_login": "ChangePasswordAtNextLogin", - "lock_account": "LockAccount", - "account_locked_on_date": "AccountLockedOnDate", + 'password': 'Password', + 'password_expiration_days': 'PasswordExpirationDays', + 'change_password_at_next_login': 'ChangePasswordAtNextLogin', + 'lock_account': 'LockAccount', + 'account_locked_on_date': 'AccountLockedOnDate' } - def __init__( - self, - password=None, - password_expiration_days=None, - change_password_at_next_login=None, - lock_account=None, - account_locked_on_date=None, - _configuration=None, - ): # noqa: E501 - """ControlMAuthenticationData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, password=None, password_expiration_days=None, change_password_at_next_login=None, lock_account=None, account_locked_on_date=None, local_vars_configuration=None): # noqa: E501 + """ControlMAuthenticationData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._password = None self._password_expiration_days = None @@ -98,7 +94,7 @@ def password(self, password): password or secret # noqa: E501 :param password: The password of this ControlMAuthenticationData. # noqa: E501 - :type: str + :type password: str """ self._password = password @@ -121,7 +117,7 @@ def password_expiration_days(self, password_expiration_days): number of days until the password expires # noqa: E501 :param password_expiration_days: The password_expiration_days of this ControlMAuthenticationData. # noqa: E501 - :type: int + :type password_expiration_days: int """ self._password_expiration_days = password_expiration_days @@ -144,7 +140,7 @@ def change_password_at_next_login(self, change_password_at_next_login): should password be changed in next login # noqa: E501 :param change_password_at_next_login: The change_password_at_next_login of this ControlMAuthenticationData. # noqa: E501 - :type: bool + :type change_password_at_next_login: bool """ self._change_password_at_next_login = change_password_at_next_login @@ -167,7 +163,7 @@ def lock_account(self, lock_account): lock account # noqa: E501 :param lock_account: The lock_account of this ControlMAuthenticationData. # noqa: E501 - :type: bool + :type lock_account: bool """ self._lock_account = lock_account @@ -190,37 +186,40 @@ def account_locked_on_date(self, account_locked_on_date): account locked on date # noqa: E501 :param account_locked_on_date: The account_locked_on_date of this ControlMAuthenticationData. # noqa: E501 - :type: str + :type account_locked_on_date: str """ self._account_locked_on_date = account_locked_on_date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ControlMAuthenticationData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/cp_mng_auth.py b/src/clients/ctm_api_client/models/cp_mng_auth.py index 7669786..509a6d0 100644 --- a/src/clients/ctm_api_client/models/cp_mng_auth.py +++ b/src/clients/ctm_api_client/models/cp_mng_auth.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CPMngAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "controlm_server": "str", - "agent": "str", - "plugin_type": "str", - "name": "str", - "privilege": "str", + openapi_types = { + 'controlm_server': 'str', + 'agent': 'str', + 'plugin_type': 'str', + 'name': 'str', + 'privilege': 'str' } attribute_map = { - "controlm_server": "ControlmServer", - "agent": "Agent", - "plugin_type": "PluginType", - "name": "Name", - "privilege": "Privilege", + 'controlm_server': 'ControlmServer', + 'agent': 'Agent', + 'plugin_type': 'PluginType', + 'name': 'Name', + 'privilege': 'Privilege' } - def __init__( - self, - controlm_server=None, - agent=None, - plugin_type=None, - name=None, - privilege=None, - _configuration=None, - ): # noqa: E501 - """CPMngAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, controlm_server=None, agent=None, plugin_type=None, name=None, privilege=None, local_vars_configuration=None): # noqa: E501 + """CPMngAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._controlm_server = None self._agent = None @@ -98,7 +94,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this CPMngAuth. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -121,7 +117,7 @@ def agent(self, agent): agent name # noqa: E501 :param agent: The agent of this CPMngAuth. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -144,7 +140,7 @@ def plugin_type(self, plugin_type): plugin type # noqa: E501 :param plugin_type: The plugin_type of this CPMngAuth. # noqa: E501 - :type: str + :type plugin_type: str """ self._plugin_type = plugin_type @@ -167,7 +163,7 @@ def name(self, name): connection profile name # noqa: E501 :param name: The name of this CPMngAuth. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -190,37 +186,40 @@ def privilege(self, privilege): access level (full, update, browse) # noqa: E501 :param privilege: The privilege of this CPMngAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CPMngAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctm_details.py b/src/clients/ctm_api_client/models/ctm_details.py index c820ca5..9feb9b6 100644 --- a/src/clients/ctm_api_client/models/ctm_details.py +++ b/src/clients/ctm_api_client/models/ctm_details.py @@ -5,68 +5,73 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "host": "str", - "state": "str", - "message": "str", - "version": "str", + openapi_types = { + 'name': 'str', + 'host': 'str', + 'state': 'str', + 'desired_state': 'str', + 'message': 'str', + 'version': 'str', + 'os_type': 'str', + 'status': 'str' } attribute_map = { - "name": "name", - "host": "host", - "state": "state", - "message": "message", - "version": "version", + 'name': 'name', + 'host': 'host', + 'state': 'state', + 'desired_state': 'desiredState', + 'message': 'message', + 'version': 'version', + 'os_type': 'OSType', + 'status': 'status' } - def __init__( - self, - name=None, - host=None, - state=None, - message=None, - version=None, - _configuration=None, - ): # noqa: E501 - """CtmDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, host=None, state=None, desired_state=None, message=None, version=None, os_type=None, status=None, local_vars_configuration=None): # noqa: E501 + """CtmDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._host = None self._state = None + self._desired_state = None self._message = None self._version = None + self._os_type = None + self._status = None self.discriminator = None if name is not None: @@ -75,10 +80,16 @@ def __init__( self.host = host if state is not None: self.state = state + if desired_state is not None: + self.desired_state = desired_state if message is not None: self.message = message if version is not None: self.version = version + if os_type is not None: + self.os_type = os_type + if status is not None: + self.status = status @property def name(self): @@ -98,7 +109,7 @@ def name(self, name): The unique name of the Control-M Server. # noqa: E501 :param name: The name of this CtmDetails. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -121,7 +132,7 @@ def host(self, host): The hostname of the Control-M Server is running on. # noqa: E501 :param host: The host of this CtmDetails. # noqa: E501 - :type: str + :type host: str """ self._host = host @@ -144,11 +155,34 @@ def state(self, state): Control-M Server state [up|down]. # noqa: E501 :param state: The state of this CtmDetails. # noqa: E501 - :type: str + :type state: str """ self._state = state + @property + def desired_state(self): + """Gets the desired_state of this CtmDetails. # noqa: E501 + + Control-M Server state [UP|DOWN|RECYCLE|IGNORE]. # noqa: E501 + + :return: The desired_state of this CtmDetails. # noqa: E501 + :rtype: str + """ + return self._desired_state + + @desired_state.setter + def desired_state(self, desired_state): + """Sets the desired_state of this CtmDetails. + + Control-M Server state [UP|DOWN|RECYCLE|IGNORE]. # noqa: E501 + + :param desired_state: The desired_state of this CtmDetails. # noqa: E501 + :type desired_state: str + """ + + self._desired_state = desired_state + @property def message(self): """Gets the message of this CtmDetails. # noqa: E501 @@ -167,7 +201,7 @@ def message(self, message): Control-M Server message describing the communication status. # noqa: E501 :param message: The message of this CtmDetails. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -190,37 +224,86 @@ def version(self, version): Control-M Server version. # noqa: E501 :param version: The version of this CtmDetails. # noqa: E501 - :type: str + :type version: str """ self._version = version - def to_dict(self): + @property + def os_type(self): + """Gets the os_type of this CtmDetails. # noqa: E501 + + Control-M Server Operating System. # noqa: E501 + + :return: The os_type of this CtmDetails. # noqa: E501 + :rtype: str + """ + return self._os_type + + @os_type.setter + def os_type(self, os_type): + """Sets the os_type of this CtmDetails. + + Control-M Server Operating System. # noqa: E501 + + :param os_type: The os_type of this CtmDetails. # noqa: E501 + :type os_type: str + """ + + self._os_type = os_type + + @property + def status(self): + """Gets the status of this CtmDetails. # noqa: E501 + + Control-M Server status calculated by the CTM Server. # noqa: E501 + + :return: The status of this CtmDetails. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CtmDetails. + + Control-M Server status calculated by the CTM Server. # noqa: E501 + + :param status: The status of this CtmDetails. # noqa: E501 + :type status: str + """ + + self._status = status + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctm_details_list.py b/src/clients/ctm_api_client/models/ctm_details_list.py deleted file mode 100644 index 2733f5f..0000000 --- a/src/clients/ctm_api_client/models/ctm_details_list.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class CtmDetailsList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """CtmDetailsList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(CtmDetailsList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CtmDetailsList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CtmDetailsList): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/ctm_name_value_sw.py b/src/clients/ctm_api_client/models/ctm_name_value_sw.py index 3afc4c3..094cd10 100644 --- a/src/clients/ctm_api_client/models/ctm_name_value_sw.py +++ b/src/clients/ctm_api_client/models/ctm_name_value_sw.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CTMNameValueSW(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"c_tm_attr_name": "str", "c_tm_attr_value": "str"} - - attribute_map = {"c_tm_attr_name": "cTMAttrName", "c_tm_attr_value": "cTMAttrValue"} - - def __init__( - self, c_tm_attr_name=None, c_tm_attr_value=None, _configuration=None - ): # noqa: E501 - """CTMNameValueSW - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'c_tm_attr_name': 'str', + 'c_tm_attr_value': 'str' + } + + attribute_map = { + 'c_tm_attr_name': 'cTMAttrName', + 'c_tm_attr_value': 'cTMAttrValue' + } + + def __init__(self, c_tm_attr_name=None, c_tm_attr_value=None, local_vars_configuration=None): # noqa: E501 + """CTMNameValueSW - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._c_tm_attr_name = None self._c_tm_attr_value = None @@ -69,7 +77,7 @@ def c_tm_attr_name(self, c_tm_attr_name): :param c_tm_attr_name: The c_tm_attr_name of this CTMNameValueSW. # noqa: E501 - :type: str + :type c_tm_attr_name: str """ self._c_tm_attr_name = c_tm_attr_name @@ -90,37 +98,40 @@ def c_tm_attr_value(self, c_tm_attr_value): :param c_tm_attr_value: The c_tm_attr_value of this CTMNameValueSW. # noqa: E501 - :type: str + :type c_tm_attr_value: str """ self._c_tm_attr_value = c_tm_attr_value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CTMNameValueSW, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmag_set_extract_service_status.py b/src/clients/ctm_api_client/models/ctmag_set_extract_service_status.py index 5ce2d39..c547886 100644 --- a/src/clients/ctm_api_client/models/ctmag_set_extract_service_status.py +++ b/src/clients/ctm_api_client/models/ctmag_set_extract_service_status.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmagSetExtractServiceStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"aistatus": "str"} + openapi_types = { + 'aistatus': 'str' + } - attribute_map = {"aistatus": "aistatus"} + attribute_map = { + 'aistatus': 'aistatus' + } - def __init__(self, aistatus=None, _configuration=None): # noqa: E501 - """CtmagSetExtractServiceStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, aistatus=None, local_vars_configuration=None): # noqa: E501 + """CtmagSetExtractServiceStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._aistatus = None self.discriminator = None @@ -66,37 +74,40 @@ def aistatus(self, aistatus): the updated agent service status # noqa: E501 :param aistatus: The aistatus of this CtmagSetExtractServiceStatus. # noqa: E501 - :type: str + :type aistatus: str """ self._aistatus = aistatus - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmagSetExtractServiceStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmagent_basic_info_type.py b/src/clients/ctm_api_client/models/ctmagent_basic_info_type.py index c9f450f..547cecb 100644 --- a/src/clients/ctm_api_client/models/ctmagent_basic_info_type.py +++ b/src/clients/ctm_api_client/models/ctmagent_basic_info_type.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmagentBasicInfoType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "server_to_agent_port_number": "int", - "agent_to_server_port_number": "int", - "persistent_connection": "str", - "tcpssl_server_mode": "str", - "protocol_version": "str", - "agent_status": "str", - "ip_addresses_list": "list[str]", + openapi_types = { + 'server_to_agent_port_number': 'int', + 'agent_to_server_port_number': 'int', + 'persistent_connection': 'str', + 'tcpssl_server_mode': 'str', + 'protocol_version': 'str', + 'agent_status': 'str', + 'ip_addresses_list': 'list[str]' } attribute_map = { - "server_to_agent_port_number": "serverToAgentPortNumber", - "agent_to_server_port_number": "agentToServerPortNumber", - "persistent_connection": "persistentConnection", - "tcpssl_server_mode": "tcpsslServerMode", - "protocol_version": "protocolVersion", - "agent_status": "agentStatus", - "ip_addresses_list": "ipAddressesList", + 'server_to_agent_port_number': 'serverToAgentPortNumber', + 'agent_to_server_port_number': 'agentToServerPortNumber', + 'persistent_connection': 'persistentConnection', + 'tcpssl_server_mode': 'tcpsslServerMode', + 'protocol_version': 'protocolVersion', + 'agent_status': 'agentStatus', + 'ip_addresses_list': 'ipAddressesList' } - def __init__( - self, - server_to_agent_port_number=None, - agent_to_server_port_number=None, - persistent_connection=None, - tcpssl_server_mode=None, - protocol_version=None, - agent_status=None, - ip_addresses_list=None, - _configuration=None, - ): # noqa: E501 - """CtmagentBasicInfoType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, server_to_agent_port_number=None, agent_to_server_port_number=None, persistent_connection=None, tcpssl_server_mode=None, protocol_version=None, agent_status=None, ip_addresses_list=None, local_vars_configuration=None): # noqa: E501 + """CtmagentBasicInfoType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._server_to_agent_port_number = None self._agent_to_server_port_number = None @@ -110,7 +104,7 @@ def server_to_agent_port_number(self, server_to_agent_port_number): server to agent port number # noqa: E501 :param server_to_agent_port_number: The server_to_agent_port_number of this CtmagentBasicInfoType. # noqa: E501 - :type: int + :type server_to_agent_port_number: int """ self._server_to_agent_port_number = server_to_agent_port_number @@ -133,7 +127,7 @@ def agent_to_server_port_number(self, agent_to_server_port_number): agent to server port number # noqa: E501 :param agent_to_server_port_number: The agent_to_server_port_number of this CtmagentBasicInfoType. # noqa: E501 - :type: int + :type agent_to_server_port_number: int """ self._agent_to_server_port_number = agent_to_server_port_number @@ -156,7 +150,7 @@ def persistent_connection(self, persistent_connection): is Server-Agent connection transient or perssistent # noqa: E501 :param persistent_connection: The persistent_connection of this CtmagentBasicInfoType. # noqa: E501 - :type: str + :type persistent_connection: str """ self._persistent_connection = persistent_connection @@ -179,7 +173,7 @@ def tcpssl_server_mode(self, tcpssl_server_mode): is connection TCP or SSL # noqa: E501 :param tcpssl_server_mode: The tcpssl_server_mode of this CtmagentBasicInfoType. # noqa: E501 - :type: str + :type tcpssl_server_mode: str """ self._tcpssl_server_mode = tcpssl_server_mode @@ -202,7 +196,7 @@ def protocol_version(self, protocol_version): communication protocol version of the Server-Agent # noqa: E501 :param protocol_version: The protocol_version of this CtmagentBasicInfoType. # noqa: E501 - :type: str + :type protocol_version: str """ self._protocol_version = protocol_version @@ -225,7 +219,7 @@ def agent_status(self, agent_status): the Agent's status message # noqa: E501 :param agent_status: The agent_status of this CtmagentBasicInfoType. # noqa: E501 - :type: str + :type agent_status: str """ self._agent_status = agent_status @@ -246,37 +240,40 @@ def ip_addresses_list(self, ip_addresses_list): :param ip_addresses_list: The ip_addresses_list of this CtmagentBasicInfoType. # noqa: E501 - :type: list[str] + :type ip_addresses_list: list[str] """ self._ip_addresses_list = ip_addresses_list - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmagentBasicInfoType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmagent_ctm_test_type.py b/src/clients/ctm_api_client/models/ctmagent_ctm_test_type.py index 218576d..8d28210 100644 --- a/src/clients/ctm_api_client/models/ctmagent_ctm_test_type.py +++ b/src/clients/ctm_api_client/models/ctmagent_ctm_test_type.py @@ -5,71 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmagentCtmTestType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "title": "str", - "result": "str", - "message": "str", - "user_action": "str", - "command": "str", - "command_output": "str", - "advanced": "int", - "ordinal": "int", + openapi_types = { + 'title': 'str', + 'result': 'str', + 'message': 'str', + 'user_action': 'str', + 'command': 'str', + 'command_output': 'str', + 'advanced': 'int', + 'ordinal': 'int' } attribute_map = { - "title": "title", - "result": "result", - "message": "message", - "user_action": "userAction", - "command": "command", - "command_output": "commandOutput", - "advanced": "advanced", - "ordinal": "ordinal", + 'title': 'title', + 'result': 'result', + 'message': 'message', + 'user_action': 'userAction', + 'command': 'command', + 'command_output': 'commandOutput', + 'advanced': 'advanced', + 'ordinal': 'ordinal' } - def __init__( - self, - title=None, - result=None, - message=None, - user_action=None, - command=None, - command_output=None, - advanced=None, - ordinal=None, - _configuration=None, - ): # noqa: E501 - """CtmagentCtmTestType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, title=None, result=None, message=None, user_action=None, command=None, command_output=None, advanced=None, ordinal=None, local_vars_configuration=None): # noqa: E501 + """CtmagentCtmTestType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._title = None self._result = None @@ -116,7 +109,7 @@ def title(self, title): the test title # noqa: E501 :param title: The title of this CtmagentCtmTestType. # noqa: E501 - :type: str + :type title: str """ self._title = title @@ -139,7 +132,7 @@ def result(self, result): the test result # noqa: E501 :param result: The result of this CtmagentCtmTestType. # noqa: E501 - :type: str + :type result: str """ self._result = result @@ -162,7 +155,7 @@ def message(self, message): the test message # noqa: E501 :param message: The message of this CtmagentCtmTestType. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -185,7 +178,7 @@ def user_action(self, user_action): the action user initiated # noqa: E501 :param user_action: The user_action of this CtmagentCtmTestType. # noqa: E501 - :type: str + :type user_action: str """ self._user_action = user_action @@ -208,7 +201,7 @@ def command(self, command): the test's command # noqa: E501 :param command: The command of this CtmagentCtmTestType. # noqa: E501 - :type: str + :type command: str """ self._command = command @@ -231,7 +224,7 @@ def command_output(self, command_output): the command's output # noqa: E501 :param command_output: The command_output of this CtmagentCtmTestType. # noqa: E501 - :type: str + :type command_output: str """ self._command_output = command_output @@ -254,7 +247,7 @@ def advanced(self, advanced): the test advanced option # noqa: E501 :param advanced: The advanced of this CtmagentCtmTestType. # noqa: E501 - :type: int + :type advanced: int """ self._advanced = advanced @@ -277,37 +270,40 @@ def ordinal(self, ordinal): the test oridnal # noqa: E501 :param ordinal: The ordinal of this CtmagentCtmTestType. # noqa: E501 - :type: int + :type ordinal: int """ self._ordinal = ordinal - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmagentCtmTestType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmagent_state_changed_type.py b/src/clients/ctm_api_client/models/ctmagent_state_changed_type.py index 7a8e627..26861e1 100644 --- a/src/clients/ctm_api_client/models/ctmagent_state_changed_type.py +++ b/src/clients/ctm_api_client/models/ctmagent_state_changed_type.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmagentStateChangedType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "timestamp": "str", - "status": "str", - "message": "str", - "ordinal": "int", + openapi_types = { + 'timestamp': 'str', + 'status': 'str', + 'message': 'str', + 'ordinal': 'int' } attribute_map = { - "timestamp": "timestamp", - "status": "status", - "message": "message", - "ordinal": "ordinal", + 'timestamp': 'timestamp', + 'status': 'status', + 'message': 'message', + 'ordinal': 'ordinal' } - def __init__( - self, - timestamp=None, - status=None, - message=None, - ordinal=None, - _configuration=None, - ): # noqa: E501 - """CtmagentStateChangedType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, timestamp=None, status=None, message=None, ordinal=None, local_vars_configuration=None): # noqa: E501 + """CtmagentStateChangedType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._timestamp = None self._status = None @@ -92,7 +89,7 @@ def timestamp(self, timestamp): the Agent state change timestamp # noqa: E501 :param timestamp: The timestamp of this CtmagentStateChangedType. # noqa: E501 - :type: str + :type timestamp: str """ self._timestamp = timestamp @@ -115,7 +112,7 @@ def status(self, status): the Agent state change status # noqa: E501 :param status: The status of this CtmagentStateChangedType. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -138,7 +135,7 @@ def message(self, message): the Agent state change message # noqa: E501 :param message: The message of this CtmagentStateChangedType. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -161,37 +158,40 @@ def ordinal(self, ordinal): the state change ordinal # noqa: E501 :param ordinal: The ordinal of this CtmagentStateChangedType. # noqa: E501 - :type: int + :type ordinal: int """ self._ordinal = ordinal - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmagentStateChangedType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_del_result_item.py b/src/clients/ctm_api_client/models/ctmvar_del_result_item.py index 89dc651..247e8e9 100644 --- a/src/clients/ctm_api_client/models/ctmvar_del_result_item.py +++ b/src/clients/ctm_api_client/models/ctmvar_del_result_item.py @@ -5,44 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarDelResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"del_pool_variables_error_info": "PoolVariablesErrorInfo"} + openapi_types = { + 'del_pool_variables_error_info': 'PoolVariablesErrorInfo' + } - attribute_map = {"del_pool_variables_error_info": "del_pool_variables_error_info"} + attribute_map = { + 'del_pool_variables_error_info': 'del_pool_variables_error_info' + } - def __init__( - self, del_pool_variables_error_info=None, _configuration=None - ): # noqa: E501 - """CtmvarDelResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, del_pool_variables_error_info=None, local_vars_configuration=None): # noqa: E501 + """CtmvarDelResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._del_pool_variables_error_info = None self.discriminator = None @@ -66,37 +72,40 @@ def del_pool_variables_error_info(self, del_pool_variables_error_info): :param del_pool_variables_error_info: The del_pool_variables_error_info of this CtmvarDelResultItem. # noqa: E501 - :type: PoolVariablesErrorInfo + :type del_pool_variables_error_info: PoolVariablesErrorInfo """ self._del_pool_variables_error_info = del_pool_variables_error_info - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarDelResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_del_results.py b/src/clients/ctm_api_client/models/ctmvar_del_results.py index 8545dda..1c24a54 100644 --- a/src/clients/ctm_api_client/models/ctmvar_del_results.py +++ b/src/clients/ctm_api_client/models/ctmvar_del_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarDelResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[CtmvarDelResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[CtmvarDelResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """CtmvarDelResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """CtmvarDelResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -96,7 +92,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this CtmvarDelResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +113,7 @@ def error(self, error): :param error: The error of this CtmvarDelResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +134,7 @@ def _from(self, _from): :param _from: The _from of this CtmvarDelResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +155,7 @@ def results(self, results): :param results: The results of this CtmvarDelResults. # noqa: E501 - :type: list[CtmvarDelResultItem] + :type results: list[CtmvarDelResultItem] """ self._results = results @@ -180,37 +176,40 @@ def to(self, to): :param to: The to of this CtmvarDelResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarDelResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_error_info.py b/src/clients/ctm_api_client/models/ctmvar_error_info.py index d0bede2..383bec1 100644 --- a/src/clients/ctm_api_client/models/ctmvar_error_info.py +++ b/src/clients/ctm_api_client/models/ctmvar_error_info.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarErrorInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctmvar_del_error_code": "str", - "ctmvar_get_error_code": "str", - "ctmvar_set_error_code": "str", - "variable_name": "str", + openapi_types = { + 'ctmvar_del_error_code': 'str', + 'ctmvar_get_error_code': 'str', + 'ctmvar_set_error_code': 'str', + 'variable_name': 'str' } attribute_map = { - "ctmvar_del_error_code": "ctmvar_del_error_code", - "ctmvar_get_error_code": "ctmvar_get_error_code", - "ctmvar_set_error_code": "ctmvar_set_error_code", - "variable_name": "variable_name", + 'ctmvar_del_error_code': 'ctmvar_del_error_code', + 'ctmvar_get_error_code': 'ctmvar_get_error_code', + 'ctmvar_set_error_code': 'ctmvar_set_error_code', + 'variable_name': 'variable_name' } - def __init__( - self, - ctmvar_del_error_code=None, - ctmvar_get_error_code=None, - ctmvar_set_error_code=None, - variable_name=None, - _configuration=None, - ): # noqa: E501 - """CtmvarErrorInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctmvar_del_error_code=None, ctmvar_get_error_code=None, ctmvar_set_error_code=None, variable_name=None, local_vars_configuration=None): # noqa: E501 + """CtmvarErrorInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctmvar_del_error_code = None self._ctmvar_get_error_code = None @@ -90,22 +87,13 @@ def ctmvar_del_error_code(self, ctmvar_del_error_code): :param ctmvar_del_error_code: The ctmvar_del_error_code of this CtmvarErrorInfo. # noqa: E501 - :type: str + :type ctmvar_del_error_code: str """ - allowed_values = [ - "FailedDeletingFromDB", - "PoolNameInvalid", - "UnKnownDelError", - "UNRECOGNIZED", - ] # noqa: E501 - if ( - self._configuration.client_side_validation - and ctmvar_del_error_code not in allowed_values - ): + allowed_values = ["FailedDeletingFromDB", "PoolNameInvalid", "UnKnownDelError", "UNRECOGNIZED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and ctmvar_del_error_code not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `ctmvar_del_error_code` ({0}), must be one of {1}".format( # noqa: E501 - ctmvar_del_error_code, allowed_values - ) + "Invalid value for `ctmvar_del_error_code` ({0}), must be one of {1}" # noqa: E501 + .format(ctmvar_del_error_code, allowed_values) ) self._ctmvar_del_error_code = ctmvar_del_error_code @@ -126,23 +114,13 @@ def ctmvar_get_error_code(self, ctmvar_get_error_code): :param ctmvar_get_error_code: The ctmvar_get_error_code of this CtmvarErrorInfo. # noqa: E501 - :type: str + :type ctmvar_get_error_code: str """ - allowed_values = [ - "FailedReadingFromDB", - "PoolNameExpressionInvalid", - "VarExpressionInvalidGet", - "UnKnownGetError", - "UNRECOGNIZED", - ] # noqa: E501 - if ( - self._configuration.client_side_validation - and ctmvar_get_error_code not in allowed_values - ): + allowed_values = ["FailedReadingFromDB", "PoolNameExpressionInvalid", "VarExpressionInvalidGet", "UnKnownGetError", "UNRECOGNIZED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and ctmvar_get_error_code not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `ctmvar_get_error_code` ({0}), must be one of {1}".format( # noqa: E501 - ctmvar_get_error_code, allowed_values - ) + "Invalid value for `ctmvar_get_error_code` ({0}), must be one of {1}" # noqa: E501 + .format(ctmvar_get_error_code, allowed_values) ) self._ctmvar_get_error_code = ctmvar_get_error_code @@ -163,27 +141,13 @@ def ctmvar_set_error_code(self, ctmvar_set_error_code): :param ctmvar_set_error_code: The ctmvar_set_error_code of this CtmvarErrorInfo. # noqa: E501 - :type: str + :type ctmvar_set_error_code: str """ - allowed_values = [ - "NoError", - "VarNameTooLong", - "VarNameInvalid", - "VarExpressionTooLong", - "VarExpressionInvalidSet", - "VarNameIsReserved", - "FailedWritingToDB", - "UnKnownSetError", - "UNRECOGNIZED", - ] # noqa: E501 - if ( - self._configuration.client_side_validation - and ctmvar_set_error_code not in allowed_values - ): + allowed_values = ["NoError", "VarNameTooLong", "VarNameInvalid", "VarExpressionTooLong", "VarExpressionInvalidSet", "VarNameIsReserved", "FailedWritingToDB", "UnKnownSetError", "UNRECOGNIZED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and ctmvar_set_error_code not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `ctmvar_set_error_code` ({0}), must be one of {1}".format( # noqa: E501 - ctmvar_set_error_code, allowed_values - ) + "Invalid value for `ctmvar_set_error_code` ({0}), must be one of {1}" # noqa: E501 + .format(ctmvar_set_error_code, allowed_values) ) self._ctmvar_set_error_code = ctmvar_set_error_code @@ -204,37 +168,40 @@ def variable_name(self, variable_name): :param variable_name: The variable_name of this CtmvarErrorInfo. # noqa: E501 - :type: str + :type variable_name: str """ self._variable_name = variable_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarErrorInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_get_result_item.py b/src/clients/ctm_api_client/models/ctmvar_get_result_item.py index 2960079..c7453f0 100644 --- a/src/clients/ctm_api_client/models/ctmvar_get_result_item.py +++ b/src/clients/ctm_api_client/models/ctmvar_get_result_item.py @@ -5,53 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarGetResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "get_pool_variables_error_info": "PoolVariablesErrorInfo", - "pool_variables_name_value": "PoolVariablesNameValue", + openapi_types = { + 'get_pool_variables_error_info': 'PoolVariablesErrorInfo', + 'pool_variables_name_value': 'PoolVariablesNameValue' } attribute_map = { - "get_pool_variables_error_info": "get_pool_variables_error_info", - "pool_variables_name_value": "pool_variables_name_value", + 'get_pool_variables_error_info': 'get_pool_variables_error_info', + 'pool_variables_name_value': 'pool_variables_name_value' } - def __init__( - self, - get_pool_variables_error_info=None, - pool_variables_name_value=None, - _configuration=None, - ): # noqa: E501 - """CtmvarGetResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, get_pool_variables_error_info=None, pool_variables_name_value=None, local_vars_configuration=None): # noqa: E501 + """CtmvarGetResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._get_pool_variables_error_info = None self._pool_variables_name_value = None @@ -78,7 +77,7 @@ def get_pool_variables_error_info(self, get_pool_variables_error_info): :param get_pool_variables_error_info: The get_pool_variables_error_info of this CtmvarGetResultItem. # noqa: E501 - :type: PoolVariablesErrorInfo + :type get_pool_variables_error_info: PoolVariablesErrorInfo """ self._get_pool_variables_error_info = get_pool_variables_error_info @@ -99,37 +98,40 @@ def pool_variables_name_value(self, pool_variables_name_value): :param pool_variables_name_value: The pool_variables_name_value of this CtmvarGetResultItem. # noqa: E501 - :type: PoolVariablesNameValue + :type pool_variables_name_value: PoolVariablesNameValue """ self._pool_variables_name_value = pool_variables_name_value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarGetResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_get_results.py b/src/clients/ctm_api_client/models/ctmvar_get_results.py index a3175df..f8e443b 100644 --- a/src/clients/ctm_api_client/models/ctmvar_get_results.py +++ b/src/clients/ctm_api_client/models/ctmvar_get_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarGetResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[CtmvarGetResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[CtmvarGetResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """CtmvarGetResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """CtmvarGetResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -96,7 +92,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this CtmvarGetResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +113,7 @@ def error(self, error): :param error: The error of this CtmvarGetResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +134,7 @@ def _from(self, _from): :param _from: The _from of this CtmvarGetResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +155,7 @@ def results(self, results): :param results: The results of this CtmvarGetResults. # noqa: E501 - :type: list[CtmvarGetResultItem] + :type results: list[CtmvarGetResultItem] """ self._results = results @@ -180,37 +176,40 @@ def to(self, to): :param to: The to of this CtmvarGetResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarGetResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_result_item.py b/src/clients/ctm_api_client/models/ctmvar_result_item.py index 08737d5..378e13c 100644 --- a/src/clients/ctm_api_client/models/ctmvar_result_item.py +++ b/src/clients/ctm_api_client/models/ctmvar_result_item.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "full_line": "str", - "type": "str", - "variable_name": "str", - "variable_value": "str", + openapi_types = { + 'full_line': 'str', + 'type': 'str', + 'variable_name': 'str', + 'variable_value': 'str' } attribute_map = { - "full_line": "full_line", - "type": "type", - "variable_name": "variable_name", - "variable_value": "variable_value", + 'full_line': 'full_line', + 'type': 'type', + 'variable_name': 'variable_name', + 'variable_value': 'variable_value' } - def __init__( - self, - full_line=None, - type=None, - variable_name=None, - variable_value=None, - _configuration=None, - ): # noqa: E501 - """CtmvarResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, full_line=None, type=None, variable_name=None, variable_value=None, local_vars_configuration=None): # noqa: E501 + """CtmvarResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._full_line = None self._type = None @@ -90,7 +87,7 @@ def full_line(self, full_line): :param full_line: The full_line of this CtmvarResultItem. # noqa: E501 - :type: str + :type full_line: str """ self._full_line = full_line @@ -111,7 +108,7 @@ def type(self, type): :param type: The type of this CtmvarResultItem. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -132,7 +129,7 @@ def variable_name(self, variable_name): :param variable_name: The variable_name of this CtmvarResultItem. # noqa: E501 - :type: str + :type variable_name: str """ self._variable_name = variable_name @@ -153,37 +150,40 @@ def variable_value(self, variable_value): :param variable_value: The variable_value of this CtmvarResultItem. # noqa: E501 - :type: str + :type variable_value: str """ self._variable_value = variable_value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_results.py b/src/clients/ctm_api_client/models/ctmvar_results.py index d4b178c..9153fc6 100644 --- a/src/clients/ctm_api_client/models/ctmvar_results.py +++ b/src/clients/ctm_api_client/models/ctmvar_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[CtmvarResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[CtmvarResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """CtmvarResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """CtmvarResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -96,7 +92,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this CtmvarResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +113,7 @@ def error(self, error): :param error: The error of this CtmvarResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +134,7 @@ def _from(self, _from): :param _from: The _from of this CtmvarResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +155,7 @@ def results(self, results): :param results: The results of this CtmvarResults. # noqa: E501 - :type: list[CtmvarResultItem] + :type results: list[CtmvarResultItem] """ self._results = results @@ -180,37 +176,40 @@ def to(self, to): :param to: The to of this CtmvarResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_set_result_item.py b/src/clients/ctm_api_client/models/ctmvar_set_result_item.py index a2b5354..b890bae 100644 --- a/src/clients/ctm_api_client/models/ctmvar_set_result_item.py +++ b/src/clients/ctm_api_client/models/ctmvar_set_result_item.py @@ -5,44 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarSetResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"set_pool_variables_error_info": "PoolVariablesErrorInfo"} + openapi_types = { + 'set_pool_variables_error_info': 'PoolVariablesErrorInfo' + } - attribute_map = {"set_pool_variables_error_info": "set_pool_variables_error_info"} + attribute_map = { + 'set_pool_variables_error_info': 'set_pool_variables_error_info' + } - def __init__( - self, set_pool_variables_error_info=None, _configuration=None - ): # noqa: E501 - """CtmvarSetResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, set_pool_variables_error_info=None, local_vars_configuration=None): # noqa: E501 + """CtmvarSetResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._set_pool_variables_error_info = None self.discriminator = None @@ -66,37 +72,40 @@ def set_pool_variables_error_info(self, set_pool_variables_error_info): :param set_pool_variables_error_info: The set_pool_variables_error_info of this CtmvarSetResultItem. # noqa: E501 - :type: PoolVariablesErrorInfo + :type set_pool_variables_error_info: PoolVariablesErrorInfo """ self._set_pool_variables_error_info = set_pool_variables_error_info - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarSetResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ctmvar_set_results.py b/src/clients/ctm_api_client/models/ctmvar_set_results.py index 2a8d578..1f24c68 100644 --- a/src/clients/ctm_api_client/models/ctmvar_set_results.py +++ b/src/clients/ctm_api_client/models/ctmvar_set_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class CtmvarSetResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[CtmvarSetResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[CtmvarSetResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """CtmvarSetResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """CtmvarSetResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -96,7 +92,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this CtmvarSetResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +113,7 @@ def error(self, error): :param error: The error of this CtmvarSetResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +134,7 @@ def _from(self, _from): :param _from: The _from of this CtmvarSetResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +155,7 @@ def results(self, results): :param results: The results of this CtmvarSetResults. # noqa: E501 - :type: list[CtmvarSetResultItem] + :type results: list[CtmvarSetResultItem] """ self._results = results @@ -180,37 +176,40 @@ def to(self, to): :param to: The to of this CtmvarSetResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(CtmvarSetResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/deploy_jobtype_response.py b/src/clients/ctm_api_client/models/deploy_jobtype_response.py index 7bf534e..513d32f 100644 --- a/src/clients/ctm_api_client/models/deploy_jobtype_response.py +++ b/src/clients/ctm_api_client/models/deploy_jobtype_response.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class DeployJobtypeResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "deployment_file": "str", - "successful_deploys": "list[JobtypeAgent]", + openapi_types = { + 'deployment_file': 'str', + 'successful_deploys': 'list[JobtypeAgent]' } attribute_map = { - "deployment_file": "deploymentFile", - "successful_deploys": "successfulDeploys", + 'deployment_file': 'deploymentFile', + 'successful_deploys': 'successfulDeploys' } - def __init__( - self, deployment_file=None, successful_deploys=None, _configuration=None - ): # noqa: E501 - """DeployJobtypeResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, deployment_file=None, successful_deploys=None, local_vars_configuration=None): # noqa: E501 + """DeployJobtypeResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._deployment_file = None self._successful_deploys = None @@ -77,7 +79,7 @@ def deployment_file(self, deployment_file): The name of the deployed .ctmai file # noqa: E501 :param deployment_file: The deployment_file of this DeployJobtypeResponse. # noqa: E501 - :type: str + :type deployment_file: str """ self._deployment_file = deployment_file @@ -98,37 +100,40 @@ def successful_deploys(self, successful_deploys): :param successful_deploys: The successful_deploys of this DeployJobtypeResponse. # noqa: E501 - :type: list[JobtypeAgent] + :type successful_deploys: list[JobtypeAgent] """ self._successful_deploys = successful_deploys - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(DeployJobtypeResponse, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/deployment_file_error.py b/src/clients/ctm_api_client/models/deployment_file_error.py index a742e0b..b480417 100644 --- a/src/clients/ctm_api_client/models/deployment_file_error.py +++ b/src/clients/ctm_api_client/models/deployment_file_error.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class DeploymentFileError(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"lines": "list[str]"} + openapi_types = { + 'lines': 'list[str]' + } - attribute_map = {"lines": "lines"} + attribute_map = { + 'lines': 'lines' + } - def __init__(self, lines=None, _configuration=None): # noqa: E501 - """DeploymentFileError - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, lines=None, local_vars_configuration=None): # noqa: E501 + """DeploymentFileError - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._lines = None self.discriminator = None @@ -64,37 +72,40 @@ def lines(self, lines): :param lines: The lines of this DeploymentFileError. # noqa: E501 - :type: list[str] + :type lines: list[str] """ self._lines = lines - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(DeploymentFileError, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/deployment_file_results.py b/src/clients/ctm_api_client/models/deployment_file_results.py index 37db305..ad9f16c 100644 --- a/src/clients/ctm_api_client/models/deployment_file_results.py +++ b/src/clients/ctm_api_client/models/deployment_file_results.py @@ -5,97 +5,97 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class DeploymentFileResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "deployment_file": "str", - "successful_folders_count": "int", - "successful_smart_folders_count": "int", - "successful_sub_folders_count": "int", - "successful_jobs_count": "int", - "successful_connection_profiles_count": "int", - "successful_drivers_count": "int", - "successful_calendars_count": "int", - "is_deploy_descriptor_valid": "bool", - "deployed_folders": "list[str]", - "deployed_jobs": "list[str]", - "deployed_drivers": "list[str]", - "deployed_connection_profiles": "list[str]", - "deployed_calendars": "list[str]", - "errors": "list[DeploymentFileError]", - "warnings": "list[WarningData]", + openapi_types = { + 'deployment_file': 'str', + 'poll_id': 'str', + 'deployment_state': 'str', + 'deployment_status': 'str', + 'successful_folders_count': 'int', + 'successful_smart_folders_count': 'int', + 'successful_sub_folders_count': 'int', + 'successful_jobs_count': 'int', + 'successful_connection_profiles_count': 'int', + 'successful_drivers_count': 'int', + 'successful_calendars_count': 'int', + 'successful_site_standards_count': 'int', + 'is_deploy_descriptor_valid': 'bool', + 'deployed_folders': 'list[str]', + 'deployed_jobs': 'list[str]', + 'deployed_sub_folders': 'list[str]', + 'deployed_drivers': 'list[str]', + 'deployed_connection_profiles': 'list[str]', + 'deployed_calendars': 'list[str]', + 'deployed_site_standardss': 'list[str]', + 'errors': 'list[DeploymentFileError]', + 'warnings': 'list[WarningData]' } attribute_map = { - "deployment_file": "deploymentFile", - "successful_folders_count": "successfulFoldersCount", - "successful_smart_folders_count": "successfulSmartFoldersCount", - "successful_sub_folders_count": "successfulSubFoldersCount", - "successful_jobs_count": "successfulJobsCount", - "successful_connection_profiles_count": "successfulConnectionProfilesCount", - "successful_drivers_count": "successfulDriversCount", - "successful_calendars_count": "successfulCalendarsCount", - "is_deploy_descriptor_valid": "isDeployDescriptorValid", - "deployed_folders": "deployedFolders", - "deployed_jobs": "deployedJobs", - "deployed_drivers": "deployedDrivers", - "deployed_connection_profiles": "deployedConnectionProfiles", - "deployed_calendars": "deployedCalendars", - "errors": "errors", - "warnings": "warnings", + 'deployment_file': 'deploymentFile', + 'poll_id': 'pollId', + 'deployment_state': 'deploymentState', + 'deployment_status': 'deploymentStatus', + 'successful_folders_count': 'successfulFoldersCount', + 'successful_smart_folders_count': 'successfulSmartFoldersCount', + 'successful_sub_folders_count': 'successfulSubFoldersCount', + 'successful_jobs_count': 'successfulJobsCount', + 'successful_connection_profiles_count': 'successfulConnectionProfilesCount', + 'successful_drivers_count': 'successfulDriversCount', + 'successful_calendars_count': 'successfulCalendarsCount', + 'successful_site_standards_count': 'successfulSiteStandardsCount', + 'is_deploy_descriptor_valid': 'isDeployDescriptorValid', + 'deployed_folders': 'deployedFolders', + 'deployed_jobs': 'deployedJobs', + 'deployed_sub_folders': 'deployedSubFolders', + 'deployed_drivers': 'deployedDrivers', + 'deployed_connection_profiles': 'deployedConnectionProfiles', + 'deployed_calendars': 'deployedCalendars', + 'deployed_site_standardss': 'deployedSiteStandardss', + 'errors': 'errors', + 'warnings': 'warnings' } - def __init__( - self, - deployment_file=None, - successful_folders_count=None, - successful_smart_folders_count=None, - successful_sub_folders_count=None, - successful_jobs_count=None, - successful_connection_profiles_count=None, - successful_drivers_count=None, - successful_calendars_count=None, - is_deploy_descriptor_valid=None, - deployed_folders=None, - deployed_jobs=None, - deployed_drivers=None, - deployed_connection_profiles=None, - deployed_calendars=None, - errors=None, - warnings=None, - _configuration=None, - ): # noqa: E501 - """DeploymentFileResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, deployment_file=None, poll_id=None, deployment_state=None, deployment_status=None, successful_folders_count=None, successful_smart_folders_count=None, successful_sub_folders_count=None, successful_jobs_count=None, successful_connection_profiles_count=None, successful_drivers_count=None, successful_calendars_count=None, successful_site_standards_count=None, is_deploy_descriptor_valid=None, deployed_folders=None, deployed_jobs=None, deployed_sub_folders=None, deployed_drivers=None, deployed_connection_profiles=None, deployed_calendars=None, deployed_site_standardss=None, errors=None, warnings=None, local_vars_configuration=None): # noqa: E501 + """DeploymentFileResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._deployment_file = None + self._poll_id = None + self._deployment_state = None + self._deployment_status = None self._successful_folders_count = None self._successful_smart_folders_count = None self._successful_sub_folders_count = None @@ -103,18 +103,27 @@ def __init__( self._successful_connection_profiles_count = None self._successful_drivers_count = None self._successful_calendars_count = None + self._successful_site_standards_count = None self._is_deploy_descriptor_valid = None self._deployed_folders = None self._deployed_jobs = None + self._deployed_sub_folders = None self._deployed_drivers = None self._deployed_connection_profiles = None self._deployed_calendars = None + self._deployed_site_standardss = None self._errors = None self._warnings = None self.discriminator = None if deployment_file is not None: self.deployment_file = deployment_file + if poll_id is not None: + self.poll_id = poll_id + if deployment_state is not None: + self.deployment_state = deployment_state + if deployment_status is not None: + self.deployment_status = deployment_status if successful_folders_count is not None: self.successful_folders_count = successful_folders_count if successful_smart_folders_count is not None: @@ -124,25 +133,29 @@ def __init__( if successful_jobs_count is not None: self.successful_jobs_count = successful_jobs_count if successful_connection_profiles_count is not None: - self.successful_connection_profiles_count = ( - successful_connection_profiles_count - ) + self.successful_connection_profiles_count = successful_connection_profiles_count if successful_drivers_count is not None: self.successful_drivers_count = successful_drivers_count if successful_calendars_count is not None: self.successful_calendars_count = successful_calendars_count + if successful_site_standards_count is not None: + self.successful_site_standards_count = successful_site_standards_count if is_deploy_descriptor_valid is not None: self.is_deploy_descriptor_valid = is_deploy_descriptor_valid if deployed_folders is not None: self.deployed_folders = deployed_folders if deployed_jobs is not None: self.deployed_jobs = deployed_jobs + if deployed_sub_folders is not None: + self.deployed_sub_folders = deployed_sub_folders if deployed_drivers is not None: self.deployed_drivers = deployed_drivers if deployed_connection_profiles is not None: self.deployed_connection_profiles = deployed_connection_profiles if deployed_calendars is not None: self.deployed_calendars = deployed_calendars + if deployed_site_standardss is not None: + self.deployed_site_standardss = deployed_site_standardss if errors is not None: self.errors = errors if warnings is not None: @@ -166,11 +179,80 @@ def deployment_file(self, deployment_file): The name of a specific deployment file. # noqa: E501 :param deployment_file: The deployment_file of this DeploymentFileResults. # noqa: E501 - :type: str + :type deployment_file: str """ self._deployment_file = deployment_file + @property + def poll_id(self): + """Gets the poll_id of this DeploymentFileResults. # noqa: E501 + + Poll id in case of a long deploy process # noqa: E501 + + :return: The poll_id of this DeploymentFileResults. # noqa: E501 + :rtype: str + """ + return self._poll_id + + @poll_id.setter + def poll_id(self, poll_id): + """Sets the poll_id of this DeploymentFileResults. + + Poll id in case of a long deploy process # noqa: E501 + + :param poll_id: The poll_id of this DeploymentFileResults. # noqa: E501 + :type poll_id: str + """ + + self._poll_id = poll_id + + @property + def deployment_state(self): + """Gets the deployment_state of this DeploymentFileResults. # noqa: E501 + + Current deployment step and state. CALENDARS_DEPLOYED, CONNECTION_PROFILES_DEPLOYED, DEPLOYING_FOLDERS, folders deployed, etc. # noqa: E501 + + :return: The deployment_state of this DeploymentFileResults. # noqa: E501 + :rtype: str + """ + return self._deployment_state + + @deployment_state.setter + def deployment_state(self, deployment_state): + """Sets the deployment_state of this DeploymentFileResults. + + Current deployment step and state. CALENDARS_DEPLOYED, CONNECTION_PROFILES_DEPLOYED, DEPLOYING_FOLDERS, folders deployed, etc. # noqa: E501 + + :param deployment_state: The deployment_state of this DeploymentFileResults. # noqa: E501 + :type deployment_state: str + """ + + self._deployment_state = deployment_state + + @property + def deployment_status(self): + """Gets the deployment_status of this DeploymentFileResults. # noqa: E501 + + Currently deployment status. ENDED_OK, ENDED_NOT_OK, PARTIAL_RESULTS, UNKNOWN # noqa: E501 + + :return: The deployment_status of this DeploymentFileResults. # noqa: E501 + :rtype: str + """ + return self._deployment_status + + @deployment_status.setter + def deployment_status(self, deployment_status): + """Sets the deployment_status of this DeploymentFileResults. + + Currently deployment status. ENDED_OK, ENDED_NOT_OK, PARTIAL_RESULTS, UNKNOWN # noqa: E501 + + :param deployment_status: The deployment_status of this DeploymentFileResults. # noqa: E501 + :type deployment_status: str + """ + + self._deployment_status = deployment_status + @property def successful_folders_count(self): """Gets the successful_folders_count of this DeploymentFileResults. # noqa: E501 @@ -189,7 +271,7 @@ def successful_folders_count(self, successful_folders_count): Determines the number of successfully deployed simple folders. # noqa: E501 :param successful_folders_count: The successful_folders_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_folders_count: int """ self._successful_folders_count = successful_folders_count @@ -212,7 +294,7 @@ def successful_smart_folders_count(self, successful_smart_folders_count): Determines the number of successfully deployed smart folders. # noqa: E501 :param successful_smart_folders_count: The successful_smart_folders_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_smart_folders_count: int """ self._successful_smart_folders_count = successful_smart_folders_count @@ -235,7 +317,7 @@ def successful_sub_folders_count(self, successful_sub_folders_count): Determines the number of successfully deployed sub folders. # noqa: E501 :param successful_sub_folders_count: The successful_sub_folders_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_sub_folders_count: int """ self._successful_sub_folders_count = successful_sub_folders_count @@ -258,7 +340,7 @@ def successful_jobs_count(self, successful_jobs_count): Determines the number of successfully deployed sub folders. # noqa: E501 :param successful_jobs_count: The successful_jobs_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_jobs_count: int """ self._successful_jobs_count = successful_jobs_count @@ -275,20 +357,16 @@ def successful_connection_profiles_count(self): return self._successful_connection_profiles_count @successful_connection_profiles_count.setter - def successful_connection_profiles_count( - self, successful_connection_profiles_count - ): + def successful_connection_profiles_count(self, successful_connection_profiles_count): """Sets the successful_connection_profiles_count of this DeploymentFileResults. Determines the number of successfully deployed sub folders. # noqa: E501 :param successful_connection_profiles_count: The successful_connection_profiles_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_connection_profiles_count: int """ - self._successful_connection_profiles_count = ( - successful_connection_profiles_count - ) + self._successful_connection_profiles_count = successful_connection_profiles_count @property def successful_drivers_count(self): @@ -308,7 +386,7 @@ def successful_drivers_count(self, successful_drivers_count): Determines the number of successfully deployed sub folders. # noqa: E501 :param successful_drivers_count: The successful_drivers_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_drivers_count: int """ self._successful_drivers_count = successful_drivers_count @@ -331,11 +409,34 @@ def successful_calendars_count(self, successful_calendars_count): Determines the number of successfully deployed sub folders. # noqa: E501 :param successful_calendars_count: The successful_calendars_count of this DeploymentFileResults. # noqa: E501 - :type: int + :type successful_calendars_count: int """ self._successful_calendars_count = successful_calendars_count + @property + def successful_site_standards_count(self): + """Gets the successful_site_standards_count of this DeploymentFileResults. # noqa: E501 + + Determines the number of successfully deployed sub folders. # noqa: E501 + + :return: The successful_site_standards_count of this DeploymentFileResults. # noqa: E501 + :rtype: int + """ + return self._successful_site_standards_count + + @successful_site_standards_count.setter + def successful_site_standards_count(self, successful_site_standards_count): + """Sets the successful_site_standards_count of this DeploymentFileResults. + + Determines the number of successfully deployed sub folders. # noqa: E501 + + :param successful_site_standards_count: The successful_site_standards_count of this DeploymentFileResults. # noqa: E501 + :type successful_site_standards_count: int + """ + + self._successful_site_standards_count = successful_site_standards_count + @property def is_deploy_descriptor_valid(self): """Gets the is_deploy_descriptor_valid of this DeploymentFileResults. # noqa: E501 @@ -354,7 +455,7 @@ def is_deploy_descriptor_valid(self, is_deploy_descriptor_valid): Determines if the deployment file is a valid deploy descriptor file. # noqa: E501 :param is_deploy_descriptor_valid: The is_deploy_descriptor_valid of this DeploymentFileResults. # noqa: E501 - :type: bool + :type is_deploy_descriptor_valid: bool """ self._is_deploy_descriptor_valid = is_deploy_descriptor_valid @@ -375,7 +476,7 @@ def deployed_folders(self, deployed_folders): :param deployed_folders: The deployed_folders of this DeploymentFileResults. # noqa: E501 - :type: list[str] + :type deployed_folders: list[str] """ self._deployed_folders = deployed_folders @@ -396,11 +497,32 @@ def deployed_jobs(self, deployed_jobs): :param deployed_jobs: The deployed_jobs of this DeploymentFileResults. # noqa: E501 - :type: list[str] + :type deployed_jobs: list[str] """ self._deployed_jobs = deployed_jobs + @property + def deployed_sub_folders(self): + """Gets the deployed_sub_folders of this DeploymentFileResults. # noqa: E501 + + + :return: The deployed_sub_folders of this DeploymentFileResults. # noqa: E501 + :rtype: list[str] + """ + return self._deployed_sub_folders + + @deployed_sub_folders.setter + def deployed_sub_folders(self, deployed_sub_folders): + """Sets the deployed_sub_folders of this DeploymentFileResults. + + + :param deployed_sub_folders: The deployed_sub_folders of this DeploymentFileResults. # noqa: E501 + :type deployed_sub_folders: list[str] + """ + + self._deployed_sub_folders = deployed_sub_folders + @property def deployed_drivers(self): """Gets the deployed_drivers of this DeploymentFileResults. # noqa: E501 @@ -417,7 +539,7 @@ def deployed_drivers(self, deployed_drivers): :param deployed_drivers: The deployed_drivers of this DeploymentFileResults. # noqa: E501 - :type: list[str] + :type deployed_drivers: list[str] """ self._deployed_drivers = deployed_drivers @@ -438,7 +560,7 @@ def deployed_connection_profiles(self, deployed_connection_profiles): :param deployed_connection_profiles: The deployed_connection_profiles of this DeploymentFileResults. # noqa: E501 - :type: list[str] + :type deployed_connection_profiles: list[str] """ self._deployed_connection_profiles = deployed_connection_profiles @@ -459,11 +581,32 @@ def deployed_calendars(self, deployed_calendars): :param deployed_calendars: The deployed_calendars of this DeploymentFileResults. # noqa: E501 - :type: list[str] + :type deployed_calendars: list[str] """ self._deployed_calendars = deployed_calendars + @property + def deployed_site_standardss(self): + """Gets the deployed_site_standardss of this DeploymentFileResults. # noqa: E501 + + + :return: The deployed_site_standardss of this DeploymentFileResults. # noqa: E501 + :rtype: list[str] + """ + return self._deployed_site_standardss + + @deployed_site_standardss.setter + def deployed_site_standardss(self, deployed_site_standardss): + """Sets the deployed_site_standardss of this DeploymentFileResults. + + + :param deployed_site_standardss: The deployed_site_standardss of this DeploymentFileResults. # noqa: E501 + :type deployed_site_standardss: list[str] + """ + + self._deployed_site_standardss = deployed_site_standardss + @property def errors(self): """Gets the errors of this DeploymentFileResults. # noqa: E501 @@ -480,7 +623,7 @@ def errors(self, errors): :param errors: The errors of this DeploymentFileResults. # noqa: E501 - :type: list[DeploymentFileError] + :type errors: list[DeploymentFileError] """ self._errors = errors @@ -501,37 +644,40 @@ def warnings(self, warnings): :param warnings: The warnings of this DeploymentFileResults. # noqa: E501 - :type: list[WarningData] + :type warnings: list[WarningData] """ self._warnings = warnings - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(DeploymentFileResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/diagnostics_data_collection_information.py b/src/clients/ctm_api_client/models/diagnostics_data_collection_information.py index aea5900..514fdc3 100644 --- a/src/clients/ctm_api_client/models/diagnostics_data_collection_information.py +++ b/src/clients/ctm_api_client/models/diagnostics_data_collection_information.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class DiagnosticsDataCollectionInformation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "usage_measurements": "bool", - "logs_and_configuration": "bool", - "days": "int", - "save_to": "str", - "cmd_params": "str", + openapi_types = { + 'usage_measurements': 'bool', + 'logs_and_configuration': 'bool', + 'days': 'int', + 'save_to': 'str', + 'cmd_params': 'str' } attribute_map = { - "usage_measurements": "usageMeasurements", - "logs_and_configuration": "logsAndConfiguration", - "days": "days", - "save_to": "saveTo", - "cmd_params": "cmdParams", + 'usage_measurements': 'usageMeasurements', + 'logs_and_configuration': 'logsAndConfiguration', + 'days': 'days', + 'save_to': 'saveTo', + 'cmd_params': 'cmdParams' } - def __init__( - self, - usage_measurements=None, - logs_and_configuration=None, - days=None, - save_to=None, - cmd_params=None, - _configuration=None, - ): # noqa: E501 - """DiagnosticsDataCollectionInformation - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, usage_measurements=None, logs_and_configuration=None, days=None, save_to=None, cmd_params=None, local_vars_configuration=None): # noqa: E501 + """DiagnosticsDataCollectionInformation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._usage_measurements = None self._logs_and_configuration = None @@ -98,7 +94,7 @@ def usage_measurements(self, usage_measurements): Collect usage measurements HIDDEN # noqa: E501 :param usage_measurements: The usage_measurements of this DiagnosticsDataCollectionInformation. # noqa: E501 - :type: bool + :type usage_measurements: bool """ self._usage_measurements = usage_measurements @@ -121,7 +117,7 @@ def logs_and_configuration(self, logs_and_configuration): Collect logs and configuration HIDDEN # noqa: E501 :param logs_and_configuration: The logs_and_configuration of this DiagnosticsDataCollectionInformation. # noqa: E501 - :type: bool + :type logs_and_configuration: bool """ self._logs_and_configuration = logs_and_configuration @@ -144,7 +140,7 @@ def days(self, days): Number of days HIDDEN # noqa: E501 :param days: The days of this DiagnosticsDataCollectionInformation. # noqa: E501 - :type: int + :type days: int """ self._days = days @@ -167,7 +163,7 @@ def save_to(self, save_to): Save to location HIDDEN # noqa: E501 :param save_to: The save_to of this DiagnosticsDataCollectionInformation. # noqa: E501 - :type: str + :type save_to: str """ self._save_to = save_to @@ -190,37 +186,40 @@ def cmd_params(self, cmd_params): The command line parameters HIDDEN # noqa: E501 :param cmd_params: The cmd_params of this DiagnosticsDataCollectionInformation. # noqa: E501 - :type: str + :type cmd_params: str """ self._cmd_params = cmd_params - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(DiagnosticsDataCollectionInformation, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/diagnostics_data_collection_result.py b/src/clients/ctm_api_client/models/diagnostics_data_collection_result.py index d9613b4..b0e3835 100644 --- a/src/clients/ctm_api_client/models/diagnostics_data_collection_result.py +++ b/src/clients/ctm_api_client/models/diagnostics_data_collection_result.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class DiagnosticsDataCollectionResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str", "return_code": "int"} - - attribute_map = {"message": "message", "return_code": "returnCode"} - - def __init__( - self, message=None, return_code=None, _configuration=None - ): # noqa: E501 - """DiagnosticsDataCollectionResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'message': 'str', + 'return_code': 'int' + } + + attribute_map = { + 'message': 'message', + 'return_code': 'returnCode' + } + + def __init__(self, message=None, return_code=None, local_vars_configuration=None): # noqa: E501 + """DiagnosticsDataCollectionResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._return_code = None @@ -71,7 +79,7 @@ def message(self, message): The message # noqa: E501 :param message: The message of this DiagnosticsDataCollectionResult. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -94,37 +102,40 @@ def return_code(self, return_code): The return code # noqa: E501 :param return_code: The return_code of this DiagnosticsDataCollectionResult. # noqa: E501 - :type: int + :type return_code: int """ self._return_code = return_code - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(DiagnosticsDataCollectionResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/em_basic_active_request_parameters.py b/src/clients/ctm_api_client/models/em_basic_active_request_parameters.py index 47bc5c1..1c20156 100644 --- a/src/clients/ctm_api_client/models/em_basic_active_request_parameters.py +++ b/src/clients/ctm_api_client/models/em_basic_active_request_parameters.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EMBasicActiveRequestParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "annotation_category": "str", - "annotation_notes": "str", - "ctm_name": "str", - "net_name": "str", + openapi_types = { + 'annotation_category': 'str', + 'annotation_notes': 'str', + 'ctm_name': 'str', + 'net_name': 'str' } attribute_map = { - "annotation_category": "annotation_category", - "annotation_notes": "annotation_notes", - "ctm_name": "ctm_name", - "net_name": "net_name", + 'annotation_category': 'annotation_category', + 'annotation_notes': 'annotation_notes', + 'ctm_name': 'ctm_name', + 'net_name': 'net_name' } - def __init__( - self, - annotation_category=None, - annotation_notes=None, - ctm_name=None, - net_name=None, - _configuration=None, - ): # noqa: E501 - """EMBasicActiveRequestParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, annotation_category=None, annotation_notes=None, ctm_name=None, net_name=None, local_vars_configuration=None): # noqa: E501 + """EMBasicActiveRequestParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._annotation_category = None self._annotation_notes = None @@ -90,7 +87,7 @@ def annotation_category(self, annotation_category): :param annotation_category: The annotation_category of this EMBasicActiveRequestParameters. # noqa: E501 - :type: str + :type annotation_category: str """ self._annotation_category = annotation_category @@ -111,7 +108,7 @@ def annotation_notes(self, annotation_notes): :param annotation_notes: The annotation_notes of this EMBasicActiveRequestParameters. # noqa: E501 - :type: str + :type annotation_notes: str """ self._annotation_notes = annotation_notes @@ -132,7 +129,7 @@ def ctm_name(self, ctm_name): :param ctm_name: The ctm_name of this EMBasicActiveRequestParameters. # noqa: E501 - :type: str + :type ctm_name: str """ self._ctm_name = ctm_name @@ -153,37 +150,40 @@ def net_name(self, net_name): :param net_name: The net_name of this EMBasicActiveRequestParameters. # noqa: E501 - :type: str + :type net_name: str """ self._net_name = net_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EMBasicActiveRequestParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/em_default_request_parameters.py b/src/clients/ctm_api_client/models/em_default_request_parameters.py index 3dfe18a..935fee2 100644 --- a/src/clients/ctm_api_client/models/em_default_request_parameters.py +++ b/src/clients/ctm_api_client/models/em_default_request_parameters.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EMDefaultRequestParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "annotation_category": "str", - "annotation_notes": "str", - "ctm_name": "str", - "net_name": "str", + openapi_types = { + 'annotation_category': 'str', + 'annotation_notes': 'str', + 'ctm_name': 'str', + 'net_name': 'str' } attribute_map = { - "annotation_category": "annotation_category", - "annotation_notes": "annotation_notes", - "ctm_name": "ctm_name", - "net_name": "net_name", + 'annotation_category': 'annotation_category', + 'annotation_notes': 'annotation_notes', + 'ctm_name': 'ctm_name', + 'net_name': 'net_name' } - def __init__( - self, - annotation_category=None, - annotation_notes=None, - ctm_name=None, - net_name=None, - _configuration=None, - ): # noqa: E501 - """EMDefaultRequestParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, annotation_category=None, annotation_notes=None, ctm_name=None, net_name=None, local_vars_configuration=None): # noqa: E501 + """EMDefaultRequestParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._annotation_category = None self._annotation_notes = None @@ -90,7 +87,7 @@ def annotation_category(self, annotation_category): :param annotation_category: The annotation_category of this EMDefaultRequestParameters. # noqa: E501 - :type: str + :type annotation_category: str """ self._annotation_category = annotation_category @@ -111,7 +108,7 @@ def annotation_notes(self, annotation_notes): :param annotation_notes: The annotation_notes of this EMDefaultRequestParameters. # noqa: E501 - :type: str + :type annotation_notes: str """ self._annotation_notes = annotation_notes @@ -132,7 +129,7 @@ def ctm_name(self, ctm_name): :param ctm_name: The ctm_name of this EMDefaultRequestParameters. # noqa: E501 - :type: str + :type ctm_name: str """ self._ctm_name = ctm_name @@ -153,37 +150,40 @@ def net_name(self, net_name): :param net_name: The net_name of this EMDefaultRequestParameters. # noqa: E501 - :type: str + :type net_name: str """ self._net_name = net_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EMDefaultRequestParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/em_jobs_id.py b/src/clients/ctm_api_client/models/em_jobs_id.py index 87d0886..d794fdf 100644 --- a/src/clients/ctm_api_client/models/em_jobs_id.py +++ b/src/clients/ctm_api_client/models/em_jobs_id.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EmJobsId(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"job_id": "int", "job_pattern": "str"} - - attribute_map = {"job_id": "job_id", "job_pattern": "job_pattern"} - - def __init__( - self, job_id=None, job_pattern=None, _configuration=None - ): # noqa: E501 - """EmJobsId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'job_id': 'int', + 'job_pattern': 'str' + } + + attribute_map = { + 'job_id': 'job_id', + 'job_pattern': 'job_pattern' + } + + def __init__(self, job_id=None, job_pattern=None, local_vars_configuration=None): # noqa: E501 + """EmJobsId - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._job_id = None self._job_pattern = None @@ -69,7 +77,7 @@ def job_id(self, job_id): :param job_id: The job_id of this EmJobsId. # noqa: E501 - :type: int + :type job_id: int """ self._job_id = job_id @@ -90,37 +98,40 @@ def job_pattern(self, job_pattern): :param job_pattern: The job_pattern of this EmJobsId. # noqa: E501 - :type: str + :type job_pattern: str """ self._job_pattern = job_pattern - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EmJobsId, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/em_order_folder.py b/src/clients/ctm_api_client/models/em_order_folder.py index e88d105..e25521a 100644 --- a/src/clients/ctm_api_client/models/em_order_folder.py +++ b/src/clients/ctm_api_client/models/em_order_folder.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EmOrderFolder(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "additional_params": "list[NameValueAttribute]", - "em_job_id": "list[EmJobsId]", - "folder_name": "str", - "library": "str", - "order_parameters": "OrderParameters", + openapi_types = { + 'additional_params': 'list[NameValueAttribute]', + 'em_job_id': 'list[EmJobsId]', + 'folder_name': 'str', + 'library': 'str', + 'order_parameters': 'OrderParameters' } attribute_map = { - "additional_params": "additional_params", - "em_job_id": "em_job_id", - "folder_name": "folder_name", - "library": "library", - "order_parameters": "order_parameters", + 'additional_params': 'additional_params', + 'em_job_id': 'em_job_id', + 'folder_name': 'folder_name', + 'library': 'library', + 'order_parameters': 'order_parameters' } - def __init__( - self, - additional_params=None, - em_job_id=None, - folder_name=None, - library=None, - order_parameters=None, - _configuration=None, - ): # noqa: E501 - """EmOrderFolder - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, additional_params=None, em_job_id=None, folder_name=None, library=None, order_parameters=None, local_vars_configuration=None): # noqa: E501 + """EmOrderFolder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._additional_params = None self._em_job_id = None @@ -96,7 +92,7 @@ def additional_params(self, additional_params): :param additional_params: The additional_params of this EmOrderFolder. # noqa: E501 - :type: list[NameValueAttribute] + :type additional_params: list[NameValueAttribute] """ self._additional_params = additional_params @@ -117,7 +113,7 @@ def em_job_id(self, em_job_id): :param em_job_id: The em_job_id of this EmOrderFolder. # noqa: E501 - :type: list[EmJobsId] + :type em_job_id: list[EmJobsId] """ self._em_job_id = em_job_id @@ -138,7 +134,7 @@ def folder_name(self, folder_name): :param folder_name: The folder_name of this EmOrderFolder. # noqa: E501 - :type: str + :type folder_name: str """ self._folder_name = folder_name @@ -159,7 +155,7 @@ def library(self, library): :param library: The library of this EmOrderFolder. # noqa: E501 - :type: str + :type library: str """ self._library = library @@ -180,37 +176,40 @@ def order_parameters(self, order_parameters): :param order_parameters: The order_parameters of this EmOrderFolder. # noqa: E501 - :type: OrderParameters + :type order_parameters: OrderParameters """ self._order_parameters = order_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EmOrderFolder, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/em_order_folder_parameters.py b/src/clients/ctm_api_client/models/em_order_folder_parameters.py index a9767dd..4a1b1d8 100644 --- a/src/clients/ctm_api_client/models/em_order_folder_parameters.py +++ b/src/clients/ctm_api_client/models/em_order_folder_parameters.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EmOrderFolderParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "annotation_details": "AnnotationDetails", - "ctm_name": "str", - "em_order_folder_parameters": "list[EmOrderFolder]", + openapi_types = { + 'annotation_details': 'AnnotationDetails', + 'ctm_name': 'str', + 'em_order_folder_parameters': 'list[EmOrderFolder]' } attribute_map = { - "annotation_details": "annotation_details", - "ctm_name": "ctm_name", - "em_order_folder_parameters": "em_order_folder_parameters", + 'annotation_details': 'annotation_details', + 'ctm_name': 'ctm_name', + 'em_order_folder_parameters': 'em_order_folder_parameters' } - def __init__( - self, - annotation_details=None, - ctm_name=None, - em_order_folder_parameters=None, - _configuration=None, - ): # noqa: E501 - """EmOrderFolderParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, annotation_details=None, ctm_name=None, em_order_folder_parameters=None, local_vars_configuration=None): # noqa: E501 + """EmOrderFolderParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._annotation_details = None self._ctm_name = None @@ -84,7 +82,7 @@ def annotation_details(self, annotation_details): :param annotation_details: The annotation_details of this EmOrderFolderParameters. # noqa: E501 - :type: AnnotationDetails + :type annotation_details: AnnotationDetails """ self._annotation_details = annotation_details @@ -105,7 +103,7 @@ def ctm_name(self, ctm_name): :param ctm_name: The ctm_name of this EmOrderFolderParameters. # noqa: E501 - :type: str + :type ctm_name: str """ self._ctm_name = ctm_name @@ -126,37 +124,40 @@ def em_order_folder_parameters(self, em_order_folder_parameters): :param em_order_folder_parameters: The em_order_folder_parameters of this EmOrderFolderParameters. # noqa: E501 - :type: list[EmOrderFolder] + :type em_order_folder_parameters: list[EmOrderFolder] """ self._em_order_folder_parameters = em_order_folder_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EmOrderFolderParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/em_system_parameter.py b/src/clients/ctm_api_client/models/em_system_parameter.py index 957451f..a4de044 100644 --- a/src/clients/ctm_api_client/models/em_system_parameter.py +++ b/src/clients/ctm_api_client/models/em_system_parameter.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EMSystemParameter(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value": "str"} + openapi_types = { + 'value': 'str' + } - attribute_map = {"value": "value"} + attribute_map = { + 'value': 'value' + } - def __init__(self, value=None, _configuration=None): # noqa: E501 - """EMSystemParameter - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """EMSystemParameter - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value = None self.discriminator = None @@ -66,37 +74,40 @@ def value(self, value): EM System parameter # noqa: E501 :param value: The value of this EMSystemParameter. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EMSystemParameter, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/encryption_metadata.py b/src/clients/ctm_api_client/models/encryption_metadata.py index 3e1e327..1852be4 100644 --- a/src/clients/ctm_api_client/models/encryption_metadata.py +++ b/src/clients/ctm_api_client/models/encryption_metadata.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EncryptionMetadata(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"encryption_type": "str", "fields_to_encrypt": "list[str]"} + openapi_types = { + 'encryption_type': 'str', + 'fields_to_encrypt': 'list[str]' + } attribute_map = { - "encryption_type": "encryptionType", - "fields_to_encrypt": "fieldsToEncrypt", + 'encryption_type': 'encryptionType', + 'fields_to_encrypt': 'fieldsToEncrypt' } - def __init__( - self, encryption_type=None, fields_to_encrypt=None, _configuration=None - ): # noqa: E501 - """EncryptionMetadata - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, encryption_type=None, fields_to_encrypt=None, local_vars_configuration=None): # noqa: E501 + """EncryptionMetadata - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._encryption_type = None self._fields_to_encrypt = None @@ -74,7 +79,7 @@ def encryption_type(self, encryption_type): The type of encryption algorithm to be used to de/encrypt the fields (AES256 or Blowfish) # noqa: E501 :param encryption_type: The encryption_type of this EncryptionMetadata. # noqa: E501 - :type: str + :type encryption_type: str """ self._encryption_type = encryption_type @@ -97,37 +102,40 @@ def fields_to_encrypt(self, fields_to_encrypt): The list of XML tag names identifying the fields to be de/encrypted in the request XML # noqa: E501 :param fields_to_encrypt: The fields_to_encrypt of this EncryptionMetadata. # noqa: E501 - :type: list[str] + :type fields_to_encrypt: list[str] """ self._fields_to_encrypt = fields_to_encrypt - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EncryptionMetadata, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/error_data.py b/src/clients/ctm_api_client/models/error_data.py index fe10cde..6b6711f 100644 --- a/src/clients/ctm_api_client/models/error_data.py +++ b/src/clients/ctm_api_client/models/error_data.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ErrorData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "message": "str", - "id": "str", - "item": "str", - "file": "str", - "line": "int", - "col": "int", + openapi_types = { + 'message': 'str', + 'id': 'str', + 'item': 'str', + 'file': 'str', + 'line': 'int', + 'col': 'int' } attribute_map = { - "message": "message", - "id": "id", - "item": "item", - "file": "file", - "line": "line", - "col": "col", + 'message': 'message', + 'id': 'id', + 'item': 'item', + 'file': 'file', + 'line': 'line', + 'col': 'col' } - def __init__( - self, - message=None, - id=None, - item=None, - file=None, - line=None, - col=None, - _configuration=None, - ): # noqa: E501 - """ErrorData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, message=None, id=None, item=None, file=None, line=None, col=None, local_vars_configuration=None): # noqa: E501 + """ErrorData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._id = None @@ -104,7 +99,7 @@ def message(self, message): The error message that describes the problem. # noqa: E501 :param message: The message of this ErrorData. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -127,7 +122,7 @@ def id(self, id): An internal identifier of the error. # noqa: E501 :param id: The id of this ErrorData. # noqa: E501 - :type: str + :type id: str """ self._id = id @@ -150,7 +145,7 @@ def item(self, item): Reference to the item this error is referring to. # noqa: E501 :param item: The item of this ErrorData. # noqa: E501 - :type: str + :type item: str """ self._item = item @@ -173,7 +168,7 @@ def file(self, file): The file this error occurred in. # noqa: E501 :param file: The file of this ErrorData. # noqa: E501 - :type: str + :type file: str """ self._file = file @@ -196,7 +191,7 @@ def line(self, line): The number of line in the file this error occurred in. # noqa: E501 :param line: The line of this ErrorData. # noqa: E501 - :type: int + :type line: int """ self._line = line @@ -219,37 +214,40 @@ def col(self, col): The number of column in the file this error occurred in. # noqa: E501 :param col: The col of this ErrorData. # noqa: E501 - :type: int + :type col: int """ self._col = col - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ErrorData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/error_list.py b/src/clients/ctm_api_client/models/error_list.py index 4703f6e..10b8245 100644 --- a/src/clients/ctm_api_client/models/error_list.py +++ b/src/clients/ctm_api_client/models/error_list.py @@ -5,48 +5,55 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ErrorList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"errors": "list[ErrorData]"} + openapi_types = { + 'errors': 'list[ErrorData]' + } - attribute_map = {"errors": "errors"} + attribute_map = { + 'errors': 'errors' + } - def __init__(self, errors=None, _configuration=None): # noqa: E501 - """ErrorList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, errors=None, local_vars_configuration=None): # noqa: E501 + """ErrorList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._errors = None self.discriminator = None - if errors is not None: - self.errors = errors + self.errors = errors @property def errors(self): @@ -64,37 +71,42 @@ def errors(self, errors): :param errors: The errors of this ErrorList. # noqa: E501 - :type: list[ErrorData] + :type errors: list[ErrorData] """ + if self.local_vars_configuration.client_side_validation and errors is None: # noqa: E501 + raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501 self._errors = errors - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ErrorList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/event.py b/src/clients/ctm_api_client/models/event.py index a3d7cdd..a0131b3 100644 --- a/src/clients/ctm_api_client/models/event.py +++ b/src/clients/ctm_api_client/models/event.py @@ -5,56 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Event(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "ctm": "str", "_date": "str"} - - attribute_map = {"name": "name", "ctm": "ctm", "_date": "date"} - - def __init__( - self, name=None, ctm=None, _date=None, _configuration=None - ): # noqa: E501 - """Event - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'ctm': 'str', + 'date': 'str' + } + + attribute_map = { + 'name': 'name', + 'ctm': 'ctm', + 'date': 'date' + } + + def __init__(self, name=None, ctm=None, date=None, local_vars_configuration=None): # noqa: E501 + """Event - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._ctm = None - self.__date = None + self._date = None self.discriminator = None if name is not None: self.name = name if ctm is not None: self.ctm = ctm - if _date is not None: - self._date = _date + if date is not None: + self.date = date @property def name(self): @@ -74,7 +84,7 @@ def name(self, name): Event name # noqa: E501 :param name: The name of this Event. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -97,60 +107,63 @@ def ctm(self, ctm): Control-M Server hosting the event # noqa: E501 :param ctm: The ctm of this Event. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @property - def _date(self): - """Gets the _date of this Event. # noqa: E501 + def date(self): + """Gets the date of this Event. # noqa: E501 The event date, either date in format dd/mm/yy or a string \"orderdate\" # noqa: E501 - :return: The _date of this Event. # noqa: E501 + :return: The date of this Event. # noqa: E501 :rtype: str """ - return self.__date + return self._date - @_date.setter - def _date(self, _date): - """Sets the _date of this Event. + @date.setter + def date(self, date): + """Sets the date of this Event. The event date, either date in format dd/mm/yy or a string \"orderdate\" # noqa: E501 - :param _date: The _date of this Event. # noqa: E501 - :type: str + :param date: The date of this Event. # noqa: E501 + :type date: str """ - self.__date = _date + self._date = date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Event, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/event_param.py b/src/clients/ctm_api_client/models/event_param.py index 68b606f..2d46f71 100644 --- a/src/clients/ctm_api_client/models/event_param.py +++ b/src/clients/ctm_api_client/models/event_param.py @@ -5,49 +5,59 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class EventParam(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "_date": "str"} - - attribute_map = {"name": "name", "_date": "date"} - - def __init__(self, name=None, _date=None, _configuration=None): # noqa: E501 - """EventParam - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'date': 'str' + } + + attribute_map = { + 'name': 'name', + 'date': 'date' + } + + def __init__(self, name=None, date=None, local_vars_configuration=None): # noqa: E501 + """EventParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None - self.__date = None + self._date = None self.discriminator = None self.name = name - self._date = _date + self.date = date @property def name(self): @@ -65,66 +75,65 @@ def name(self, name): :param name: The name of this EventParam. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property - def _date(self): - """Gets the _date of this EventParam. # noqa: E501 + def date(self): + """Gets the date of this EventParam. # noqa: E501 - :return: The _date of this EventParam. # noqa: E501 + :return: The date of this EventParam. # noqa: E501 :rtype: str """ - return self.__date + return self._date - @_date.setter - def _date(self, _date): - """Sets the _date of this EventParam. + @date.setter + def date(self, date): + """Sets the date of this EventParam. - :param _date: The _date of this EventParam. # noqa: E501 - :type: str + :param date: The date of this EventParam. # noqa: E501 + :type date: str """ - if self._configuration.client_side_validation and _date is None: - raise ValueError( - "Invalid value for `_date`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 + raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 - self.__date = _date + self._date = date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(EventParam, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/event_set.py b/src/clients/ctm_api_client/models/event_set.py deleted file mode 100644 index 46f9983..0000000 --- a/src/clients/ctm_api_client/models/event_set.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class EventSet(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """EventSet - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(EventSet, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EventSet): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, EventSet): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/external_provider_authentication_data.py b/src/clients/ctm_api_client/models/external_provider_authentication_data.py index c55c501..8af1194 100644 --- a/src/clients/ctm_api_client/models/external_provider_authentication_data.py +++ b/src/clients/ctm_api_client/models/external_provider_authentication_data.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ExternalProviderAuthenticationData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"ldap_user_and_domain": "str"} + openapi_types = { + 'ldap_user_and_domain': 'str' + } - attribute_map = {"ldap_user_and_domain": "LdapUserAndDomain"} + attribute_map = { + 'ldap_user_and_domain': 'LdapUserAndDomain' + } - def __init__(self, ldap_user_and_domain=None, _configuration=None): # noqa: E501 - """ExternalProviderAuthenticationData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ldap_user_and_domain=None, local_vars_configuration=None): # noqa: E501 + """ExternalProviderAuthenticationData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ldap_user_and_domain = None self.discriminator = None @@ -66,37 +74,40 @@ def ldap_user_and_domain(self, ldap_user_and_domain): ldap user and domain # noqa: E501 :param ldap_user_and_domain: The ldap_user_and_domain of this ExternalProviderAuthenticationData. # noqa: E501 - :type: str + :type ldap_user_and_domain: str """ self._ldap_user_and_domain = ldap_user_and_domain - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ExternalProviderAuthenticationData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/external_user_data.py b/src/clients/ctm_api_client/models/external_user_data.py index 854da9a..f71a372 100644 --- a/src/clients/ctm_api_client/models/external_user_data.py +++ b/src/clients/ctm_api_client/models/external_user_data.py @@ -5,83 +5,78 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ExternalUserData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "email": "str", - "company": "str", - "password": "str", - "description": "str", - "phone_number": "str", - "ssh_key": "str", - "as2_key": "As2KeyData", - "is_locked": "bool", - "lock_reason": "str", - "change_password_at_next_login": "bool", - "password_never_expires": "bool", + openapi_types = { + 'name': 'str', + 'email': 'str', + 'company': 'str', + 'password': 'str', + 'description': 'str', + 'phone_number': 'str', + 'ssh_key': 'str', + 'as2_key': 'As2KeyData', + 'is_locked': 'bool', + 'lock_reason': 'str', + 'change_password_at_next_login': 'bool', + 'password_never_expires': 'bool', + 'home_folder': 'str', + 'password_update_time': 'str', + 'public_key_update_time': 'str' } attribute_map = { - "name": "name", - "email": "email", - "company": "company", - "password": "password", - "description": "description", - "phone_number": "phoneNumber", - "ssh_key": "sshKey", - "as2_key": "as2Key", - "is_locked": "isLocked", - "lock_reason": "lockReason", - "change_password_at_next_login": "changePasswordAtNextLogin", - "password_never_expires": "passwordNeverExpires", + 'name': 'name', + 'email': 'email', + 'company': 'company', + 'password': 'password', + 'description': 'description', + 'phone_number': 'phoneNumber', + 'ssh_key': 'sshKey', + 'as2_key': 'as2Key', + 'is_locked': 'isLocked', + 'lock_reason': 'lockReason', + 'change_password_at_next_login': 'changePasswordAtNextLogin', + 'password_never_expires': 'passwordNeverExpires', + 'home_folder': 'homeFolder', + 'password_update_time': 'passwordUpdateTime', + 'public_key_update_time': 'publicKeyUpdateTime' } - def __init__( - self, - name=None, - email=None, - company=None, - password=None, - description=None, - phone_number=None, - ssh_key=None, - as2_key=None, - is_locked=None, - lock_reason=None, - change_password_at_next_login=None, - password_never_expires=None, - _configuration=None, - ): # noqa: E501 - """ExternalUserData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, email=None, company=None, password=None, description=None, phone_number=None, ssh_key=None, as2_key=None, is_locked=None, lock_reason=None, change_password_at_next_login=None, password_never_expires=None, home_folder=None, password_update_time=None, public_key_update_time=None, local_vars_configuration=None): # noqa: E501 + """ExternalUserData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._email = None @@ -95,6 +90,9 @@ def __init__( self._lock_reason = None self._change_password_at_next_login = None self._password_never_expires = None + self._home_folder = None + self._password_update_time = None + self._public_key_update_time = None self.discriminator = None if name is not None: @@ -121,12 +119,18 @@ def __init__( self.change_password_at_next_login = change_password_at_next_login if password_never_expires is not None: self.password_never_expires = password_never_expires + if home_folder is not None: + self.home_folder = home_folder + if password_update_time is not None: + self.password_update_time = password_update_time + if public_key_update_time is not None: + self.public_key_update_time = public_key_update_time @property def name(self): """Gets the name of this ExternalUserData. # noqa: E501 - external user name REQUIRED:addExternalUser | HIDDEN # noqa: E501 + external user name REQUIRED:addExternalUser,addExternalUserForSite | HIDDEN # noqa: E501 :return: The name of this ExternalUserData. # noqa: E501 :rtype: str @@ -137,10 +141,10 @@ def name(self): def name(self, name): """Sets the name of this ExternalUserData. - external user name REQUIRED:addExternalUser | HIDDEN # noqa: E501 + external user name REQUIRED:addExternalUser,addExternalUserForSite | HIDDEN # noqa: E501 :param name: The name of this ExternalUserData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -149,7 +153,7 @@ def name(self, name): def email(self): """Gets the email of this ExternalUserData. # noqa: E501 - user email REQUIRED:addExternalUser | HIDDEN # noqa: E501 + user email REQUIRED:addExternalUser,addExternalUserForSite | HIDDEN # noqa: E501 :return: The email of this ExternalUserData. # noqa: E501 :rtype: str @@ -160,10 +164,10 @@ def email(self): def email(self, email): """Sets the email of this ExternalUserData. - user email REQUIRED:addExternalUser | HIDDEN # noqa: E501 + user email REQUIRED:addExternalUser,addExternalUserForSite | HIDDEN # noqa: E501 :param email: The email of this ExternalUserData. # noqa: E501 - :type: str + :type email: str """ self._email = email @@ -172,7 +176,7 @@ def email(self, email): def company(self): """Gets the company of this ExternalUserData. # noqa: E501 - user's company REQUIRED:addExternalUser | HIDDEN # noqa: E501 + user's company REQUIRED:addExternalUser,addExternalUserForSite | HIDDEN # noqa: E501 :return: The company of this ExternalUserData. # noqa: E501 :rtype: str @@ -183,10 +187,10 @@ def company(self): def company(self, company): """Sets the company of this ExternalUserData. - user's company REQUIRED:addExternalUser | HIDDEN # noqa: E501 + user's company REQUIRED:addExternalUser,addExternalUserForSite | HIDDEN # noqa: E501 :param company: The company of this ExternalUserData. # noqa: E501 - :type: str + :type company: str """ self._company = company @@ -195,7 +199,7 @@ def company(self, company): def password(self): """Gets the password of this ExternalUserData. # noqa: E501 - user password HIDDEN:updateExternalUser # noqa: E501 + user password HIDDEN:updateExternalUser,updateExternalUserForSite # noqa: E501 :return: The password of this ExternalUserData. # noqa: E501 :rtype: str @@ -206,10 +210,10 @@ def password(self): def password(self, password): """Sets the password of this ExternalUserData. - user password HIDDEN:updateExternalUser # noqa: E501 + user password HIDDEN:updateExternalUser,updateExternalUserForSite # noqa: E501 :param password: The password of this ExternalUserData. # noqa: E501 - :type: str + :type password: str """ self._password = password @@ -232,7 +236,7 @@ def description(self, description): user description HIDDEN # noqa: E501 :param description: The description of this ExternalUserData. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -255,7 +259,7 @@ def phone_number(self, phone_number): external user phone number HIDDEN # noqa: E501 :param phone_number: The phone_number of this ExternalUserData. # noqa: E501 - :type: str + :type phone_number: str """ self._phone_number = phone_number @@ -278,7 +282,7 @@ def ssh_key(self, ssh_key): SSH key string HIDDEN # noqa: E501 :param ssh_key: The ssh_key of this ExternalUserData. # noqa: E501 - :type: str + :type ssh_key: str """ self._ssh_key = ssh_key @@ -287,7 +291,6 @@ def ssh_key(self, ssh_key): def as2_key(self): """Gets the as2_key of this ExternalUserData. # noqa: E501 - AS2 key string HIDDEN # noqa: E501 :return: The as2_key of this ExternalUserData. # noqa: E501 :rtype: As2KeyData @@ -298,10 +301,9 @@ def as2_key(self): def as2_key(self, as2_key): """Sets the as2_key of this ExternalUserData. - AS2 key string HIDDEN # noqa: E501 :param as2_key: The as2_key of this ExternalUserData. # noqa: E501 - :type: As2KeyData + :type as2_key: As2KeyData """ self._as2_key = as2_key @@ -324,7 +326,7 @@ def is_locked(self, is_locked): indicates whether the user account is locked HIDDEN # noqa: E501 :param is_locked: The is_locked of this ExternalUserData. # noqa: E501 - :type: bool + :type is_locked: bool """ self._is_locked = is_locked @@ -347,7 +349,7 @@ def lock_reason(self, lock_reason): provides the reason for locking the user account HIDDEN # noqa: E501 :param lock_reason: The lock_reason of this ExternalUserData. # noqa: E501 - :type: str + :type lock_reason: str """ self._lock_reason = lock_reason @@ -370,7 +372,7 @@ def change_password_at_next_login(self, change_password_at_next_login): indicates whether a password change is required at next login HIDDEN # noqa: E501 :param change_password_at_next_login: The change_password_at_next_login of this ExternalUserData. # noqa: E501 - :type: bool + :type change_password_at_next_login: bool """ self._change_password_at_next_login = change_password_at_next_login @@ -393,37 +395,109 @@ def password_never_expires(self, password_never_expires): indicates whether the user's password is set to never expire HIDDEN # noqa: E501 :param password_never_expires: The password_never_expires of this ExternalUserData. # noqa: E501 - :type: bool + :type password_never_expires: bool """ self._password_never_expires = password_never_expires - def to_dict(self): + @property + def home_folder(self): + """Gets the home_folder of this ExternalUserData. # noqa: E501 + + default user's home directory HIDDEN # noqa: E501 + + :return: The home_folder of this ExternalUserData. # noqa: E501 + :rtype: str + """ + return self._home_folder + + @home_folder.setter + def home_folder(self, home_folder): + """Sets the home_folder of this ExternalUserData. + + default user's home directory HIDDEN # noqa: E501 + + :param home_folder: The home_folder of this ExternalUserData. # noqa: E501 + :type home_folder: str + """ + + self._home_folder = home_folder + + @property + def password_update_time(self): + """Gets the password_update_time of this ExternalUserData. # noqa: E501 + + indicate when the user's password changed HIDDEN # noqa: E501 + + :return: The password_update_time of this ExternalUserData. # noqa: E501 + :rtype: str + """ + return self._password_update_time + + @password_update_time.setter + def password_update_time(self, password_update_time): + """Sets the password_update_time of this ExternalUserData. + + indicate when the user's password changed HIDDEN # noqa: E501 + + :param password_update_time: The password_update_time of this ExternalUserData. # noqa: E501 + :type password_update_time: str + """ + + self._password_update_time = password_update_time + + @property + def public_key_update_time(self): + """Gets the public_key_update_time of this ExternalUserData. # noqa: E501 + + indicate when the user's ssh public key changed HIDDEN # noqa: E501 + + :return: The public_key_update_time of this ExternalUserData. # noqa: E501 + :rtype: str + """ + return self._public_key_update_time + + @public_key_update_time.setter + def public_key_update_time(self, public_key_update_time): + """Sets the public_key_update_time of this ExternalUserData. + + indicate when the user's ssh public key changed HIDDEN # noqa: E501 + + :param public_key_update_time: The public_key_update_time of this ExternalUserData. # noqa: E501 + :type public_key_update_time: str + """ + + self._public_key_update_time = public_key_update_time + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ExternalUserData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/extract_service_prop_params.py b/src/clients/ctm_api_client/models/extract_service_prop_params.py index 49a9c6b..5d15442 100644 --- a/src/clients/ctm_api_client/models/extract_service_prop_params.py +++ b/src/clients/ctm_api_client/models/extract_service_prop_params.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ExtractServicePropParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "option": "str", - "ruletable": "str", - "aidbglvl": "str", - "filter": "str", - "exitpgm": "str", - "aitout": "str", - "aistatus": "str", + openapi_types = { + 'option': 'str', + 'ruletable': 'str', + 'aidbglvl': 'str', + 'filter': 'str', + 'exitpgm': 'str', + 'aitout': 'str', + 'aistatus': 'str' } attribute_map = { - "option": "option", - "ruletable": "ruletable", - "aidbglvl": "aidbglvl", - "filter": "filter", - "exitpgm": "exitpgm", - "aitout": "aitout", - "aistatus": "aistatus", + 'option': 'option', + 'ruletable': 'ruletable', + 'aidbglvl': 'aidbglvl', + 'filter': 'filter', + 'exitpgm': 'exitpgm', + 'aitout': 'aitout', + 'aistatus': 'aistatus' } - def __init__( - self, - option=None, - ruletable=None, - aidbglvl=None, - filter=None, - exitpgm=None, - aitout=None, - aistatus=None, - _configuration=None, - ): # noqa: E501 - """ExtractServicePropParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, option=None, ruletable=None, aidbglvl=None, filter=None, exitpgm=None, aitout=None, aistatus=None, local_vars_configuration=None): # noqa: E501 + """ExtractServicePropParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._option = None self._ruletable = None @@ -110,7 +104,7 @@ def option(self, option): Start with Agent startup # noqa: E501 :param option: The option of this ExtractServicePropParams. # noqa: E501 - :type: str + :type option: str """ self._option = option @@ -133,7 +127,7 @@ def ruletable(self, ruletable): Rule table name # noqa: E501 :param ruletable: The ruletable of this ExtractServicePropParams. # noqa: E501 - :type: str + :type ruletable: str """ self._ruletable = ruletable @@ -156,7 +150,7 @@ def aidbglvl(self, aidbglvl): Extractor Diagnostic Level # noqa: E501 :param aidbglvl: The aidbglvl of this ExtractServicePropParams. # noqa: E501 - :type: str + :type aidbglvl: str """ self._aidbglvl = aidbglvl @@ -179,7 +173,7 @@ def filter(self, filter): Filter Key # noqa: E501 :param filter: The filter of this ExtractServicePropParams. # noqa: E501 - :type: str + :type filter: str """ self._filter = filter @@ -202,7 +196,7 @@ def exitpgm(self, exitpgm): Exit Program Name # noqa: E501 :param exitpgm: The exitpgm of this ExtractServicePropParams. # noqa: E501 - :type: str + :type exitpgm: str """ self._exitpgm = exitpgm @@ -225,7 +219,7 @@ def aitout(self, aitout): Extractor Timeout # noqa: E501 :param aitout: The aitout of this ExtractServicePropParams. # noqa: E501 - :type: str + :type aitout: str """ self._aitout = aitout @@ -248,37 +242,40 @@ def aistatus(self, aistatus): Service Status # noqa: E501 :param aistatus: The aistatus of this ExtractServicePropParams. # noqa: E501 - :type: str + :type aistatus: str """ self._aistatus = aistatus - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ExtractServicePropParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/field_metadata_properties.py b/src/clients/ctm_api_client/models/field_metadata_properties.py index 4beb167..bbe6ac0 100644 --- a/src/clients/ctm_api_client/models/field_metadata_properties.py +++ b/src/clients/ctm_api_client/models/field_metadata_properties.py @@ -5,119 +5,126 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FieldMetadataProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "control_type": "str", - "data_type": "str", - "display_name": "str", - "display_name_id": "str", - "false_value": "str", - "hashed_password": "bool", - "hide_if": "ConditionProperties", - "key": "SettingKeyProperties", - "name": "str", - "need_restart": "bool", - "need_restart_message": "str", - "need_restart_message_id": "str", - "placeholder": "str", - "placeholder_id": "str", - "possible_values": "list[PossibleValueProperties]", - "profiles": "list[str]", - "setting_changed_event_types": "list[str]", - "show_if": "ConditionProperties", - "tooltip": "str", - "tooltip_id": "str", - "true_value": "str", - "units_label": "str", - "units_label_id": "str", - "validations": "ValidationProperties", + openapi_types = { + 'control_type': 'str', + 'data_type': 'str', + 'display_name': 'str', + 'display_name_id': 'str', + 'false_value': 'str', + 'hashed_password': 'bool', + 'hide_if': 'ConditionProperties', + 'key': 'SettingKeyProperties', + 'name': 'str', + 'need_restart': 'bool', + 'read_only': 'bool', + 'copy_tooltip': 'str', + 'copied_tooltip': 'str', + 'need_restart_message': 'str', + 'need_restart_message_id': 'str', + 'placeholder': 'str', + 'placeholder_id': 'str', + 'possible_values': 'list[PossibleValueProperties]', + 'profiles': 'list[str]', + 'setting_changed_event_types': 'list[str]', + 'show_if': 'ConditionProperties', + 'tooltip': 'str', + 'tooltip_id': 'str', + 'true_value': 'str', + 'units_label': 'str', + 'units_label_id': 'str', + 'validations': 'ValidationProperties', + 'operation_link_label': 'str', + 'current_label': 'str', + 'new_label': 'str', + 'warning_title': 'str', + 'warning_message': 'str', + 'operation_button_label': 'str', + 'operation_cancel_button_label': 'str', + 'operation_discard_link_label': 'str', + 'rows_number': 'int', + 'prevent_line_break': 'bool', + 'prevent_resize': 'bool', + 'allow_exceed_length': 'bool' } attribute_map = { - "control_type": "controlType", - "data_type": "dataType", - "display_name": "displayName", - "display_name_id": "displayNameID", - "false_value": "falseValue", - "hashed_password": "hashedPassword", - "hide_if": "hideIf", - "key": "key", - "name": "name", - "need_restart": "needRestart", - "need_restart_message": "needRestartMessage", - "need_restart_message_id": "needRestartMessageID", - "placeholder": "placeholder", - "placeholder_id": "placeholderID", - "possible_values": "possibleValues", - "profiles": "profiles", - "setting_changed_event_types": "settingChangedEventTypes", - "show_if": "showIf", - "tooltip": "tooltip", - "tooltip_id": "tooltipID", - "true_value": "trueValue", - "units_label": "unitsLabel", - "units_label_id": "unitsLabelID", - "validations": "validations", + 'control_type': 'controlType', + 'data_type': 'dataType', + 'display_name': 'displayName', + 'display_name_id': 'displayNameID', + 'false_value': 'falseValue', + 'hashed_password': 'hashedPassword', + 'hide_if': 'hideIf', + 'key': 'key', + 'name': 'name', + 'need_restart': 'needRestart', + 'read_only': 'readOnly', + 'copy_tooltip': 'copyTooltip', + 'copied_tooltip': 'copiedTooltip', + 'need_restart_message': 'needRestartMessage', + 'need_restart_message_id': 'needRestartMessageID', + 'placeholder': 'placeholder', + 'placeholder_id': 'placeholderID', + 'possible_values': 'possibleValues', + 'profiles': 'profiles', + 'setting_changed_event_types': 'settingChangedEventTypes', + 'show_if': 'showIf', + 'tooltip': 'tooltip', + 'tooltip_id': 'tooltipID', + 'true_value': 'trueValue', + 'units_label': 'unitsLabel', + 'units_label_id': 'unitsLabelID', + 'validations': 'validations', + 'operation_link_label': 'operationLinkLabel', + 'current_label': 'currentLabel', + 'new_label': 'newLabel', + 'warning_title': 'warningTitle', + 'warning_message': 'warningMessage', + 'operation_button_label': 'operationButtonLabel', + 'operation_cancel_button_label': 'operationCancelButtonLabel', + 'operation_discard_link_label': 'operationDiscardLinkLabel', + 'rows_number': 'rowsNumber', + 'prevent_line_break': 'preventLineBreak', + 'prevent_resize': 'preventResize', + 'allow_exceed_length': 'allowExceedLength' } - def __init__( - self, - control_type=None, - data_type=None, - display_name=None, - display_name_id=None, - false_value=None, - hashed_password=None, - hide_if=None, - key=None, - name=None, - need_restart=None, - need_restart_message=None, - need_restart_message_id=None, - placeholder=None, - placeholder_id=None, - possible_values=None, - profiles=None, - setting_changed_event_types=None, - show_if=None, - tooltip=None, - tooltip_id=None, - true_value=None, - units_label=None, - units_label_id=None, - validations=None, - _configuration=None, - ): # noqa: E501 - """FieldMetadataProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, control_type=None, data_type=None, display_name=None, display_name_id=None, false_value=None, hashed_password=None, hide_if=None, key=None, name=None, need_restart=None, read_only=None, copy_tooltip=None, copied_tooltip=None, need_restart_message=None, need_restart_message_id=None, placeholder=None, placeholder_id=None, possible_values=None, profiles=None, setting_changed_event_types=None, show_if=None, tooltip=None, tooltip_id=None, true_value=None, units_label=None, units_label_id=None, validations=None, operation_link_label=None, current_label=None, new_label=None, warning_title=None, warning_message=None, operation_button_label=None, operation_cancel_button_label=None, operation_discard_link_label=None, rows_number=None, prevent_line_break=None, prevent_resize=None, allow_exceed_length=None, local_vars_configuration=None): # noqa: E501 + """FieldMetadataProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._control_type = None self._data_type = None @@ -129,6 +136,9 @@ def __init__( self._key = None self._name = None self._need_restart = None + self._read_only = None + self._copy_tooltip = None + self._copied_tooltip = None self._need_restart_message = None self._need_restart_message_id = None self._placeholder = None @@ -143,6 +153,18 @@ def __init__( self._units_label = None self._units_label_id = None self._validations = None + self._operation_link_label = None + self._current_label = None + self._new_label = None + self._warning_title = None + self._warning_message = None + self._operation_button_label = None + self._operation_cancel_button_label = None + self._operation_discard_link_label = None + self._rows_number = None + self._prevent_line_break = None + self._prevent_resize = None + self._allow_exceed_length = None self.discriminator = None if control_type is not None: @@ -165,6 +187,12 @@ def __init__( self.name = name if need_restart is not None: self.need_restart = need_restart + if read_only is not None: + self.read_only = read_only + if copy_tooltip is not None: + self.copy_tooltip = copy_tooltip + if copied_tooltip is not None: + self.copied_tooltip = copied_tooltip if need_restart_message is not None: self.need_restart_message = need_restart_message if need_restart_message_id is not None: @@ -193,6 +221,30 @@ def __init__( self.units_label_id = units_label_id if validations is not None: self.validations = validations + if operation_link_label is not None: + self.operation_link_label = operation_link_label + if current_label is not None: + self.current_label = current_label + if new_label is not None: + self.new_label = new_label + if warning_title is not None: + self.warning_title = warning_title + if warning_message is not None: + self.warning_message = warning_message + if operation_button_label is not None: + self.operation_button_label = operation_button_label + if operation_cancel_button_label is not None: + self.operation_cancel_button_label = operation_cancel_button_label + if operation_discard_link_label is not None: + self.operation_discard_link_label = operation_discard_link_label + if rows_number is not None: + self.rows_number = rows_number + if prevent_line_break is not None: + self.prevent_line_break = prevent_line_break + if prevent_resize is not None: + self.prevent_resize = prevent_resize + if allow_exceed_length is not None: + self.allow_exceed_length = allow_exceed_length @property def control_type(self): @@ -210,7 +262,7 @@ def control_type(self, control_type): :param control_type: The control_type of this FieldMetadataProperties. # noqa: E501 - :type: str + :type control_type: str """ self._control_type = control_type @@ -231,7 +283,7 @@ def data_type(self, data_type): :param data_type: The data_type of this FieldMetadataProperties. # noqa: E501 - :type: str + :type data_type: str """ self._data_type = data_type @@ -252,7 +304,7 @@ def display_name(self, display_name): :param display_name: The display_name of this FieldMetadataProperties. # noqa: E501 - :type: str + :type display_name: str """ self._display_name = display_name @@ -273,7 +325,7 @@ def display_name_id(self, display_name_id): :param display_name_id: The display_name_id of this FieldMetadataProperties. # noqa: E501 - :type: str + :type display_name_id: str """ self._display_name_id = display_name_id @@ -294,7 +346,7 @@ def false_value(self, false_value): :param false_value: The false_value of this FieldMetadataProperties. # noqa: E501 - :type: str + :type false_value: str """ self._false_value = false_value @@ -315,7 +367,7 @@ def hashed_password(self, hashed_password): :param hashed_password: The hashed_password of this FieldMetadataProperties. # noqa: E501 - :type: bool + :type hashed_password: bool """ self._hashed_password = hashed_password @@ -336,7 +388,7 @@ def hide_if(self, hide_if): :param hide_if: The hide_if of this FieldMetadataProperties. # noqa: E501 - :type: ConditionProperties + :type hide_if: ConditionProperties """ self._hide_if = hide_if @@ -357,7 +409,7 @@ def key(self, key): :param key: The key of this FieldMetadataProperties. # noqa: E501 - :type: SettingKeyProperties + :type key: SettingKeyProperties """ self._key = key @@ -378,7 +430,7 @@ def name(self, name): :param name: The name of this FieldMetadataProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -399,11 +451,74 @@ def need_restart(self, need_restart): :param need_restart: The need_restart of this FieldMetadataProperties. # noqa: E501 - :type: bool + :type need_restart: bool """ self._need_restart = need_restart + @property + def read_only(self): + """Gets the read_only of this FieldMetadataProperties. # noqa: E501 + + + :return: The read_only of this FieldMetadataProperties. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this FieldMetadataProperties. + + + :param read_only: The read_only of this FieldMetadataProperties. # noqa: E501 + :type read_only: bool + """ + + self._read_only = read_only + + @property + def copy_tooltip(self): + """Gets the copy_tooltip of this FieldMetadataProperties. # noqa: E501 + + + :return: The copy_tooltip of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._copy_tooltip + + @copy_tooltip.setter + def copy_tooltip(self, copy_tooltip): + """Sets the copy_tooltip of this FieldMetadataProperties. + + + :param copy_tooltip: The copy_tooltip of this FieldMetadataProperties. # noqa: E501 + :type copy_tooltip: str + """ + + self._copy_tooltip = copy_tooltip + + @property + def copied_tooltip(self): + """Gets the copied_tooltip of this FieldMetadataProperties. # noqa: E501 + + + :return: The copied_tooltip of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._copied_tooltip + + @copied_tooltip.setter + def copied_tooltip(self, copied_tooltip): + """Sets the copied_tooltip of this FieldMetadataProperties. + + + :param copied_tooltip: The copied_tooltip of this FieldMetadataProperties. # noqa: E501 + :type copied_tooltip: str + """ + + self._copied_tooltip = copied_tooltip + @property def need_restart_message(self): """Gets the need_restart_message of this FieldMetadataProperties. # noqa: E501 @@ -420,7 +535,7 @@ def need_restart_message(self, need_restart_message): :param need_restart_message: The need_restart_message of this FieldMetadataProperties. # noqa: E501 - :type: str + :type need_restart_message: str """ self._need_restart_message = need_restart_message @@ -441,7 +556,7 @@ def need_restart_message_id(self, need_restart_message_id): :param need_restart_message_id: The need_restart_message_id of this FieldMetadataProperties. # noqa: E501 - :type: str + :type need_restart_message_id: str """ self._need_restart_message_id = need_restart_message_id @@ -462,7 +577,7 @@ def placeholder(self, placeholder): :param placeholder: The placeholder of this FieldMetadataProperties. # noqa: E501 - :type: str + :type placeholder: str """ self._placeholder = placeholder @@ -483,7 +598,7 @@ def placeholder_id(self, placeholder_id): :param placeholder_id: The placeholder_id of this FieldMetadataProperties. # noqa: E501 - :type: str + :type placeholder_id: str """ self._placeholder_id = placeholder_id @@ -504,7 +619,7 @@ def possible_values(self, possible_values): :param possible_values: The possible_values of this FieldMetadataProperties. # noqa: E501 - :type: list[PossibleValueProperties] + :type possible_values: list[PossibleValueProperties] """ self._possible_values = possible_values @@ -525,7 +640,7 @@ def profiles(self, profiles): :param profiles: The profiles of this FieldMetadataProperties. # noqa: E501 - :type: list[str] + :type profiles: list[str] """ self._profiles = profiles @@ -546,7 +661,7 @@ def setting_changed_event_types(self, setting_changed_event_types): :param setting_changed_event_types: The setting_changed_event_types of this FieldMetadataProperties. # noqa: E501 - :type: list[str] + :type setting_changed_event_types: list[str] """ self._setting_changed_event_types = setting_changed_event_types @@ -567,7 +682,7 @@ def show_if(self, show_if): :param show_if: The show_if of this FieldMetadataProperties. # noqa: E501 - :type: ConditionProperties + :type show_if: ConditionProperties """ self._show_if = show_if @@ -588,7 +703,7 @@ def tooltip(self, tooltip): :param tooltip: The tooltip of this FieldMetadataProperties. # noqa: E501 - :type: str + :type tooltip: str """ self._tooltip = tooltip @@ -609,7 +724,7 @@ def tooltip_id(self, tooltip_id): :param tooltip_id: The tooltip_id of this FieldMetadataProperties. # noqa: E501 - :type: str + :type tooltip_id: str """ self._tooltip_id = tooltip_id @@ -630,7 +745,7 @@ def true_value(self, true_value): :param true_value: The true_value of this FieldMetadataProperties. # noqa: E501 - :type: str + :type true_value: str """ self._true_value = true_value @@ -651,7 +766,7 @@ def units_label(self, units_label): :param units_label: The units_label of this FieldMetadataProperties. # noqa: E501 - :type: str + :type units_label: str """ self._units_label = units_label @@ -672,7 +787,7 @@ def units_label_id(self, units_label_id): :param units_label_id: The units_label_id of this FieldMetadataProperties. # noqa: E501 - :type: str + :type units_label_id: str """ self._units_label_id = units_label_id @@ -693,37 +808,292 @@ def validations(self, validations): :param validations: The validations of this FieldMetadataProperties. # noqa: E501 - :type: ValidationProperties + :type validations: ValidationProperties """ self._validations = validations - def to_dict(self): + @property + def operation_link_label(self): + """Gets the operation_link_label of this FieldMetadataProperties. # noqa: E501 + + + :return: The operation_link_label of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._operation_link_label + + @operation_link_label.setter + def operation_link_label(self, operation_link_label): + """Sets the operation_link_label of this FieldMetadataProperties. + + + :param operation_link_label: The operation_link_label of this FieldMetadataProperties. # noqa: E501 + :type operation_link_label: str + """ + + self._operation_link_label = operation_link_label + + @property + def current_label(self): + """Gets the current_label of this FieldMetadataProperties. # noqa: E501 + + + :return: The current_label of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._current_label + + @current_label.setter + def current_label(self, current_label): + """Sets the current_label of this FieldMetadataProperties. + + + :param current_label: The current_label of this FieldMetadataProperties. # noqa: E501 + :type current_label: str + """ + + self._current_label = current_label + + @property + def new_label(self): + """Gets the new_label of this FieldMetadataProperties. # noqa: E501 + + + :return: The new_label of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._new_label + + @new_label.setter + def new_label(self, new_label): + """Sets the new_label of this FieldMetadataProperties. + + + :param new_label: The new_label of this FieldMetadataProperties. # noqa: E501 + :type new_label: str + """ + + self._new_label = new_label + + @property + def warning_title(self): + """Gets the warning_title of this FieldMetadataProperties. # noqa: E501 + + + :return: The warning_title of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._warning_title + + @warning_title.setter + def warning_title(self, warning_title): + """Sets the warning_title of this FieldMetadataProperties. + + + :param warning_title: The warning_title of this FieldMetadataProperties. # noqa: E501 + :type warning_title: str + """ + + self._warning_title = warning_title + + @property + def warning_message(self): + """Gets the warning_message of this FieldMetadataProperties. # noqa: E501 + + + :return: The warning_message of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._warning_message + + @warning_message.setter + def warning_message(self, warning_message): + """Sets the warning_message of this FieldMetadataProperties. + + + :param warning_message: The warning_message of this FieldMetadataProperties. # noqa: E501 + :type warning_message: str + """ + + self._warning_message = warning_message + + @property + def operation_button_label(self): + """Gets the operation_button_label of this FieldMetadataProperties. # noqa: E501 + + + :return: The operation_button_label of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._operation_button_label + + @operation_button_label.setter + def operation_button_label(self, operation_button_label): + """Sets the operation_button_label of this FieldMetadataProperties. + + + :param operation_button_label: The operation_button_label of this FieldMetadataProperties. # noqa: E501 + :type operation_button_label: str + """ + + self._operation_button_label = operation_button_label + + @property + def operation_cancel_button_label(self): + """Gets the operation_cancel_button_label of this FieldMetadataProperties. # noqa: E501 + + + :return: The operation_cancel_button_label of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._operation_cancel_button_label + + @operation_cancel_button_label.setter + def operation_cancel_button_label(self, operation_cancel_button_label): + """Sets the operation_cancel_button_label of this FieldMetadataProperties. + + + :param operation_cancel_button_label: The operation_cancel_button_label of this FieldMetadataProperties. # noqa: E501 + :type operation_cancel_button_label: str + """ + + self._operation_cancel_button_label = operation_cancel_button_label + + @property + def operation_discard_link_label(self): + """Gets the operation_discard_link_label of this FieldMetadataProperties. # noqa: E501 + + + :return: The operation_discard_link_label of this FieldMetadataProperties. # noqa: E501 + :rtype: str + """ + return self._operation_discard_link_label + + @operation_discard_link_label.setter + def operation_discard_link_label(self, operation_discard_link_label): + """Sets the operation_discard_link_label of this FieldMetadataProperties. + + + :param operation_discard_link_label: The operation_discard_link_label of this FieldMetadataProperties. # noqa: E501 + :type operation_discard_link_label: str + """ + + self._operation_discard_link_label = operation_discard_link_label + + @property + def rows_number(self): + """Gets the rows_number of this FieldMetadataProperties. # noqa: E501 + + + :return: The rows_number of this FieldMetadataProperties. # noqa: E501 + :rtype: int + """ + return self._rows_number + + @rows_number.setter + def rows_number(self, rows_number): + """Sets the rows_number of this FieldMetadataProperties. + + + :param rows_number: The rows_number of this FieldMetadataProperties. # noqa: E501 + :type rows_number: int + """ + + self._rows_number = rows_number + + @property + def prevent_line_break(self): + """Gets the prevent_line_break of this FieldMetadataProperties. # noqa: E501 + + + :return: The prevent_line_break of this FieldMetadataProperties. # noqa: E501 + :rtype: bool + """ + return self._prevent_line_break + + @prevent_line_break.setter + def prevent_line_break(self, prevent_line_break): + """Sets the prevent_line_break of this FieldMetadataProperties. + + + :param prevent_line_break: The prevent_line_break of this FieldMetadataProperties. # noqa: E501 + :type prevent_line_break: bool + """ + + self._prevent_line_break = prevent_line_break + + @property + def prevent_resize(self): + """Gets the prevent_resize of this FieldMetadataProperties. # noqa: E501 + + + :return: The prevent_resize of this FieldMetadataProperties. # noqa: E501 + :rtype: bool + """ + return self._prevent_resize + + @prevent_resize.setter + def prevent_resize(self, prevent_resize): + """Sets the prevent_resize of this FieldMetadataProperties. + + + :param prevent_resize: The prevent_resize of this FieldMetadataProperties. # noqa: E501 + :type prevent_resize: bool + """ + + self._prevent_resize = prevent_resize + + @property + def allow_exceed_length(self): + """Gets the allow_exceed_length of this FieldMetadataProperties. # noqa: E501 + + + :return: The allow_exceed_length of this FieldMetadataProperties. # noqa: E501 + :rtype: bool + """ + return self._allow_exceed_length + + @allow_exceed_length.setter + def allow_exceed_length(self, allow_exceed_length): + """Sets the allow_exceed_length of this FieldMetadataProperties. + + + :param allow_exceed_length: The allow_exceed_length of this FieldMetadataProperties. # noqa: E501 + :type allow_exceed_length: bool + """ + + self._allow_exceed_length = allow_exceed_length + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FieldMetadataProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/field_value.py b/src/clients/ctm_api_client/models/field_value.py index 28e0659..9588023 100644 --- a/src/clients/ctm_api_client/models/field_value.py +++ b/src/clients/ctm_api_client/models/field_value.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FieldValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value": "str", "description": "str"} - - attribute_map = {"value": "value", "description": "description"} - - def __init__(self, value=None, description=None, _configuration=None): # noqa: E501 - """FieldValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'value': 'str', + 'description': 'str' + } + + attribute_map = { + 'value': 'value', + 'description': 'description' + } + + def __init__(self, value=None, description=None, local_vars_configuration=None): # noqa: E501 + """FieldValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value = None self._description = None @@ -66,12 +76,10 @@ def value(self, value): :param value: The value of this FieldValue. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value @@ -91,37 +99,40 @@ def description(self, description): :param description: The description of this FieldValue. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FieldValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/field_values.py b/src/clients/ctm_api_client/models/field_values.py index 6d411a3..327f34f 100644 --- a/src/clients/ctm_api_client/models/field_values.py +++ b/src/clients/ctm_api_client/models/field_values.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FieldValues(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"values": "Values"} + openapi_types = { + 'values': 'list[FieldValue]' + } - attribute_map = {"values": "values"} + attribute_map = { + 'values': 'values' + } - def __init__(self, values=None, _configuration=None): # noqa: E501 - """FieldValues - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, values=None, local_vars_configuration=None): # noqa: E501 + """FieldValues - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._values = None self.discriminator = None @@ -51,10 +59,9 @@ def __init__(self, values=None, _configuration=None): # noqa: E501 def values(self): """Gets the values of this FieldValues. # noqa: E501 - HIDDEN. # noqa: E501 :return: The values of this FieldValues. # noqa: E501 - :rtype: Values + :rtype: list[FieldValue] """ return self._values @@ -62,44 +69,44 @@ def values(self): def values(self, values): """Sets the values of this FieldValues. - HIDDEN. # noqa: E501 :param values: The values of this FieldValues. # noqa: E501 - :type: Values + :type values: list[FieldValue] """ - if self._configuration.client_side_validation and values is None: - raise ValueError( - "Invalid value for `values`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and values is None: # noqa: E501 + raise ValueError("Invalid value for `values`, must not be `None`") # noqa: E501 self._values = values - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FieldValues, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/folder_auth.py b/src/clients/ctm_api_client/models/folder_auth.py index e829023..7aa343e 100644 --- a/src/clients/ctm_api_client/models/folder_auth.py +++ b/src/clients/ctm_api_client/models/folder_auth.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FolderAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "privilege": "str", - "controlm_server": "str", - "library": "str", - "folder": "str", - "order": "bool", - "run": "bool", - "jobs": "JobLevelAuth", + openapi_types = { + 'privilege': 'str', + 'controlm_server': 'str', + 'library': 'str', + 'folder': 'str', + 'order': 'bool', + 'run': 'bool', + 'jobs': 'JobLevelAuth' } attribute_map = { - "privilege": "Privilege", - "controlm_server": "ControlmServer", - "library": "Library", - "folder": "Folder", - "order": "Order", - "run": "Run", - "jobs": "Jobs", + 'privilege': 'Privilege', + 'controlm_server': 'ControlmServer', + 'library': 'Library', + 'folder': 'Folder', + 'order': 'Order', + 'run': 'Run', + 'jobs': 'Jobs' } - def __init__( - self, - privilege=None, - controlm_server=None, - library=None, - folder=None, - order=None, - run=None, - jobs=None, - _configuration=None, - ): # noqa: E501 - """FolderAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, privilege=None, controlm_server=None, library=None, folder=None, order=None, run=None, jobs=None, local_vars_configuration=None): # noqa: E501 + """FolderAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._privilege = None self._controlm_server = None @@ -110,7 +104,7 @@ def privilege(self, privilege): access level (Full, Update, Browse) # noqa: E501 :param privilege: The privilege of this FolderAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege @@ -133,7 +127,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this FolderAuth. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -156,7 +150,7 @@ def library(self, library): job application # noqa: E501 :param library: The library of this FolderAuth. # noqa: E501 - :type: str + :type library: str """ self._library = library @@ -179,7 +173,7 @@ def folder(self, folder): job sub application # noqa: E501 :param folder: The folder of this FolderAuth. # noqa: E501 - :type: str + :type folder: str """ self._folder = folder @@ -202,7 +196,7 @@ def order(self, order): Allow ordering # noqa: E501 :param order: The order of this FolderAuth. # noqa: E501 - :type: bool + :type order: bool """ self._order = order @@ -225,7 +219,7 @@ def run(self, run): Allow ordering # noqa: E501 :param run: The run of this FolderAuth. # noqa: E501 - :type: bool + :type run: bool """ self._run = run @@ -234,7 +228,6 @@ def run(self, run): def jobs(self): """Gets the jobs of this FolderAuth. # noqa: E501 - HIDDEN # noqa: E501 :return: The jobs of this FolderAuth. # noqa: E501 :rtype: JobLevelAuth @@ -245,40 +238,42 @@ def jobs(self): def jobs(self, jobs): """Sets the jobs of this FolderAuth. - HIDDEN # noqa: E501 :param jobs: The jobs of this FolderAuth. # noqa: E501 - :type: JobLevelAuth + :type jobs: JobLevelAuth """ self._jobs = jobs - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FolderAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/folder_properties.py b/src/clients/ctm_api_client/models/folder_properties.py index 08327b2..23dac9b 100644 --- a/src/clients/ctm_api_client/models/folder_properties.py +++ b/src/clients/ctm_api_client/models/folder_properties.py @@ -5,80 +5,80 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FolderProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "allowed_internal_user_names": "list[str]", - "allowed_user_names": "list[str]", - "allowed_group_names": "list[str]", - "delete_files_after_processing": "bool", - "notify_by_email_when_file_arrived": "bool", - "retention_hours": "int", - "size_limit": "int", - "allowed_file_pattern": "str", - "exclude_file_pattern": "str", - "access_type": "str", + openapi_types = { + 'name': 'str', + 'allowed_internal_user_names': 'list[str]', + 'allowed_user_names': 'list[str]', + 'allowed_group_names': 'list[str]', + 'delete_files_after_processing': 'bool', + 'notify_by_email_when_file_arrived': 'bool', + 'retention_hours': 'int', + 'size_limit': 'int', + 'allowed_file_pattern': 'str', + 'exclude_file_pattern': 'str', + 'access_type': 'str', + 'access_level': 'str', + 'delete_files_after_download_by_external_users': 'bool', + 'fixed_sub_folders': 'list[FixedSubFolder]', + 'allowed_user_names_extended': 'list[UserOrGroupExtended]', + 'allowed_group_names_extended': 'list[UserOrGroupExtended]' } attribute_map = { - "name": "name", - "allowed_internal_user_names": "allowedInternalUserNames", - "allowed_user_names": "allowedUserNames", - "allowed_group_names": "allowedGroupNames", - "delete_files_after_processing": "deleteFilesAfterProcessing", - "notify_by_email_when_file_arrived": "notifyByEmailWhenFileArrived", - "retention_hours": "retentionHours", - "size_limit": "sizeLimit", - "allowed_file_pattern": "allowedFilePattern", - "exclude_file_pattern": "excludeFilePattern", - "access_type": "accessType", + 'name': 'name', + 'allowed_internal_user_names': 'allowedInternalUserNames', + 'allowed_user_names': 'allowedUserNames', + 'allowed_group_names': 'allowedGroupNames', + 'delete_files_after_processing': 'deleteFilesAfterProcessing', + 'notify_by_email_when_file_arrived': 'notifyByEmailWhenFileArrived', + 'retention_hours': 'retentionHours', + 'size_limit': 'sizeLimit', + 'allowed_file_pattern': 'allowedFilePattern', + 'exclude_file_pattern': 'excludeFilePattern', + 'access_type': 'accessType', + 'access_level': 'accessLevel', + 'delete_files_after_download_by_external_users': 'deleteFilesAfterDownloadByExternalUsers', + 'fixed_sub_folders': 'fixedSubFolders', + 'allowed_user_names_extended': 'allowedUserNamesExtended', + 'allowed_group_names_extended': 'allowedGroupNamesExtended' } - def __init__( - self, - name=None, - allowed_internal_user_names=None, - allowed_user_names=None, - allowed_group_names=None, - delete_files_after_processing=None, - notify_by_email_when_file_arrived=None, - retention_hours=None, - size_limit=None, - allowed_file_pattern=None, - exclude_file_pattern=None, - access_type=None, - _configuration=None, - ): # noqa: E501 - """FolderProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, allowed_internal_user_names=None, allowed_user_names=None, allowed_group_names=None, delete_files_after_processing=None, notify_by_email_when_file_arrived=None, retention_hours=None, size_limit=None, allowed_file_pattern=None, exclude_file_pattern=None, access_type=None, access_level=None, delete_files_after_download_by_external_users=None, fixed_sub_folders=None, allowed_user_names_extended=None, allowed_group_names_extended=None, local_vars_configuration=None): # noqa: E501 + """FolderProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._allowed_internal_user_names = None @@ -91,6 +91,11 @@ def __init__( self._allowed_file_pattern = None self._exclude_file_pattern = None self._access_type = None + self._access_level = None + self._delete_files_after_download_by_external_users = None + self._fixed_sub_folders = None + self._allowed_user_names_extended = None + self._allowed_group_names_extended = None self.discriminator = None if name is not None: @@ -115,12 +120,22 @@ def __init__( self.exclude_file_pattern = exclude_file_pattern if access_type is not None: self.access_type = access_type + if access_level is not None: + self.access_level = access_level + if delete_files_after_download_by_external_users is not None: + self.delete_files_after_download_by_external_users = delete_files_after_download_by_external_users + if fixed_sub_folders is not None: + self.fixed_sub_folders = fixed_sub_folders + if allowed_user_names_extended is not None: + self.allowed_user_names_extended = allowed_user_names_extended + if allowed_group_names_extended is not None: + self.allowed_group_names_extended = allowed_group_names_extended @property def name(self): """Gets the name of this FolderProperties. # noqa: E501 - The name of the folder. REQUIRED:addMFTFolder | HIDDEN # noqa: E501 + The name of the folder. REQUIRED:addMFTFolder,addMFTFolderForSite | HIDDEN # noqa: E501 :return: The name of this FolderProperties. # noqa: E501 :rtype: str @@ -131,10 +146,10 @@ def name(self): def name(self, name): """Sets the name of this FolderProperties. - The name of the folder. REQUIRED:addMFTFolder | HIDDEN # noqa: E501 + The name of the folder. REQUIRED:addMFTFolder,addMFTFolderForSite | HIDDEN # noqa: E501 :param name: The name of this FolderProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -157,7 +172,7 @@ def allowed_internal_user_names(self, allowed_internal_user_names): Authorized Internal Users. HIDDEN # noqa: E501 :param allowed_internal_user_names: The allowed_internal_user_names of this FolderProperties. # noqa: E501 - :type: list[str] + :type allowed_internal_user_names: list[str] """ self._allowed_internal_user_names = allowed_internal_user_names @@ -180,7 +195,7 @@ def allowed_user_names(self, allowed_user_names): Authorized External Users And User Groups. HIDDEN # noqa: E501 :param allowed_user_names: The allowed_user_names of this FolderProperties. # noqa: E501 - :type: list[str] + :type allowed_user_names: list[str] """ self._allowed_user_names = allowed_user_names @@ -203,7 +218,7 @@ def allowed_group_names(self, allowed_group_names): Array of allowed group names. HIDDEN # noqa: E501 :param allowed_group_names: The allowed_group_names of this FolderProperties. # noqa: E501 - :type: list[str] + :type allowed_group_names: list[str] """ self._allowed_group_names = allowed_group_names @@ -226,7 +241,7 @@ def delete_files_after_processing(self, delete_files_after_processing): Delete file after downloaded from incoming folder. HIDDEN # noqa: E501 :param delete_files_after_processing: The delete_files_after_processing of this FolderProperties. # noqa: E501 - :type: bool + :type delete_files_after_processing: bool """ self._delete_files_after_processing = delete_files_after_processing @@ -249,7 +264,7 @@ def notify_by_email_when_file_arrived(self, notify_by_email_when_file_arrived): Send email notification to external users when a new file arrives. HIDDEN # noqa: E501 :param notify_by_email_when_file_arrived: The notify_by_email_when_file_arrived of this FolderProperties. # noqa: E501 - :type: bool + :type notify_by_email_when_file_arrived: bool """ self._notify_by_email_when_file_arrived = notify_by_email_when_file_arrived @@ -272,7 +287,7 @@ def retention_hours(self, retention_hours): Retention Time in hours. HIDDEN # noqa: E501 :param retention_hours: The retention_hours of this FolderProperties. # noqa: E501 - :type: int + :type retention_hours: int """ self._retention_hours = retention_hours @@ -295,7 +310,7 @@ def size_limit(self, size_limit): Size limit for folder (in Gigabyte). HIDDEN # noqa: E501 :param size_limit: The size_limit of this FolderProperties. # noqa: E501 - :type: int + :type size_limit: int """ self._size_limit = size_limit @@ -318,7 +333,7 @@ def allowed_file_pattern(self, allowed_file_pattern): allowed file pattern wildcard. HIDDEN # noqa: E501 :param allowed_file_pattern: The allowed_file_pattern of this FolderProperties. # noqa: E501 - :type: str + :type allowed_file_pattern: str """ self._allowed_file_pattern = allowed_file_pattern @@ -341,7 +356,7 @@ def exclude_file_pattern(self, exclude_file_pattern): blocked file pattern wildcard. HIDDEN # noqa: E501 :param exclude_file_pattern: The exclude_file_pattern of this FolderProperties. # noqa: E501 - :type: str + :type exclude_file_pattern: str """ self._exclude_file_pattern = exclude_file_pattern @@ -364,37 +379,149 @@ def access_type(self, access_type): Folder's access type (Limited, Unlimited). HIDDEN # noqa: E501 :param access_type: The access_type of this FolderProperties. # noqa: E501 - :type: str + :type access_type: str """ self._access_type = access_type - def to_dict(self): + @property + def access_level(self): + """Gets the access_level of this FolderProperties. # noqa: E501 + + Access level of virtual folder - Read only, Write only, Full control # noqa: E501 + + :return: The access_level of this FolderProperties. # noqa: E501 + :rtype: str + """ + return self._access_level + + @access_level.setter + def access_level(self, access_level): + """Sets the access_level of this FolderProperties. + + Access level of virtual folder - Read only, Write only, Full control # noqa: E501 + + :param access_level: The access_level of this FolderProperties. # noqa: E501 + :type access_level: str + """ + + self._access_level = access_level + + @property + def delete_files_after_download_by_external_users(self): + """Gets the delete_files_after_download_by_external_users of this FolderProperties. # noqa: E501 + + Delete file after downloaded by external users. HIDDEN # noqa: E501 + + :return: The delete_files_after_download_by_external_users of this FolderProperties. # noqa: E501 + :rtype: bool + """ + return self._delete_files_after_download_by_external_users + + @delete_files_after_download_by_external_users.setter + def delete_files_after_download_by_external_users(self, delete_files_after_download_by_external_users): + """Sets the delete_files_after_download_by_external_users of this FolderProperties. + + Delete file after downloaded by external users. HIDDEN # noqa: E501 + + :param delete_files_after_download_by_external_users: The delete_files_after_download_by_external_users of this FolderProperties. # noqa: E501 + :type delete_files_after_download_by_external_users: bool + """ + + self._delete_files_after_download_by_external_users = delete_files_after_download_by_external_users + + @property + def fixed_sub_folders(self): + """Gets the fixed_sub_folders of this FolderProperties. # noqa: E501 + + + :return: The fixed_sub_folders of this FolderProperties. # noqa: E501 + :rtype: list[FixedSubFolder] + """ + return self._fixed_sub_folders + + @fixed_sub_folders.setter + def fixed_sub_folders(self, fixed_sub_folders): + """Sets the fixed_sub_folders of this FolderProperties. + + + :param fixed_sub_folders: The fixed_sub_folders of this FolderProperties. # noqa: E501 + :type fixed_sub_folders: list[FixedSubFolder] + """ + + self._fixed_sub_folders = fixed_sub_folders + + @property + def allowed_user_names_extended(self): + """Gets the allowed_user_names_extended of this FolderProperties. # noqa: E501 + + + :return: The allowed_user_names_extended of this FolderProperties. # noqa: E501 + :rtype: list[UserOrGroupExtended] + """ + return self._allowed_user_names_extended + + @allowed_user_names_extended.setter + def allowed_user_names_extended(self, allowed_user_names_extended): + """Sets the allowed_user_names_extended of this FolderProperties. + + + :param allowed_user_names_extended: The allowed_user_names_extended of this FolderProperties. # noqa: E501 + :type allowed_user_names_extended: list[UserOrGroupExtended] + """ + + self._allowed_user_names_extended = allowed_user_names_extended + + @property + def allowed_group_names_extended(self): + """Gets the allowed_group_names_extended of this FolderProperties. # noqa: E501 + + + :return: The allowed_group_names_extended of this FolderProperties. # noqa: E501 + :rtype: list[UserOrGroupExtended] + """ + return self._allowed_group_names_extended + + @allowed_group_names_extended.setter + def allowed_group_names_extended(self, allowed_group_names_extended): + """Sets the allowed_group_names_extended of this FolderProperties. + + + :param allowed_group_names_extended: The allowed_group_names_extended of this FolderProperties. # noqa: E501 + :type allowed_group_names_extended: list[UserOrGroupExtended] + """ + + self._allowed_group_names_extended = allowed_group_names_extended + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FolderProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/folder_properties_data.py b/src/clients/ctm_api_client/models/folder_properties_data.py index b99109c..da36ba6 100644 --- a/src/clients/ctm_api_client/models/folder_properties_data.py +++ b/src/clients/ctm_api_client/models/folder_properties_data.py @@ -5,77 +5,78 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FolderPropertiesData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "authorized_internal_users": "list[str]", - "authorized_external_users_and_groups": "list[str]", - "delete_files_after_download": "bool", - "notify_by_email_when_file_arrive": "bool", - "retention_policy": "int", - "size_limit": "int", - "allowed_file_pattern": "str", - "blocked_file_pattern": "str", - "access_type": "str", + openapi_types = { + 'name': 'str', + 'authorized_internal_users': 'list[str]', + 'authorized_external_users_and_groups': 'list[str]', + 'delete_files_after_download': 'bool', + 'notify_by_email_when_file_arrive': 'bool', + 'retention_policy': 'int', + 'retention_policy_units': 'str', + 'size_limit': 'int', + 'allowed_file_pattern': 'str', + 'blocked_file_pattern': 'str', + 'access_type': 'str', + 'access_level': 'str', + 'delete_files_after_download_by_external_users': 'bool', + 'fixed_sub_folders': 'list[FixedSubFolder]', + 'authorized_external_users_and_groups_extended': 'list[UserOrGroupExtended]' } attribute_map = { - "name": "name", - "authorized_internal_users": "authorizedInternalUsers", - "authorized_external_users_and_groups": "authorizedExternalUsersAndGroups", - "delete_files_after_download": "deleteFilesAfterDownload", - "notify_by_email_when_file_arrive": "notifyByEmailWhenFileArrive", - "retention_policy": "retentionPolicy", - "size_limit": "sizeLimit", - "allowed_file_pattern": "allowedFilePattern", - "blocked_file_pattern": "blockedFilePattern", - "access_type": "accessType", + 'name': 'name', + 'authorized_internal_users': 'authorizedInternalUsers', + 'authorized_external_users_and_groups': 'authorizedExternalUsersAndGroups', + 'delete_files_after_download': 'deleteFilesAfterDownload', + 'notify_by_email_when_file_arrive': 'notifyByEmailWhenFileArrive', + 'retention_policy': 'retentionPolicy', + 'retention_policy_units': 'retentionPolicyUnits', + 'size_limit': 'sizeLimit', + 'allowed_file_pattern': 'allowedFilePattern', + 'blocked_file_pattern': 'blockedFilePattern', + 'access_type': 'accessType', + 'access_level': 'accessLevel', + 'delete_files_after_download_by_external_users': 'deleteFilesAfterDownloadByExternalUsers', + 'fixed_sub_folders': 'fixedSubFolders', + 'authorized_external_users_and_groups_extended': 'authorizedExternalUsersAndGroupsExtended' } - def __init__( - self, - name=None, - authorized_internal_users=None, - authorized_external_users_and_groups=None, - delete_files_after_download=None, - notify_by_email_when_file_arrive=None, - retention_policy=None, - size_limit=None, - allowed_file_pattern=None, - blocked_file_pattern=None, - access_type=None, - _configuration=None, - ): # noqa: E501 - """FolderPropertiesData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, authorized_internal_users=None, authorized_external_users_and_groups=None, delete_files_after_download=None, notify_by_email_when_file_arrive=None, retention_policy=None, retention_policy_units='Hours', size_limit=None, allowed_file_pattern=None, blocked_file_pattern=None, access_type=None, access_level=None, delete_files_after_download_by_external_users=None, fixed_sub_folders=None, authorized_external_users_and_groups_extended=None, local_vars_configuration=None): # noqa: E501 + """FolderPropertiesData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._authorized_internal_users = None @@ -83,10 +84,15 @@ def __init__( self._delete_files_after_download = None self._notify_by_email_when_file_arrive = None self._retention_policy = None + self._retention_policy_units = None self._size_limit = None self._allowed_file_pattern = None self._blocked_file_pattern = None self._access_type = None + self._access_level = None + self._delete_files_after_download_by_external_users = None + self._fixed_sub_folders = None + self._authorized_external_users_and_groups_extended = None self.discriminator = None if name is not None: @@ -94,15 +100,15 @@ def __init__( if authorized_internal_users is not None: self.authorized_internal_users = authorized_internal_users if authorized_external_users_and_groups is not None: - self.authorized_external_users_and_groups = ( - authorized_external_users_and_groups - ) + self.authorized_external_users_and_groups = authorized_external_users_and_groups if delete_files_after_download is not None: self.delete_files_after_download = delete_files_after_download if notify_by_email_when_file_arrive is not None: self.notify_by_email_when_file_arrive = notify_by_email_when_file_arrive if retention_policy is not None: self.retention_policy = retention_policy + if retention_policy_units is not None: + self.retention_policy_units = retention_policy_units if size_limit is not None: self.size_limit = size_limit if allowed_file_pattern is not None: @@ -111,12 +117,20 @@ def __init__( self.blocked_file_pattern = blocked_file_pattern if access_type is not None: self.access_type = access_type + if access_level is not None: + self.access_level = access_level + if delete_files_after_download_by_external_users is not None: + self.delete_files_after_download_by_external_users = delete_files_after_download_by_external_users + if fixed_sub_folders is not None: + self.fixed_sub_folders = fixed_sub_folders + if authorized_external_users_and_groups_extended is not None: + self.authorized_external_users_and_groups_extended = authorized_external_users_and_groups_extended @property def name(self): """Gets the name of this FolderPropertiesData. # noqa: E501 - The name of the folder. REQUIRED:addMFTFolder | HIDDEN # noqa: E501 + The name of the folder. REQUIRED:addMFTFolder,addMFTFolderForSite | HIDDEN # noqa: E501 :return: The name of this FolderPropertiesData. # noqa: E501 :rtype: str @@ -127,10 +141,10 @@ def name(self): def name(self, name): """Sets the name of this FolderPropertiesData. - The name of the folder. REQUIRED:addMFTFolder | HIDDEN # noqa: E501 + The name of the folder. REQUIRED:addMFTFolder,addMFTFolderForSite | HIDDEN # noqa: E501 :param name: The name of this FolderPropertiesData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -153,7 +167,7 @@ def authorized_internal_users(self, authorized_internal_users): Authorized Internal Users. HIDDEN # noqa: E501 :param authorized_internal_users: The authorized_internal_users of this FolderPropertiesData. # noqa: E501 - :type: list[str] + :type authorized_internal_users: list[str] """ self._authorized_internal_users = authorized_internal_users @@ -170,20 +184,16 @@ def authorized_external_users_and_groups(self): return self._authorized_external_users_and_groups @authorized_external_users_and_groups.setter - def authorized_external_users_and_groups( - self, authorized_external_users_and_groups - ): + def authorized_external_users_and_groups(self, authorized_external_users_and_groups): """Sets the authorized_external_users_and_groups of this FolderPropertiesData. Authorized External Users And User Groups. HIDDEN # noqa: E501 :param authorized_external_users_and_groups: The authorized_external_users_and_groups of this FolderPropertiesData. # noqa: E501 - :type: list[str] + :type authorized_external_users_and_groups: list[str] """ - self._authorized_external_users_and_groups = ( - authorized_external_users_and_groups - ) + self._authorized_external_users_and_groups = authorized_external_users_and_groups @property def delete_files_after_download(self): @@ -203,7 +213,7 @@ def delete_files_after_download(self, delete_files_after_download): Delete file after downloaded from incoming folder. HIDDEN # noqa: E501 :param delete_files_after_download: The delete_files_after_download of this FolderPropertiesData. # noqa: E501 - :type: bool + :type delete_files_after_download: bool """ self._delete_files_after_download = delete_files_after_download @@ -226,7 +236,7 @@ def notify_by_email_when_file_arrive(self, notify_by_email_when_file_arrive): Send email notification to external users when a new file arrives. HIDDEN # noqa: E501 :param notify_by_email_when_file_arrive: The notify_by_email_when_file_arrive of this FolderPropertiesData. # noqa: E501 - :type: bool + :type notify_by_email_when_file_arrive: bool """ self._notify_by_email_when_file_arrive = notify_by_email_when_file_arrive @@ -235,7 +245,7 @@ def notify_by_email_when_file_arrive(self, notify_by_email_when_file_arrive): def retention_policy(self): """Gets the retention_policy of this FolderPropertiesData. # noqa: E501 - Retention Time in hours. HIDDEN # noqa: E501 + Retention policy. HIDDEN # noqa: E501 :return: The retention_policy of this FolderPropertiesData. # noqa: E501 :rtype: int @@ -246,14 +256,37 @@ def retention_policy(self): def retention_policy(self, retention_policy): """Sets the retention_policy of this FolderPropertiesData. - Retention Time in hours. HIDDEN # noqa: E501 + Retention policy. HIDDEN # noqa: E501 :param retention_policy: The retention_policy of this FolderPropertiesData. # noqa: E501 - :type: int + :type retention_policy: int """ self._retention_policy = retention_policy + @property + def retention_policy_units(self): + """Gets the retention_policy_units of this FolderPropertiesData. # noqa: E501 + + Retention policy units(Hours/Days). HIDDEN # noqa: E501 + + :return: The retention_policy_units of this FolderPropertiesData. # noqa: E501 + :rtype: str + """ + return self._retention_policy_units + + @retention_policy_units.setter + def retention_policy_units(self, retention_policy_units): + """Sets the retention_policy_units of this FolderPropertiesData. + + Retention policy units(Hours/Days). HIDDEN # noqa: E501 + + :param retention_policy_units: The retention_policy_units of this FolderPropertiesData. # noqa: E501 + :type retention_policy_units: str + """ + + self._retention_policy_units = retention_policy_units + @property def size_limit(self): """Gets the size_limit of this FolderPropertiesData. # noqa: E501 @@ -272,7 +305,7 @@ def size_limit(self, size_limit): Size limit for folder (in Gigabyte). HIDDEN # noqa: E501 :param size_limit: The size_limit of this FolderPropertiesData. # noqa: E501 - :type: int + :type size_limit: int """ self._size_limit = size_limit @@ -295,7 +328,7 @@ def allowed_file_pattern(self, allowed_file_pattern): allowed file pattern wildcard. HIDDEN # noqa: E501 :param allowed_file_pattern: The allowed_file_pattern of this FolderPropertiesData. # noqa: E501 - :type: str + :type allowed_file_pattern: str """ self._allowed_file_pattern = allowed_file_pattern @@ -318,7 +351,7 @@ def blocked_file_pattern(self, blocked_file_pattern): blocked file pattern wildcard. HIDDEN # noqa: E501 :param blocked_file_pattern: The blocked_file_pattern of this FolderPropertiesData. # noqa: E501 - :type: str + :type blocked_file_pattern: str """ self._blocked_file_pattern = blocked_file_pattern @@ -341,37 +374,128 @@ def access_type(self, access_type): Folder's access type (Limited, Unlimited). HIDDEN # noqa: E501 :param access_type: The access_type of this FolderPropertiesData. # noqa: E501 - :type: str + :type access_type: str """ self._access_type = access_type - def to_dict(self): + @property + def access_level(self): + """Gets the access_level of this FolderPropertiesData. # noqa: E501 + + Access level of virtual folder - Read only, Write only, Full control # noqa: E501 + + :return: The access_level of this FolderPropertiesData. # noqa: E501 + :rtype: str + """ + return self._access_level + + @access_level.setter + def access_level(self, access_level): + """Sets the access_level of this FolderPropertiesData. + + Access level of virtual folder - Read only, Write only, Full control # noqa: E501 + + :param access_level: The access_level of this FolderPropertiesData. # noqa: E501 + :type access_level: str + """ + + self._access_level = access_level + + @property + def delete_files_after_download_by_external_users(self): + """Gets the delete_files_after_download_by_external_users of this FolderPropertiesData. # noqa: E501 + + Delete file after downloaded by external users. HIDDEN # noqa: E501 + + :return: The delete_files_after_download_by_external_users of this FolderPropertiesData. # noqa: E501 + :rtype: bool + """ + return self._delete_files_after_download_by_external_users + + @delete_files_after_download_by_external_users.setter + def delete_files_after_download_by_external_users(self, delete_files_after_download_by_external_users): + """Sets the delete_files_after_download_by_external_users of this FolderPropertiesData. + + Delete file after downloaded by external users. HIDDEN # noqa: E501 + + :param delete_files_after_download_by_external_users: The delete_files_after_download_by_external_users of this FolderPropertiesData. # noqa: E501 + :type delete_files_after_download_by_external_users: bool + """ + + self._delete_files_after_download_by_external_users = delete_files_after_download_by_external_users + + @property + def fixed_sub_folders(self): + """Gets the fixed_sub_folders of this FolderPropertiesData. # noqa: E501 + + + :return: The fixed_sub_folders of this FolderPropertiesData. # noqa: E501 + :rtype: list[FixedSubFolder] + """ + return self._fixed_sub_folders + + @fixed_sub_folders.setter + def fixed_sub_folders(self, fixed_sub_folders): + """Sets the fixed_sub_folders of this FolderPropertiesData. + + + :param fixed_sub_folders: The fixed_sub_folders of this FolderPropertiesData. # noqa: E501 + :type fixed_sub_folders: list[FixedSubFolder] + """ + + self._fixed_sub_folders = fixed_sub_folders + + @property + def authorized_external_users_and_groups_extended(self): + """Gets the authorized_external_users_and_groups_extended of this FolderPropertiesData. # noqa: E501 + + + :return: The authorized_external_users_and_groups_extended of this FolderPropertiesData. # noqa: E501 + :rtype: list[UserOrGroupExtended] + """ + return self._authorized_external_users_and_groups_extended + + @authorized_external_users_and_groups_extended.setter + def authorized_external_users_and_groups_extended(self, authorized_external_users_and_groups_extended): + """Sets the authorized_external_users_and_groups_extended of this FolderPropertiesData. + + + :param authorized_external_users_and_groups_extended: The authorized_external_users_and_groups_extended of this FolderPropertiesData. # noqa: E501 + :type authorized_external_users_and_groups_extended: list[UserOrGroupExtended] + """ + + self._authorized_external_users_and_groups_extended = authorized_external_users_and_groups_extended + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FolderPropertiesData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties.py b/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties.py index 386b164..08dc33b 100644 --- a/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties.py +++ b/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FoldersUsersSettingsAndMetadataProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "folders": "list[FolderPropertiesData]", - "settings": "list[SettingProperties]", - "settings_metadata": "SettingsMetadataProperties", - "users": "list[UserAllowedFoldersProperties]", - "groups": "list[GroupsAllowedFoldersProperties]", + openapi_types = { + 'folders': 'list[FolderPropertiesData]', + 'settings': 'list[SettingProperties]', + 'settings_metadata': 'SettingsMetadataProperties', + 'users': 'list[UserAllowedFoldersProperties]', + 'groups': 'list[GroupsAllowedFoldersProperties]' } attribute_map = { - "folders": "folders", - "settings": "settings", - "settings_metadata": "settingsMetadata", - "users": "users", - "groups": "groups", + 'folders': 'folders', + 'settings': 'settings', + 'settings_metadata': 'settingsMetadata', + 'users': 'users', + 'groups': 'groups' } - def __init__( - self, - folders=None, - settings=None, - settings_metadata=None, - users=None, - groups=None, - _configuration=None, - ): # noqa: E501 - """FoldersUsersSettingsAndMetadataProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, folders=None, settings=None, settings_metadata=None, users=None, groups=None, local_vars_configuration=None): # noqa: E501 + """FoldersUsersSettingsAndMetadataProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._folders = None self._settings = None @@ -96,7 +92,7 @@ def folders(self, folders): :param folders: The folders of this FoldersUsersSettingsAndMetadataProperties. # noqa: E501 - :type: list[FolderPropertiesData] + :type folders: list[FolderPropertiesData] """ self._folders = folders @@ -117,7 +113,7 @@ def settings(self, settings): :param settings: The settings of this FoldersUsersSettingsAndMetadataProperties. # noqa: E501 - :type: list[SettingProperties] + :type settings: list[SettingProperties] """ self._settings = settings @@ -138,7 +134,7 @@ def settings_metadata(self, settings_metadata): :param settings_metadata: The settings_metadata of this FoldersUsersSettingsAndMetadataProperties. # noqa: E501 - :type: SettingsMetadataProperties + :type settings_metadata: SettingsMetadataProperties """ self._settings_metadata = settings_metadata @@ -159,7 +155,7 @@ def users(self, users): :param users: The users of this FoldersUsersSettingsAndMetadataProperties. # noqa: E501 - :type: list[UserAllowedFoldersProperties] + :type users: list[UserAllowedFoldersProperties] """ self._users = users @@ -180,37 +176,40 @@ def groups(self, groups): :param groups: The groups of this FoldersUsersSettingsAndMetadataProperties. # noqa: E501 - :type: list[GroupsAllowedFoldersProperties] + :type groups: list[GroupsAllowedFoldersProperties] """ self._groups = groups - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FoldersUsersSettingsAndMetadataProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties_from_b2_b.py b/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties_from_b2_b.py index 4a2a916..0c3c387 100644 --- a/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties_from_b2_b.py +++ b/src/clients/ctm_api_client/models/folders_users_settings_and_metadata_properties_from_b2_b.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FoldersUsersSettingsAndMetadataPropertiesFromB2B(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "folders": "list[FolderProperties]", - "settings": "list[SettingProperties]", - "settings_metadata": "SettingsMetadataProperties", - "users": "list[UserAllowedFoldersProperties]", - "groups": "list[GroupsAllowedFoldersProperties]", + openapi_types = { + 'folders': 'list[FolderProperties]', + 'settings': 'list[SettingProperties]', + 'settings_metadata': 'SettingsMetadataProperties', + 'users': 'list[UserAllowedFoldersProperties]', + 'groups': 'list[GroupsAllowedFoldersProperties]' } attribute_map = { - "folders": "folders", - "settings": "settings", - "settings_metadata": "settingsMetadata", - "users": "users", - "groups": "groups", + 'folders': 'folders', + 'settings': 'settings', + 'settings_metadata': 'settingsMetadata', + 'users': 'users', + 'groups': 'groups' } - def __init__( - self, - folders=None, - settings=None, - settings_metadata=None, - users=None, - groups=None, - _configuration=None, - ): # noqa: E501 - """FoldersUsersSettingsAndMetadataPropertiesFromB2B - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, folders=None, settings=None, settings_metadata=None, users=None, groups=None, local_vars_configuration=None): # noqa: E501 + """FoldersUsersSettingsAndMetadataPropertiesFromB2B - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._folders = None self._settings = None @@ -96,7 +92,7 @@ def folders(self, folders): :param folders: The folders of this FoldersUsersSettingsAndMetadataPropertiesFromB2B. # noqa: E501 - :type: list[FolderProperties] + :type folders: list[FolderProperties] """ self._folders = folders @@ -117,7 +113,7 @@ def settings(self, settings): :param settings: The settings of this FoldersUsersSettingsAndMetadataPropertiesFromB2B. # noqa: E501 - :type: list[SettingProperties] + :type settings: list[SettingProperties] """ self._settings = settings @@ -138,7 +134,7 @@ def settings_metadata(self, settings_metadata): :param settings_metadata: The settings_metadata of this FoldersUsersSettingsAndMetadataPropertiesFromB2B. # noqa: E501 - :type: SettingsMetadataProperties + :type settings_metadata: SettingsMetadataProperties """ self._settings_metadata = settings_metadata @@ -159,7 +155,7 @@ def users(self, users): :param users: The users of this FoldersUsersSettingsAndMetadataPropertiesFromB2B. # noqa: E501 - :type: list[UserAllowedFoldersProperties] + :type users: list[UserAllowedFoldersProperties] """ self._users = users @@ -180,37 +176,40 @@ def groups(self, groups): :param groups: The groups of this FoldersUsersSettingsAndMetadataPropertiesFromB2B. # noqa: E501 - :type: list[GroupsAllowedFoldersProperties] + :type groups: list[GroupsAllowedFoldersProperties] """ self._groups = groups - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FoldersUsersSettingsAndMetadataPropertiesFromB2B, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_authentication_details.py b/src/clients/ctm_api_client/models/fts_authentication_details.py index 4ca4d39..8d32736 100644 --- a/src/clients/ctm_api_client/models/fts_authentication_details.py +++ b/src/clients/ctm_api_client/models/fts_authentication_details.py @@ -5,63 +5,118 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsAuthenticationDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ldap_authentication_details": "FtsLdapAuthenticationDetails", - "pam_authentication_details": "FtsPamAuthenticationDetails", + openapi_types = { + 'allowed_users': 'str', + 'blocked_users': 'str', + 'ldap_authentication_details': 'FtsLdapAuthenticationDetails', + 'pam_authentication_details': 'FtsPamAuthenticationDetails' } attribute_map = { - "ldap_authentication_details": "ldapAuthenticationDetails", - "pam_authentication_details": "pamAuthenticationDetails", + 'allowed_users': 'allowedUsers', + 'blocked_users': 'blockedUsers', + 'ldap_authentication_details': 'ldapAuthenticationDetails', + 'pam_authentication_details': 'pamAuthenticationDetails' } - def __init__( - self, - ldap_authentication_details=None, - pam_authentication_details=None, - _configuration=None, - ): # noqa: E501 - """FtsAuthenticationDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, allowed_users=None, blocked_users=None, ldap_authentication_details=None, pam_authentication_details=None, local_vars_configuration=None): # noqa: E501 + """FtsAuthenticationDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self._allowed_users = None + self._blocked_users = None self._ldap_authentication_details = None self._pam_authentication_details = None self.discriminator = None + if allowed_users is not None: + self.allowed_users = allowed_users + if blocked_users is not None: + self.blocked_users = blocked_users if ldap_authentication_details is not None: self.ldap_authentication_details = ldap_authentication_details if pam_authentication_details is not None: self.pam_authentication_details = pam_authentication_details + @property + def allowed_users(self): + """Gets the allowed_users of this FtsAuthenticationDetails. # noqa: E501 + + Allowed Users (comma separated list, * wildcard is allowed) # noqa: E501 + + :return: The allowed_users of this FtsAuthenticationDetails. # noqa: E501 + :rtype: str + """ + return self._allowed_users + + @allowed_users.setter + def allowed_users(self, allowed_users): + """Sets the allowed_users of this FtsAuthenticationDetails. + + Allowed Users (comma separated list, * wildcard is allowed) # noqa: E501 + + :param allowed_users: The allowed_users of this FtsAuthenticationDetails. # noqa: E501 + :type allowed_users: str + """ + + self._allowed_users = allowed_users + + @property + def blocked_users(self): + """Gets the blocked_users of this FtsAuthenticationDetails. # noqa: E501 + + Blocked Users (comma separated list, * wildcard is allowed) # noqa: E501 + + :return: The blocked_users of this FtsAuthenticationDetails. # noqa: E501 + :rtype: str + """ + return self._blocked_users + + @blocked_users.setter + def blocked_users(self, blocked_users): + """Sets the blocked_users of this FtsAuthenticationDetails. + + Blocked Users (comma separated list, * wildcard is allowed) # noqa: E501 + + :param blocked_users: The blocked_users of this FtsAuthenticationDetails. # noqa: E501 + :type blocked_users: str + """ + + self._blocked_users = blocked_users + @property def ldap_authentication_details(self): """Gets the ldap_authentication_details of this FtsAuthenticationDetails. # noqa: E501 @@ -78,7 +133,7 @@ def ldap_authentication_details(self, ldap_authentication_details): :param ldap_authentication_details: The ldap_authentication_details of this FtsAuthenticationDetails. # noqa: E501 - :type: FtsLdapAuthenticationDetails + :type ldap_authentication_details: FtsLdapAuthenticationDetails """ self._ldap_authentication_details = ldap_authentication_details @@ -99,37 +154,40 @@ def pam_authentication_details(self, pam_authentication_details): :param pam_authentication_details: The pam_authentication_details of this FtsAuthenticationDetails. # noqa: E501 - :type: FtsPamAuthenticationDetails + :type pam_authentication_details: FtsPamAuthenticationDetails """ self._pam_authentication_details = pam_authentication_details - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsAuthenticationDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_ftp_settings.py b/src/clients/ctm_api_client/models/fts_ftp_settings.py index 177f570..f51d249 100644 --- a/src/clients/ctm_api_client/models/fts_ftp_settings.py +++ b/src/clients/ctm_api_client/models/fts_ftp_settings.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsFtpSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "server_enabled": "bool", - "port": "int", - "authentication_method": "str", - "secured": "bool", - "keystore_file_path": "str", - "keystore_file_password": "str", - "ciphers": "str", - "listen_for_implicit_connection": "bool", - "passive_ports": "str", + openapi_types = { + 'server_enabled': 'bool', + 'port': 'int', + 'authentication_method': 'str', + 'secured': 'bool', + 'keystore_file_path': 'str', + 'keystore_file_password': 'str', + 'ciphers': 'str', + 'listen_for_implicit_connection': 'bool', + 'passive_ports': 'str' } attribute_map = { - "server_enabled": "serverEnabled", - "port": "port", - "authentication_method": "authenticationMethod", - "secured": "secured", - "keystore_file_path": "keystoreFilePath", - "keystore_file_password": "keystoreFilePassword", - "ciphers": "ciphers", - "listen_for_implicit_connection": "listenForImplicitConnection", - "passive_ports": "passivePorts", + 'server_enabled': 'serverEnabled', + 'port': 'port', + 'authentication_method': 'authenticationMethod', + 'secured': 'secured', + 'keystore_file_path': 'keystoreFilePath', + 'keystore_file_password': 'keystoreFilePassword', + 'ciphers': 'ciphers', + 'listen_for_implicit_connection': 'listenForImplicitConnection', + 'passive_ports': 'passivePorts' } - def __init__( - self, - server_enabled=None, - port=None, - authentication_method=None, - secured=None, - keystore_file_path=None, - keystore_file_password=None, - ciphers=None, - listen_for_implicit_connection=None, - passive_ports=None, - _configuration=None, - ): # noqa: E501 - """FtsFtpSettings - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, server_enabled=None, port=None, authentication_method=None, secured=None, keystore_file_path=None, keystore_file_password=None, ciphers=None, listen_for_implicit_connection=None, passive_ports=None, local_vars_configuration=None): # noqa: E501 + """FtsFtpSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._server_enabled = None self._port = None @@ -122,7 +114,7 @@ def server_enabled(self, server_enabled): Enable/Disable listening for FTP/S connection # noqa: E501 :param server_enabled: The server_enabled of this FtsFtpSettings. # noqa: E501 - :type: bool + :type server_enabled: bool """ self._server_enabled = server_enabled @@ -145,7 +137,7 @@ def port(self, port): FTP server port # noqa: E501 :param port: The port of this FtsFtpSettings. # noqa: E501 - :type: int + :type port: int """ self._port = port @@ -168,7 +160,7 @@ def authentication_method(self, authentication_method): Authentication method being used to connect FTP server # noqa: E501 :param authentication_method: The authentication_method of this FtsFtpSettings. # noqa: E501 - :type: str + :type authentication_method: str """ self._authentication_method = authentication_method @@ -191,7 +183,7 @@ def secured(self, secured): Use FTP secure connection (SSL/TLS) # noqa: E501 :param secured: The secured of this FtsFtpSettings. # noqa: E501 - :type: bool + :type secured: bool """ self._secured = secured @@ -214,7 +206,7 @@ def keystore_file_path(self, keystore_file_path): FTPS keystore file location # noqa: E501 :param keystore_file_path: The keystore_file_path of this FtsFtpSettings. # noqa: E501 - :type: str + :type keystore_file_path: str """ self._keystore_file_path = keystore_file_path @@ -237,7 +229,7 @@ def keystore_file_password(self, keystore_file_password): Password being used to access the FTPS keystore # noqa: E501 :param keystore_file_password: The keystore_file_password of this FtsFtpSettings. # noqa: E501 - :type: str + :type keystore_file_password: str """ self._keystore_file_password = keystore_file_password @@ -260,7 +252,7 @@ def ciphers(self, ciphers): Ftps server allowed cipher suites (comma-separated). Leave empty to allow all supported cipher suites. # noqa: E501 :param ciphers: The ciphers of this FtsFtpSettings. # noqa: E501 - :type: str + :type ciphers: str """ self._ciphers = ciphers @@ -283,7 +275,7 @@ def listen_for_implicit_connection(self, listen_for_implicit_connection): Implicit negotiation mode - requires that the entire FTP session must be encrypted # noqa: E501 :param listen_for_implicit_connection: The listen_for_implicit_connection of this FtsFtpSettings. # noqa: E501 - :type: bool + :type listen_for_implicit_connection: bool """ self._listen_for_implicit_connection = listen_for_implicit_connection @@ -306,37 +298,40 @@ def passive_ports(self, passive_ports): Passive FTP ports range - for PASV connections, the server will open a random port in this range for client to connect to # noqa: E501 :param passive_ports: The passive_ports of this FtsFtpSettings. # noqa: E501 - :type: str + :type passive_ports: str """ self._passive_ports = passive_ports - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsFtpSettings, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_general_settings.py b/src/clients/ctm_api_client/models/fts_general_settings.py index 08043bf..112fcd6 100644 --- a/src/clients/ctm_api_client/models/fts_general_settings.py +++ b/src/clients/ctm_api_client/models/fts_general_settings.py @@ -5,74 +5,68 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsGeneralSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "home_directory": "str", - "multiple_login_allowed": "bool", - "max_open_sessions": "int", - "max_login_failures": "int", - "delay_after_login_failure": "int", - "throttling_activated": "bool", - "max_simultaneous_uploads": "int", - "max_simultaneous_downloads": "int", - "server_enabled": "bool", + openapi_types = { + 'home_directory': 'str', + 'multiple_login_allowed': 'bool', + 'max_open_sessions': 'int', + 'max_login_failures': 'int', + 'delay_after_login_failure': 'int', + 'throttling_activated': 'bool', + 'max_simultaneous_uploads': 'int', + 'max_simultaneous_downloads': 'int', + 'server_enabled': 'bool', + 'access_log_enabled': 'bool' } attribute_map = { - "home_directory": "homeDirectory", - "multiple_login_allowed": "multipleLoginAllowed", - "max_open_sessions": "maxOpenSessions", - "max_login_failures": "maxLoginFailures", - "delay_after_login_failure": "delayAfterLoginFailure", - "throttling_activated": "throttlingActivated", - "max_simultaneous_uploads": "maxSimultaneousUploads", - "max_simultaneous_downloads": "maxSimultaneousDownloads", - "server_enabled": "serverEnabled", + 'home_directory': 'homeDirectory', + 'multiple_login_allowed': 'multipleLoginAllowed', + 'max_open_sessions': 'maxOpenSessions', + 'max_login_failures': 'maxLoginFailures', + 'delay_after_login_failure': 'delayAfterLoginFailure', + 'throttling_activated': 'throttlingActivated', + 'max_simultaneous_uploads': 'maxSimultaneousUploads', + 'max_simultaneous_downloads': 'maxSimultaneousDownloads', + 'server_enabled': 'serverEnabled', + 'access_log_enabled': 'accessLogEnabled' } - def __init__( - self, - home_directory=None, - multiple_login_allowed=None, - max_open_sessions=None, - max_login_failures=None, - delay_after_login_failure=None, - throttling_activated=None, - max_simultaneous_uploads=None, - max_simultaneous_downloads=None, - server_enabled=None, - _configuration=None, - ): # noqa: E501 - """FtsGeneralSettings - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, home_directory=None, multiple_login_allowed=None, max_open_sessions=None, max_login_failures=None, delay_after_login_failure=None, throttling_activated=None, max_simultaneous_uploads=None, max_simultaneous_downloads=None, server_enabled=None, access_log_enabled=None, local_vars_configuration=None): # noqa: E501 + """FtsGeneralSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._home_directory = None self._multiple_login_allowed = None @@ -83,6 +77,7 @@ def __init__( self._max_simultaneous_uploads = None self._max_simultaneous_downloads = None self._server_enabled = None + self._access_log_enabled = None self.discriminator = None if home_directory is not None: @@ -103,6 +98,8 @@ def __init__( self.max_simultaneous_downloads = max_simultaneous_downloads if server_enabled is not None: self.server_enabled = server_enabled + if access_log_enabled is not None: + self.access_log_enabled = access_log_enabled @property def home_directory(self): @@ -122,7 +119,7 @@ def home_directory(self, home_directory): Root path where transferred files are stored. If you want to use a different directory for each logged in user, you must add /${userName} to the path. # noqa: E501 :param home_directory: The home_directory of this FtsGeneralSettings. # noqa: E501 - :type: str + :type home_directory: str """ self._home_directory = home_directory @@ -145,7 +142,7 @@ def multiple_login_allowed(self, multiple_login_allowed): Allow multiple open sessions # noqa: E501 :param multiple_login_allowed: The multiple_login_allowed of this FtsGeneralSettings. # noqa: E501 - :type: bool + :type multiple_login_allowed: bool """ self._multiple_login_allowed = multiple_login_allowed @@ -168,7 +165,7 @@ def max_open_sessions(self, max_open_sessions): Maximum concurrent open sessions # noqa: E501 :param max_open_sessions: The max_open_sessions of this FtsGeneralSettings. # noqa: E501 - :type: int + :type max_open_sessions: int """ self._max_open_sessions = max_open_sessions @@ -191,7 +188,7 @@ def max_login_failures(self, max_login_failures): Number of retries before the server closes the connection # noqa: E501 :param max_login_failures: The max_login_failures of this FtsGeneralSettings. # noqa: E501 - :type: int + :type max_login_failures: int """ self._max_login_failures = max_login_failures @@ -214,7 +211,7 @@ def delay_after_login_failure(self, delay_after_login_failure): Time of waiting before letting the user to do another login in seconds # noqa: E501 :param delay_after_login_failure: The delay_after_login_failure of this FtsGeneralSettings. # noqa: E501 - :type: int + :type delay_after_login_failure: int """ self._delay_after_login_failure = delay_after_login_failure @@ -237,7 +234,7 @@ def throttling_activated(self, throttling_activated): Allow bandwidth throttling # noqa: E501 :param throttling_activated: The throttling_activated of this FtsGeneralSettings. # noqa: E501 - :type: bool + :type throttling_activated: bool """ self._throttling_activated = throttling_activated @@ -260,7 +257,7 @@ def max_simultaneous_uploads(self, max_simultaneous_uploads): Maximum simultaneos uploads # noqa: E501 :param max_simultaneous_uploads: The max_simultaneous_uploads of this FtsGeneralSettings. # noqa: E501 - :type: int + :type max_simultaneous_uploads: int """ self._max_simultaneous_uploads = max_simultaneous_uploads @@ -283,7 +280,7 @@ def max_simultaneous_downloads(self, max_simultaneous_downloads): Maximum simultaneos downloads # noqa: E501 :param max_simultaneous_downloads: The max_simultaneous_downloads of this FtsGeneralSettings. # noqa: E501 - :type: int + :type max_simultaneous_downloads: int """ self._max_simultaneous_downloads = max_simultaneous_downloads @@ -306,37 +303,63 @@ def server_enabled(self, server_enabled): Enable/Disable the File Transfer Server # noqa: E501 :param server_enabled: The server_enabled of this FtsGeneralSettings. # noqa: E501 - :type: bool + :type server_enabled: bool """ self._server_enabled = server_enabled - def to_dict(self): + @property + def access_log_enabled(self): + """Gets the access_log_enabled of this FtsGeneralSettings. # noqa: E501 + + Is FTS Access Log enabled - true/false # noqa: E501 + + :return: The access_log_enabled of this FtsGeneralSettings. # noqa: E501 + :rtype: bool + """ + return self._access_log_enabled + + @access_log_enabled.setter + def access_log_enabled(self, access_log_enabled): + """Sets the access_log_enabled of this FtsGeneralSettings. + + Is FTS Access Log enabled - true/false # noqa: E501 + + :param access_log_enabled: The access_log_enabled of this FtsGeneralSettings. # noqa: E501 + :type access_log_enabled: bool + """ + + self._access_log_enabled = access_log_enabled + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsGeneralSettings, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_ldap_authentication_details.py b/src/clients/ctm_api_client/models/fts_ldap_authentication_details.py index efffaa4..17a1b14 100644 --- a/src/clients/ctm_api_client/models/fts_ldap_authentication_details.py +++ b/src/clients/ctm_api_client/models/fts_ldap_authentication_details.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsLdapAuthenticationDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "search_user_name": "str", - "search_user_password": "str", - "server_url": "str", - "base_dn": "str", - "username_attribute_name": "str", - "dn_attribute_name": "str", - "connection_timeout": "int", + openapi_types = { + 'search_user_name': 'str', + 'search_user_password': 'str', + 'server_url': 'str', + 'base_dn': 'str', + 'username_attribute_name': 'str', + 'dn_attribute_name': 'str', + 'connection_timeout': 'int' } attribute_map = { - "search_user_name": "searchUserName", - "search_user_password": "searchUserPassword", - "server_url": "serverUrl", - "base_dn": "baseDn", - "username_attribute_name": "usernameAttributeName", - "dn_attribute_name": "dnAttributeName", - "connection_timeout": "connectionTimeout", + 'search_user_name': 'searchUserName', + 'search_user_password': 'searchUserPassword', + 'server_url': 'serverUrl', + 'base_dn': 'baseDn', + 'username_attribute_name': 'usernameAttributeName', + 'dn_attribute_name': 'dnAttributeName', + 'connection_timeout': 'connectionTimeout' } - def __init__( - self, - search_user_name=None, - search_user_password=None, - server_url=None, - base_dn=None, - username_attribute_name=None, - dn_attribute_name=None, - connection_timeout=None, - _configuration=None, - ): # noqa: E501 - """FtsLdapAuthenticationDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, search_user_name=None, search_user_password=None, server_url=None, base_dn=None, username_attribute_name=None, dn_attribute_name=None, connection_timeout=None, local_vars_configuration=None): # noqa: E501 + """FtsLdapAuthenticationDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._search_user_name = None self._search_user_password = None @@ -110,7 +104,7 @@ def search_user_name(self, search_user_name): Name of the user that runs the search action for users that log on # noqa: E501 :param search_user_name: The search_user_name of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: str + :type search_user_name: str """ self._search_user_name = search_user_name @@ -133,7 +127,7 @@ def search_user_password(self, search_user_password): Password of the user that runs the search action for users that log on # noqa: E501 :param search_user_password: The search_user_password of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: str + :type search_user_password: str """ self._search_user_password = search_user_password @@ -156,7 +150,7 @@ def server_url(self, server_url): URL of the LDAP Directory server # noqa: E501 :param server_url: The server_url of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: str + :type server_url: str """ self._server_url = server_url @@ -179,7 +173,7 @@ def base_dn(self, base_dn): Base DN (the point from where the server will search for users) # noqa: E501 :param base_dn: The base_dn of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: str + :type base_dn: str """ self._base_dn = base_dn @@ -202,7 +196,7 @@ def username_attribute_name(self, username_attribute_name): Name of the LDAP attribute containing the username # noqa: E501 :param username_attribute_name: The username_attribute_name of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: str + :type username_attribute_name: str """ self._username_attribute_name = username_attribute_name @@ -225,7 +219,7 @@ def dn_attribute_name(self, dn_attribute_name): Name of the LDAP attribute containing the distinguished name # noqa: E501 :param dn_attribute_name: The dn_attribute_name of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: str + :type dn_attribute_name: str """ self._dn_attribute_name = dn_attribute_name @@ -248,37 +242,40 @@ def connection_timeout(self, connection_timeout): LDAP server connection timeout in milliseconds # noqa: E501 :param connection_timeout: The connection_timeout of this FtsLdapAuthenticationDetails. # noqa: E501 - :type: int + :type connection_timeout: int """ self._connection_timeout = connection_timeout - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsLdapAuthenticationDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_pam_authentication_details.py b/src/clients/ctm_api_client/models/fts_pam_authentication_details.py index 7bf3708..db1807b 100644 --- a/src/clients/ctm_api_client/models/fts_pam_authentication_details.py +++ b/src/clients/ctm_api_client/models/fts_pam_authentication_details.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsPamAuthenticationDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"service_name": "str"} + openapi_types = { + 'service_name': 'str' + } - attribute_map = {"service_name": "serviceName"} + attribute_map = { + 'service_name': 'serviceName' + } - def __init__(self, service_name=None, _configuration=None): # noqa: E501 - """FtsPamAuthenticationDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, service_name=None, local_vars_configuration=None): # noqa: E501 + """FtsPamAuthenticationDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._service_name = None self.discriminator = None @@ -66,37 +74,40 @@ def service_name(self, service_name): Name of PAM service # noqa: E501 :param service_name: The service_name of this FtsPamAuthenticationDetails. # noqa: E501 - :type: str + :type service_name: str """ self._service_name = service_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsPamAuthenticationDetails, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_settings_data.py b/src/clients/ctm_api_client/models/fts_settings_data.py index 84adbac..e8fcd01 100644 --- a/src/clients/ctm_api_client/models/fts_settings_data.py +++ b/src/clients/ctm_api_client/models/fts_settings_data.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsSettingsData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "general_settings": "FtsGeneralSettings", - "ftp_settings": "FtsFtpSettings", - "sftp_settings": "FtsSftpSettings", - "authentication_details": "FtsAuthenticationDetails", + openapi_types = { + 'general_settings': 'FtsGeneralSettings', + 'ftp_settings': 'FtsFtpSettings', + 'sftp_settings': 'FtsSftpSettings', + 'authentication_details': 'FtsAuthenticationDetails' } attribute_map = { - "general_settings": "generalSettings", - "ftp_settings": "ftpSettings", - "sftp_settings": "sftpSettings", - "authentication_details": "authenticationDetails", + 'general_settings': 'generalSettings', + 'ftp_settings': 'ftpSettings', + 'sftp_settings': 'sftpSettings', + 'authentication_details': 'authenticationDetails' } - def __init__( - self, - general_settings=None, - ftp_settings=None, - sftp_settings=None, - authentication_details=None, - _configuration=None, - ): # noqa: E501 - """FtsSettingsData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, general_settings=None, ftp_settings=None, sftp_settings=None, authentication_details=None, local_vars_configuration=None): # noqa: E501 + """FtsSettingsData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._general_settings = None self._ftp_settings = None @@ -78,7 +75,6 @@ def __init__( def general_settings(self): """Gets the general_settings of this FtsSettingsData. # noqa: E501 - FTS general settings HIDDEN # noqa: E501 :return: The general_settings of this FtsSettingsData. # noqa: E501 :rtype: FtsGeneralSettings @@ -89,10 +85,9 @@ def general_settings(self): def general_settings(self, general_settings): """Sets the general_settings of this FtsSettingsData. - FTS general settings HIDDEN # noqa: E501 :param general_settings: The general_settings of this FtsSettingsData. # noqa: E501 - :type: FtsGeneralSettings + :type general_settings: FtsGeneralSettings """ self._general_settings = general_settings @@ -101,7 +96,6 @@ def general_settings(self, general_settings): def ftp_settings(self): """Gets the ftp_settings of this FtsSettingsData. # noqa: E501 - FTS FTP settings HIDDEN # noqa: E501 :return: The ftp_settings of this FtsSettingsData. # noqa: E501 :rtype: FtsFtpSettings @@ -112,10 +106,9 @@ def ftp_settings(self): def ftp_settings(self, ftp_settings): """Sets the ftp_settings of this FtsSettingsData. - FTS FTP settings HIDDEN # noqa: E501 :param ftp_settings: The ftp_settings of this FtsSettingsData. # noqa: E501 - :type: FtsFtpSettings + :type ftp_settings: FtsFtpSettings """ self._ftp_settings = ftp_settings @@ -124,7 +117,6 @@ def ftp_settings(self, ftp_settings): def sftp_settings(self): """Gets the sftp_settings of this FtsSettingsData. # noqa: E501 - FTS SFTP settings HIDDEN # noqa: E501 :return: The sftp_settings of this FtsSettingsData. # noqa: E501 :rtype: FtsSftpSettings @@ -135,10 +127,9 @@ def sftp_settings(self): def sftp_settings(self, sftp_settings): """Sets the sftp_settings of this FtsSettingsData. - FTS SFTP settings HIDDEN # noqa: E501 :param sftp_settings: The sftp_settings of this FtsSettingsData. # noqa: E501 - :type: FtsSftpSettings + :type sftp_settings: FtsSftpSettings """ self._sftp_settings = sftp_settings @@ -147,7 +138,6 @@ def sftp_settings(self, sftp_settings): def authentication_details(self): """Gets the authentication_details of this FtsSettingsData. # noqa: E501 - FTS authentication details HIDDEN # noqa: E501 :return: The authentication_details of this FtsSettingsData. # noqa: E501 :rtype: FtsAuthenticationDetails @@ -158,40 +148,42 @@ def authentication_details(self): def authentication_details(self, authentication_details): """Sets the authentication_details of this FtsSettingsData. - FTS authentication details HIDDEN # noqa: E501 :param authentication_details: The authentication_details of this FtsSettingsData. # noqa: E501 - :type: FtsAuthenticationDetails + :type authentication_details: FtsAuthenticationDetails """ self._authentication_details = authentication_details - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsSettingsData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_sftp_settings.py b/src/clients/ctm_api_client/models/fts_sftp_settings.py index e6df844..3a0fdfd 100644 --- a/src/clients/ctm_api_client/models/fts_sftp_settings.py +++ b/src/clients/ctm_api_client/models/fts_sftp_settings.py @@ -5,71 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsSftpSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "server_enabled": "bool", - "port": "int", - "authentication_method": "str", - "keystore_file_path": "str", - "keystore_file_password": "str", - "ciphers": "str", - "known_users_file_path": "str", - "overridden_users_home_directories": "list[FtsUserHomeDirectoryData]", + openapi_types = { + 'server_enabled': 'bool', + 'port': 'int', + 'authentication_method': 'str', + 'keystore_file_path': 'str', + 'keystore_file_password': 'str', + 'ciphers': 'str', + 'known_users_file_path': 'str', + 'overridden_users_home_directories': 'list[FtsUserHomeDirectoryData]' } attribute_map = { - "server_enabled": "serverEnabled", - "port": "port", - "authentication_method": "authenticationMethod", - "keystore_file_path": "keystoreFilePath", - "keystore_file_password": "keystoreFilePassword", - "ciphers": "ciphers", - "known_users_file_path": "knownUsersFilePath", - "overridden_users_home_directories": "overriddenUsersHomeDirectories", + 'server_enabled': 'serverEnabled', + 'port': 'port', + 'authentication_method': 'authenticationMethod', + 'keystore_file_path': 'keystoreFilePath', + 'keystore_file_password': 'keystoreFilePassword', + 'ciphers': 'ciphers', + 'known_users_file_path': 'knownUsersFilePath', + 'overridden_users_home_directories': 'overriddenUsersHomeDirectories' } - def __init__( - self, - server_enabled=None, - port=None, - authentication_method=None, - keystore_file_path=None, - keystore_file_password=None, - ciphers=None, - known_users_file_path=None, - overridden_users_home_directories=None, - _configuration=None, - ): # noqa: E501 - """FtsSftpSettings - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, server_enabled=None, port=None, authentication_method=None, keystore_file_path=None, keystore_file_password=None, ciphers=None, known_users_file_path=None, overridden_users_home_directories=None, local_vars_configuration=None): # noqa: E501 + """FtsSftpSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._server_enabled = None self._port = None @@ -116,7 +109,7 @@ def server_enabled(self, server_enabled): Enable/Disable listening for SFTP connection # noqa: E501 :param server_enabled: The server_enabled of this FtsSftpSettings. # noqa: E501 - :type: bool + :type server_enabled: bool """ self._server_enabled = server_enabled @@ -139,7 +132,7 @@ def port(self, port): SFTP server port # noqa: E501 :param port: The port of this FtsSftpSettings. # noqa: E501 - :type: int + :type port: int """ self._port = port @@ -162,7 +155,7 @@ def authentication_method(self, authentication_method): Authentication method being used to connect FTP server # noqa: E501 :param authentication_method: The authentication_method of this FtsSftpSettings. # noqa: E501 - :type: str + :type authentication_method: str """ self._authentication_method = authentication_method @@ -185,7 +178,7 @@ def keystore_file_path(self, keystore_file_path): SFTP keystore file location # noqa: E501 :param keystore_file_path: The keystore_file_path of this FtsSftpSettings. # noqa: E501 - :type: str + :type keystore_file_path: str """ self._keystore_file_path = keystore_file_path @@ -208,7 +201,7 @@ def keystore_file_password(self, keystore_file_password): Password being used to access the SFTP keystore # noqa: E501 :param keystore_file_password: The keystore_file_password of this FtsSftpSettings. # noqa: E501 - :type: str + :type keystore_file_password: str """ self._keystore_file_password = keystore_file_password @@ -231,7 +224,7 @@ def ciphers(self, ciphers): Ftps server allowed cipher suites (comma-separated). Leave empty to allow all supported cipher suites. # noqa: E501 :param ciphers: The ciphers of this FtsSftpSettings. # noqa: E501 - :type: str + :type ciphers: str """ self._ciphers = ciphers @@ -254,7 +247,7 @@ def known_users_file_path(self, known_users_file_path): Known users file location # noqa: E501 :param known_users_file_path: The known_users_file_path of this FtsSftpSettings. # noqa: E501 - :type: str + :type known_users_file_path: str """ self._known_users_file_path = known_users_file_path @@ -277,37 +270,40 @@ def overridden_users_home_directories(self, overridden_users_home_directories): Overridden home directories for specific internal users # noqa: E501 :param overridden_users_home_directories: The overridden_users_home_directories of this FtsSftpSettings. # noqa: E501 - :type: list[FtsUserHomeDirectoryData] + :type overridden_users_home_directories: list[FtsUserHomeDirectoryData] """ self._overridden_users_home_directories = overridden_users_home_directories - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsSftpSettings, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/fts_user_home_directory_data.py b/src/clients/ctm_api_client/models/fts_user_home_directory_data.py index d6431c2..f6bb387 100644 --- a/src/clients/ctm_api_client/models/fts_user_home_directory_data.py +++ b/src/clients/ctm_api_client/models/fts_user_home_directory_data.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class FtsUserHomeDirectoryData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"user_name": "str", "home_directory": "str"} - - attribute_map = {"user_name": "userName", "home_directory": "homeDirectory"} - - def __init__( - self, user_name=None, home_directory=None, _configuration=None - ): # noqa: E501 - """FtsUserHomeDirectoryData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'user_name': 'str', + 'home_directory': 'str' + } + + attribute_map = { + 'user_name': 'userName', + 'home_directory': 'homeDirectory' + } + + def __init__(self, user_name=None, home_directory=None, local_vars_configuration=None): # noqa: E501 + """FtsUserHomeDirectoryData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._user_name = None self._home_directory = None @@ -71,7 +79,7 @@ def user_name(self, user_name): User name # noqa: E501 :param user_name: The user_name of this FtsUserHomeDirectoryData. # noqa: E501 - :type: str + :type user_name: str """ self._user_name = user_name @@ -94,37 +102,40 @@ def home_directory(self, home_directory): Home directory # noqa: E501 :param home_directory: The home_directory of this FtsUserHomeDirectoryData. # noqa: E501 - :type: str + :type home_directory: str """ self._home_directory = home_directory - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(FtsUserHomeDirectoryData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/gateway_data.py b/src/clients/ctm_api_client/models/gateway_data.py index a9318cd..6e523d8 100644 --- a/src/clients/ctm_api_client/models/gateway_data.py +++ b/src/clients/ctm_api_client/models/gateway_data.py @@ -5,49 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class GatewayData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"host": "str", "port": "str", "status": "str", "message": "str"} + openapi_types = { + 'host': 'str', + 'port': 'str', + 'status': 'str', + 'message': 'str' + } attribute_map = { - "host": "host", - "port": "port", - "status": "status", - "message": "message", + 'host': 'host', + 'port': 'port', + 'status': 'status', + 'message': 'message' } - def __init__( - self, host=None, port=None, status=None, message=None, _configuration=None - ): # noqa: E501 - """GatewayData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, host=None, port=None, status=None, message=None, local_vars_configuration=None): # noqa: E501 + """GatewayData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host = None self._port = None @@ -82,7 +89,7 @@ def host(self, host): gateway host name REQUIRED # noqa: E501 :param host: The host of this GatewayData. # noqa: E501 - :type: str + :type host: str """ self._host = host @@ -105,7 +112,7 @@ def port(self, port): gateway port REQUIRED # noqa: E501 :param port: The port of this GatewayData. # noqa: E501 - :type: str + :type port: str """ self._port = port @@ -128,7 +135,7 @@ def status(self, status): gateway status HIDDEN # noqa: E501 :param status: The status of this GatewayData. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -151,37 +158,40 @@ def message(self, message): general message HIDDEN # noqa: E501 :param message: The message of this GatewayData. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(GatewayData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/get_alert_info.py b/src/clients/ctm_api_client/models/get_alert_info.py index 52103e7..e0d50a5 100644 --- a/src/clients/ctm_api_client/models/get_alert_info.py +++ b/src/clients/ctm_api_client/models/get_alert_info.py @@ -5,49 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class GetAlertInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"id": "int", "notes": "str", "severity": "str", "status": "str"} + openapi_types = { + 'id': 'int', + 'notes': 'str', + 'severity': 'str', + 'status': 'str' + } attribute_map = { - "id": "id", - "notes": "notes", - "severity": "severity", - "status": "status", + 'id': 'id', + 'notes': 'notes', + 'severity': 'severity', + 'status': 'status' } - def __init__( - self, id=None, notes=None, severity=None, status=None, _configuration=None - ): # noqa: E501 - """GetAlertInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, id=None, notes=None, severity=None, status=None, local_vars_configuration=None): # noqa: E501 + """GetAlertInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._id = None self._notes = None @@ -80,7 +87,7 @@ def id(self, id): :param id: The id of this GetAlertInfo. # noqa: E501 - :type: int + :type id: int """ self._id = id @@ -101,7 +108,7 @@ def notes(self, notes): :param notes: The notes of this GetAlertInfo. # noqa: E501 - :type: str + :type notes: str """ self._notes = notes @@ -122,7 +129,7 @@ def severity(self, severity): :param severity: The severity of this GetAlertInfo. # noqa: E501 - :type: str + :type severity: str """ self._severity = severity @@ -143,37 +150,40 @@ def status(self, status): :param status: The status of this GetAlertInfo. # noqa: E501 - :type: str + :type status: str """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(GetAlertInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/get_manifest_params.py b/src/clients/ctm_api_client/models/get_manifest_params.py index 09ac43e..c2e2204 100644 --- a/src/clients/ctm_api_client/models/get_manifest_params.py +++ b/src/clients/ctm_api_client/models/get_manifest_params.py @@ -5,93 +5,87 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class GetManifestParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "category": "str", - "order": "int", - "product_code": "str", - "name": "str", - "install_uri": "str", - "visible": "bool", - "icon_base64": "str", - "error": "str", - "error_code": "str", - "full_name": "str", - "short_name": "str", - "sub_category": "str", - "keywords": "list[str]", - "versions": "list[str]", - "group": "ManifestGroupObject", + openapi_types = { + 'topology_identifier': 'str', + 'environment': 'str', + 'category': 'str', + 'order': 'int', + 'product_code': 'str', + 'name': 'str', + 'install_uri': 'str', + 'visible': 'bool', + 'icon_base64': 'str', + 'error': 'str', + 'error_code': 'str', + 'full_name': 'str', + 'short_name': 'str', + 'sub_category': 'str', + 'keywords': 'list[str]', + 'versions': 'list[str]', + 'versions_self_hosted': 'list[str]', + 'group': 'ManifestGroupObject' } attribute_map = { - "category": "category", - "order": "order", - "product_code": "productCode", - "name": "name", - "install_uri": "installUri", - "visible": "visible", - "icon_base64": "iconBase64", - "error": "error", - "error_code": "errorCode", - "full_name": "fullName", - "short_name": "shortName", - "sub_category": "subCategory", - "keywords": "keywords", - "versions": "versions", - "group": "group", + 'topology_identifier': 'topologyIdentifier', + 'environment': 'environment', + 'category': 'category', + 'order': 'order', + 'product_code': 'productCode', + 'name': 'name', + 'install_uri': 'installUri', + 'visible': 'visible', + 'icon_base64': 'iconBase64', + 'error': 'error', + 'error_code': 'errorCode', + 'full_name': 'fullName', + 'short_name': 'shortName', + 'sub_category': 'subCategory', + 'keywords': 'keywords', + 'versions': 'versions', + 'versions_self_hosted': 'versionsSelfHosted', + 'group': 'group' } - def __init__( - self, - category=None, - order=None, - product_code=None, - name=None, - install_uri=None, - visible=None, - icon_base64=None, - error=None, - error_code=None, - full_name=None, - short_name=None, - sub_category=None, - keywords=None, - versions=None, - group=None, - _configuration=None, - ): # noqa: E501 - """GetManifestParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, topology_identifier=None, environment=None, category=None, order=None, product_code=None, name=None, install_uri=None, visible=None, icon_base64=None, error=None, error_code=None, full_name=None, short_name=None, sub_category=None, keywords=None, versions=None, versions_self_hosted=None, group=None, local_vars_configuration=None): # noqa: E501 + """GetManifestParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self._topology_identifier = None + self._environment = None self._category = None self._order = None self._product_code = None @@ -106,9 +100,14 @@ def __init__( self._sub_category = None self._keywords = None self._versions = None + self._versions_self_hosted = None self._group = None self.discriminator = None + if topology_identifier is not None: + self.topology_identifier = topology_identifier + if environment is not None: + self.environment = environment if category is not None: self.category = category if order is not None: @@ -137,9 +136,57 @@ def __init__( self.keywords = keywords if versions is not None: self.versions = versions + if versions_self_hosted is not None: + self.versions_self_hosted = versions_self_hosted if group is not None: self.group = group + @property + def topology_identifier(self): + """Gets the topology_identifier of this GetManifestParams. # noqa: E501 + + Holds the topology identifier # noqa: E501 + + :return: The topology_identifier of this GetManifestParams. # noqa: E501 + :rtype: str + """ + return self._topology_identifier + + @topology_identifier.setter + def topology_identifier(self, topology_identifier): + """Sets the topology_identifier of this GetManifestParams. + + Holds the topology identifier # noqa: E501 + + :param topology_identifier: The topology_identifier of this GetManifestParams. # noqa: E501 + :type topology_identifier: str + """ + + self._topology_identifier = topology_identifier + + @property + def environment(self): + """Gets the environment of this GetManifestParams. # noqa: E501 + + Determines, whether the Agent or Plugin works in saas, selfhosted, or both # noqa: E501 + + :return: The environment of this GetManifestParams. # noqa: E501 + :rtype: str + """ + return self._environment + + @environment.setter + def environment(self, environment): + """Sets the environment of this GetManifestParams. + + Determines, whether the Agent or Plugin works in saas, selfhosted, or both # noqa: E501 + + :param environment: The environment of this GetManifestParams. # noqa: E501 + :type environment: str + """ + + self._environment = environment + @property def category(self): """Gets the category of this GetManifestParams. # noqa: E501 @@ -158,7 +205,7 @@ def category(self, category): Holds the category of the entry # noqa: E501 :param category: The category of this GetManifestParams. # noqa: E501 - :type: str + :type category: str """ self._category = category @@ -181,7 +228,7 @@ def order(self, order): Order of appearance # noqa: E501 :param order: The order of this GetManifestParams. # noqa: E501 - :type: int + :type order: int """ self._order = order @@ -204,7 +251,7 @@ def product_code(self, product_code): Three letters that are the product unique identifier # noqa: E501 :param product_code: The product_code of this GetManifestParams. # noqa: E501 - :type: str + :type product_code: str """ self._product_code = product_code @@ -227,7 +274,7 @@ def name(self, name): The full official name of the product # noqa: E501 :param name: The name of this GetManifestParams. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -250,7 +297,7 @@ def install_uri(self, install_uri): Specifies the path to the installation file # noqa: E501 :param install_uri: The install_uri of this GetManifestParams. # noqa: E501 - :type: str + :type install_uri: str """ self._install_uri = install_uri @@ -273,7 +320,7 @@ def visible(self, visible): Determines whether or not the product should be visible in the web page # noqa: E501 :param visible: The visible of this GetManifestParams. # noqa: E501 - :type: bool + :type visible: bool """ self._visible = visible @@ -296,7 +343,7 @@ def icon_base64(self, icon_base64): Base64 representaion of image file # noqa: E501 :param icon_base64: The icon_base64 of this GetManifestParams. # noqa: E501 - :type: str + :type icon_base64: str """ self._icon_base64 = icon_base64 @@ -319,7 +366,7 @@ def error(self, error): Description of the specific error # noqa: E501 :param error: The error of this GetManifestParams. # noqa: E501 - :type: str + :type error: str """ self._error = error @@ -342,7 +389,7 @@ def error_code(self, error_code): Http response status code # noqa: E501 :param error_code: The error_code of this GetManifestParams. # noqa: E501 - :type: str + :type error_code: str """ self._error_code = error_code @@ -365,7 +412,7 @@ def full_name(self, full_name): The full name # noqa: E501 :param full_name: The full_name of this GetManifestParams. # noqa: E501 - :type: str + :type full_name: str """ self._full_name = full_name @@ -388,7 +435,7 @@ def short_name(self, short_name): The short name # noqa: E501 :param short_name: The short_name of this GetManifestParams. # noqa: E501 - :type: str + :type short_name: str """ self._short_name = short_name @@ -411,7 +458,7 @@ def sub_category(self, sub_category): The sub-category # noqa: E501 :param sub_category: The sub_category of this GetManifestParams. # noqa: E501 - :type: str + :type sub_category: str """ self._sub_category = sub_category @@ -434,7 +481,7 @@ def keywords(self, keywords): List of words that user can use when searching for a plugin # noqa: E501 :param keywords: The keywords of this GetManifestParams. # noqa: E501 - :type: list[str] + :type keywords: list[str] """ self._keywords = keywords @@ -457,11 +504,34 @@ def versions(self, versions): Includes all the versions numbers of the product that exist in the repository # noqa: E501 :param versions: The versions of this GetManifestParams. # noqa: E501 - :type: list[str] + :type versions: list[str] """ self._versions = versions + @property + def versions_self_hosted(self): + """Gets the versions_self_hosted of this GetManifestParams. # noqa: E501 + + Includes all the version numbers of the product present in the repository and is compatible with a SelfHosted environment # noqa: E501 + + :return: The versions_self_hosted of this GetManifestParams. # noqa: E501 + :rtype: list[str] + """ + return self._versions_self_hosted + + @versions_self_hosted.setter + def versions_self_hosted(self, versions_self_hosted): + """Sets the versions_self_hosted of this GetManifestParams. + + Includes all the version numbers of the product present in the repository and is compatible with a SelfHosted environment # noqa: E501 + + :param versions_self_hosted: The versions_self_hosted of this GetManifestParams. # noqa: E501 + :type versions_self_hosted: list[str] + """ + + self._versions_self_hosted = versions_self_hosted + @property def group(self): """Gets the group of this GetManifestParams. # noqa: E501 @@ -478,37 +548,40 @@ def group(self, group): :param group: The group of this GetManifestParams. # noqa: E501 - :type: ManifestGroupObject + :type group: ManifestGroupObject """ self._group = group - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(GetManifestParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/get_manifest_params_result.py b/src/clients/ctm_api_client/models/get_manifest_params_result.py deleted file mode 100644 index 12e6a88..0000000 --- a/src/clients/ctm_api_client/models/get_manifest_params_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class GetManifestParamsResult(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """GetManifestParamsResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(GetManifestParamsResult, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GetManifestParamsResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GetManifestParamsResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/groups_allowed_folders_properties.py b/src/clients/ctm_api_client/models/groups_allowed_folders_properties.py index 98d5adf..07c1d6c 100644 --- a/src/clients/ctm_api_client/models/groups_allowed_folders_properties.py +++ b/src/clients/ctm_api_client/models/groups_allowed_folders_properties.py @@ -5,63 +5,63 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class GroupsAllowedFoldersProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "allowed_folders_names": "list[str]", - "external_users": "list[str]", - "ldap_groups": "list[str]", - "name": "str", + openapi_types = { + 'allowed_folders_names': 'list[str]', + 'external_users': 'list[str]', + 'ldap_groups': 'list[str]', + 'ldap_users': 'list[str]', + 'name': 'str' } attribute_map = { - "allowed_folders_names": "allowedFoldersNames", - "external_users": "externalUsers", - "ldap_groups": "ldapGroups", - "name": "name", + 'allowed_folders_names': 'allowedFoldersNames', + 'external_users': 'externalUsers', + 'ldap_groups': 'ldapGroups', + 'ldap_users': 'ldapUsers', + 'name': 'name' } - def __init__( - self, - allowed_folders_names=None, - external_users=None, - ldap_groups=None, - name=None, - _configuration=None, - ): # noqa: E501 - """GroupsAllowedFoldersProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, allowed_folders_names=None, external_users=None, ldap_groups=None, ldap_users=None, name=None, local_vars_configuration=None): # noqa: E501 + """GroupsAllowedFoldersProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._allowed_folders_names = None self._external_users = None self._ldap_groups = None + self._ldap_users = None self._name = None self.discriminator = None @@ -71,6 +71,8 @@ def __init__( self.external_users = external_users if ldap_groups is not None: self.ldap_groups = ldap_groups + if ldap_users is not None: + self.ldap_users = ldap_users if name is not None: self.name = name @@ -90,7 +92,7 @@ def allowed_folders_names(self, allowed_folders_names): :param allowed_folders_names: The allowed_folders_names of this GroupsAllowedFoldersProperties. # noqa: E501 - :type: list[str] + :type allowed_folders_names: list[str] """ self._allowed_folders_names = allowed_folders_names @@ -113,7 +115,7 @@ def external_users(self, external_users): external users # noqa: E501 :param external_users: The external_users of this GroupsAllowedFoldersProperties. # noqa: E501 - :type: list[str] + :type external_users: list[str] """ self._external_users = external_users @@ -136,11 +138,34 @@ def ldap_groups(self, ldap_groups): ldap groups # noqa: E501 :param ldap_groups: The ldap_groups of this GroupsAllowedFoldersProperties. # noqa: E501 - :type: list[str] + :type ldap_groups: list[str] """ self._ldap_groups = ldap_groups + @property + def ldap_users(self): + """Gets the ldap_users of this GroupsAllowedFoldersProperties. # noqa: E501 + + ldap users # noqa: E501 + + :return: The ldap_users of this GroupsAllowedFoldersProperties. # noqa: E501 + :rtype: list[str] + """ + return self._ldap_users + + @ldap_users.setter + def ldap_users(self, ldap_users): + """Sets the ldap_users of this GroupsAllowedFoldersProperties. + + ldap users # noqa: E501 + + :param ldap_users: The ldap_users of this GroupsAllowedFoldersProperties. # noqa: E501 + :type ldap_users: list[str] + """ + + self._ldap_users = ldap_users + @property def name(self): """Gets the name of this GroupsAllowedFoldersProperties. # noqa: E501 @@ -157,37 +182,40 @@ def name(self, name): :param name: The name of this GroupsAllowedFoldersProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(GroupsAllowedFoldersProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/host_group_data.py b/src/clients/ctm_api_client/models/host_group_data.py index 9b07541..e6ed23c 100644 --- a/src/clients/ctm_api_client/models/host_group_data.py +++ b/src/clients/ctm_api_client/models/host_group_data.py @@ -5,56 +5,67 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HostGroupData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "hostgroup": "str", - "tag": "str", - "agentslist": "list[AgentInGroupParams]", + openapi_types = { + 'hostgroup': 'str', + 'application_type': 'str', + 'tag': 'str', + 'agentslist': 'list[AgentInGroupParams]' } - attribute_map = {"hostgroup": "hostgroup", "tag": "tag", "agentslist": "agentslist"} + attribute_map = { + 'hostgroup': 'hostgroup', + 'application_type': 'applicationType', + 'tag': 'tag', + 'agentslist': 'agentslist' + } - def __init__( - self, hostgroup=None, tag=None, agentslist=None, _configuration=None - ): # noqa: E501 - """HostGroupData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, hostgroup=None, application_type=None, tag=None, agentslist=None, local_vars_configuration=None): # noqa: E501 + """HostGroupData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._hostgroup = None + self._application_type = None self._tag = None self._agentslist = None self.discriminator = None if hostgroup is not None: self.hostgroup = hostgroup + if application_type is not None: + self.application_type = application_type if tag is not None: self.tag = tag if agentslist is not None: @@ -78,11 +89,34 @@ def hostgroup(self, hostgroup): Host Group name # noqa: E501 :param hostgroup: The hostgroup of this HostGroupData. # noqa: E501 - :type: str + :type hostgroup: str """ self._hostgroup = hostgroup + @property + def application_type(self): + """Gets the application_type of this HostGroupData. # noqa: E501 + + Host Group application type # noqa: E501 + + :return: The application_type of this HostGroupData. # noqa: E501 + :rtype: str + """ + return self._application_type + + @application_type.setter + def application_type(self, application_type): + """Sets the application_type of this HostGroupData. + + Host Group application type # noqa: E501 + + :param application_type: The application_type of this HostGroupData. # noqa: E501 + :type application_type: str + """ + + self._application_type = application_type + @property def tag(self): """Gets the tag of this HostGroupData. # noqa: E501 @@ -101,7 +135,7 @@ def tag(self, tag): Host Group tag # noqa: E501 :param tag: The tag of this HostGroupData. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag @@ -124,37 +158,40 @@ def agentslist(self, agentslist): Agents list # noqa: E501 :param agentslist: The agentslist of this HostGroupData. # noqa: E501 - :type: list[AgentInGroupParams] + :type agentslist: list[AgentInGroupParams] """ self._agentslist = agentslist - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HostGroupData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/host_groups_data_list.py b/src/clients/ctm_api_client/models/host_groups_data_list.py deleted file mode 100644 index 7cc2fd3..0000000 --- a/src/clients/ctm_api_client/models/host_groups_data_list.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class HostGroupsDataList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """HostGroupsDataList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(HostGroupsDataList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, HostGroupsDataList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, HostGroupsDataList): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/host_properties.py b/src/clients/ctm_api_client/models/host_properties.py index 90d896e..34d34ff 100644 --- a/src/clients/ctm_api_client/models/host_properties.py +++ b/src/clients/ctm_api_client/models/host_properties.py @@ -5,98 +5,84 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HostProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "host_name": "str", - "os_type": "str", - "user": "str", - "password": "str", - "protocol": "str", - "port": "int", - "ssl": "bool", - "ssl_implicit": "bool", - "ccc_command": "bool", - "cdc_command": "bool", - "ssl_level": "str", - "passive": "bool", - "substitute_ip_address": "bool", - "extended_passive_mode": "bool", - "ssh_compression": "bool", - "logical_key_name": "str", - "passphrase": "str", + openapi_types = { + 'host_name': 'str', + 'os_type': 'str', + 'user': 'str', + 'password': 'str', + 'protocol': 'str', + 'port': 'int', + 'ssl': 'bool', + 'ssl_implicit': 'bool', + 'ccc_command': 'bool', + 'cdc_command': 'bool', + 'ssl_level': 'str', + 'passive': 'bool', + 'substitute_ip_address': 'bool', + 'extended_passive_mode': 'bool', + 'ssh_compression': 'bool', + 'logical_key_name': 'str', + 'passphrase': 'str', + 'private_key_content': 'str' } attribute_map = { - "host_name": "hostName", - "os_type": "osType", - "user": "user", - "password": "password", - "protocol": "protocol", - "port": "port", - "ssl": "ssl", - "ssl_implicit": "sslImplicit", - "ccc_command": "cccCommand", - "cdc_command": "cdcCommand", - "ssl_level": "sslLevel", - "passive": "passive", - "substitute_ip_address": "substituteIpAddress", - "extended_passive_mode": "extendedPassiveMode", - "ssh_compression": "sshCompression", - "logical_key_name": "logicalKeyName", - "passphrase": "passphrase", + 'host_name': 'hostName', + 'os_type': 'osType', + 'user': 'user', + 'password': 'password', + 'protocol': 'protocol', + 'port': 'port', + 'ssl': 'ssl', + 'ssl_implicit': 'sslImplicit', + 'ccc_command': 'cccCommand', + 'cdc_command': 'cdcCommand', + 'ssl_level': 'sslLevel', + 'passive': 'passive', + 'substitute_ip_address': 'substituteIpAddress', + 'extended_passive_mode': 'extendedPassiveMode', + 'ssh_compression': 'sshCompression', + 'logical_key_name': 'logicalKeyName', + 'passphrase': 'passphrase', + 'private_key_content': 'privateKeyContent' } - def __init__( - self, - host_name="Local", - os_type=None, - user=None, - password=None, - protocol=None, - port=0, - ssl=False, - ssl_implicit=False, - ccc_command=False, - cdc_command=False, - ssl_level=None, - passive=False, - substitute_ip_address=False, - extended_passive_mode=False, - ssh_compression=False, - logical_key_name="", - passphrase="", - _configuration=None, - ): # noqa: E501 - """HostProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, host_name='Local', os_type=None, user=None, password=None, protocol=None, port=0, ssl=False, ssl_implicit=False, ccc_command=False, cdc_command=False, ssl_level=None, passive=False, substitute_ip_address=False, extended_passive_mode=False, ssh_compression=False, logical_key_name='', passphrase='', private_key_content='', local_vars_configuration=None): # noqa: E501 + """HostProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._host_name = None self._os_type = None @@ -115,6 +101,7 @@ def __init__( self._ssh_compression = None self._logical_key_name = None self._passphrase = None + self._private_key_content = None self.discriminator = None if host_name is not None: @@ -151,6 +138,8 @@ def __init__( self.logical_key_name = logical_key_name if passphrase is not None: self.passphrase = passphrase + if private_key_content is not None: + self.private_key_content = private_key_content @property def host_name(self): @@ -170,7 +159,7 @@ def host_name(self, host_name): Host Name HIDDEN # noqa: E501 :param host_name: The host_name of this HostProperties. # noqa: E501 - :type: str + :type host_name: str """ self._host_name = host_name @@ -193,7 +182,7 @@ def os_type(self, os_type): OS Type (Windows/Unix/MVS/OS400/Tandem/OpenVMS/OS2200) HIDDEN # noqa: E501 :param os_type: The os_type of this HostProperties. # noqa: E501 - :type: str + :type os_type: str """ self._os_type = os_type @@ -216,7 +205,7 @@ def user(self, user): User Name HIDDEN # noqa: E501 :param user: The user of this HostProperties. # noqa: E501 - :type: str + :type user: str """ self._user = user @@ -239,7 +228,7 @@ def password(self, password): Password HIDDEN # noqa: E501 :param password: The password of this HostProperties. # noqa: E501 - :type: str + :type password: str """ self._password = password @@ -262,7 +251,7 @@ def protocol(self, protocol): Protocol Name (Local/FTP/SFTP) HIDDEN # noqa: E501 :param protocol: The protocol of this HostProperties. # noqa: E501 - :type: str + :type protocol: str """ self._protocol = protocol @@ -285,7 +274,7 @@ def port(self, port): Port HIDDEN # noqa: E501 :param port: The port of this HostProperties. # noqa: E501 - :type: int + :type port: int """ self._port = port @@ -308,7 +297,7 @@ def ssl(self, ssl): FTP Over SSL/TLS HIDDEN # noqa: E501 :param ssl: The ssl of this HostProperties. # noqa: E501 - :type: bool + :type ssl: bool """ self._ssl = ssl @@ -331,7 +320,7 @@ def ssl_implicit(self, ssl_implicit): SSL Implicit HIDDEN # noqa: E501 :param ssl_implicit: The ssl_implicit of this HostProperties. # noqa: E501 - :type: bool + :type ssl_implicit: bool """ self._ssl_implicit = ssl_implicit @@ -354,7 +343,7 @@ def ccc_command(self, ccc_command): Clear Command Channel (CCC) HIDDEN # noqa: E501 :param ccc_command: The ccc_command of this HostProperties. # noqa: E501 - :type: bool + :type ccc_command: bool """ self._ccc_command = ccc_command @@ -377,7 +366,7 @@ def cdc_command(self, cdc_command): Clear Data Channel (CDC) HIDDEN # noqa: E501 :param cdc_command: The cdc_command of this HostProperties. # noqa: E501 - :type: bool + :type cdc_command: bool """ self._cdc_command = cdc_command @@ -400,7 +389,7 @@ def ssl_level(self, ssl_level): SSL Security Level (No Authentication/Server Authentication/Client-Server Authentication) HIDDEN # noqa: E501 :param ssl_level: The ssl_level of this HostProperties. # noqa: E501 - :type: str + :type ssl_level: str """ self._ssl_level = ssl_level @@ -423,7 +412,7 @@ def passive(self, passive): FTP Passive HIDDEN # noqa: E501 :param passive: The passive of this HostProperties. # noqa: E501 - :type: bool + :type passive: bool """ self._passive = passive @@ -446,7 +435,7 @@ def substitute_ip_address(self, substitute_ip_address): Substitute IP Address HIDDEN # noqa: E501 :param substitute_ip_address: The substitute_ip_address of this HostProperties. # noqa: E501 - :type: bool + :type substitute_ip_address: bool """ self._substitute_ip_address = substitute_ip_address @@ -469,7 +458,7 @@ def extended_passive_mode(self, extended_passive_mode): Extrernded Passive Mode (EPSV) HIDDEN # noqa: E501 :param extended_passive_mode: The extended_passive_mode of this HostProperties. # noqa: E501 - :type: bool + :type extended_passive_mode: bool """ self._extended_passive_mode = extended_passive_mode @@ -492,7 +481,7 @@ def ssh_compression(self, ssh_compression): SSH Compression HIDDEN # noqa: E501 :param ssh_compression: The ssh_compression of this HostProperties. # noqa: E501 - :type: bool + :type ssh_compression: bool """ self._ssh_compression = ssh_compression @@ -515,7 +504,7 @@ def logical_key_name(self, logical_key_name): Private Key Name HIDDEN # noqa: E501 :param logical_key_name: The logical_key_name of this HostProperties. # noqa: E501 - :type: str + :type logical_key_name: str """ self._logical_key_name = logical_key_name @@ -538,37 +527,63 @@ def passphrase(self, passphrase): Key Passphrase HIDDEN # noqa: E501 :param passphrase: The passphrase of this HostProperties. # noqa: E501 - :type: str + :type passphrase: str """ self._passphrase = passphrase - def to_dict(self): + @property + def private_key_content(self): + """Gets the private_key_content of this HostProperties. # noqa: E501 + + Private Key Content HIDDEN # noqa: E501 + + :return: The private_key_content of this HostProperties. # noqa: E501 + :rtype: str + """ + return self._private_key_content + + @private_key_content.setter + def private_key_content(self, private_key_content): + """Sets the private_key_content of this HostProperties. + + Private Key Content HIDDEN # noqa: E501 + + :param private_key_content: The private_key_content of this HostProperties. # noqa: E501 + :type private_key_content: str + """ + + self._private_key_content = private_key_content + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HostProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/hostgroup_agent_participation.py b/src/clients/ctm_api_client/models/hostgroup_agent_participation.py index 95cb500..dd5c250 100644 --- a/src/clients/ctm_api_client/models/hostgroup_agent_participation.py +++ b/src/clients/ctm_api_client/models/hostgroup_agent_participation.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HostgroupAgentParticipation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"event": "str", "order_date": "str"} - - attribute_map = {"event": "event", "order_date": "orderDate"} - - def __init__(self, event=None, order_date=None, _configuration=None): # noqa: E501 - """HostgroupAgentParticipation - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'event': 'str', + 'order_date': 'str' + } + + attribute_map = { + 'event': 'event', + 'order_date': 'orderDate' + } + + def __init__(self, event=None, order_date=None, local_vars_configuration=None): # noqa: E501 + """HostgroupAgentParticipation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._event = None self._order_date = None @@ -68,12 +78,10 @@ def event(self, event): The event name. # noqa: E501 :param event: The event of this HostgroupAgentParticipation. # noqa: E501 - :type: str + :type event: str """ - if self._configuration.client_side_validation and event is None: - raise ValueError( - "Invalid value for `event`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and event is None: # noqa: E501 + raise ValueError("Invalid value for `event`, must not be `None`") # noqa: E501 self._event = event @@ -95,37 +103,40 @@ def order_date(self, order_date): Odate dd-mm-yy or ****** # noqa: E501 :param order_date: The order_date of this HostgroupAgentParticipation. # noqa: E501 - :type: str + :type order_date: str """ self._order_date = order_date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HostgroupAgentParticipation, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/hostgroup_properties.py b/src/clients/ctm_api_client/models/hostgroup_properties.py index 7f84a47..bb4b4c8 100644 --- a/src/clients/ctm_api_client/models/hostgroup_properties.py +++ b/src/clients/ctm_api_client/models/hostgroup_properties.py @@ -5,49 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HostgroupProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"agentslist": "list[AgentInGroupParams]", "tag": "str"} - - attribute_map = {"agentslist": "agentslist", "tag": "tag"} - - def __init__(self, agentslist=None, tag=None, _configuration=None): # noqa: E501 - """HostgroupProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'agentslist': 'list[AgentInGroupParams]', + 'application_type': 'str', + 'tag': 'str' + } + + attribute_map = { + 'agentslist': 'agentslist', + 'application_type': 'applicationType', + 'tag': 'tag' + } + + def __init__(self, agentslist=None, application_type=None, tag=None, local_vars_configuration=None): # noqa: E501 + """HostgroupProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._agentslist = None + self._application_type = None self._tag = None self.discriminator = None if agentslist is not None: self.agentslist = agentslist + if application_type is not None: + self.application_type = application_type if tag is not None: self.tag = tag @@ -69,11 +84,34 @@ def agentslist(self, agentslist): Agents list. HIDDEN. # noqa: E501 :param agentslist: The agentslist of this HostgroupProperties. # noqa: E501 - :type: list[AgentInGroupParams] + :type agentslist: list[AgentInGroupParams] """ self._agentslist = agentslist + @property + def application_type(self): + """Gets the application_type of this HostgroupProperties. # noqa: E501 + + Host Group application type. HIDDEN. # noqa: E501 + + :return: The application_type of this HostgroupProperties. # noqa: E501 + :rtype: str + """ + return self._application_type + + @application_type.setter + def application_type(self, application_type): + """Sets the application_type of this HostgroupProperties. + + Host Group application type. HIDDEN. # noqa: E501 + + :param application_type: The application_type of this HostgroupProperties. # noqa: E501 + :type application_type: str + """ + + self._application_type = application_type + @property def tag(self): """Gets the tag of this HostgroupProperties. # noqa: E501 @@ -92,37 +130,40 @@ def tag(self, tag): Host Group tag. HIDDEN. # noqa: E501 :param tag: The tag of this HostgroupProperties. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HostgroupProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/hostname_port_pair.py b/src/clients/ctm_api_client/models/hostname_port_pair.py index ada4f55..9a064b3 100644 --- a/src/clients/ctm_api_client/models/hostname_port_pair.py +++ b/src/clients/ctm_api_client/models/hostname_port_pair.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HostnamePortPair(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"physical_hostname": "str", "port": "str"} - - attribute_map = {"physical_hostname": "physicalHostname", "port": "port"} - - def __init__( - self, physical_hostname=None, port=None, _configuration=None - ): # noqa: E501 - """HostnamePortPair - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'physical_hostname': 'str', + 'port': 'str' + } + + attribute_map = { + 'physical_hostname': 'physicalHostname', + 'port': 'port' + } + + def __init__(self, physical_hostname=None, port=None, local_vars_configuration=None): # noqa: E501 + """HostnamePortPair - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._physical_hostname = None self._port = None @@ -71,7 +79,7 @@ def physical_hostname(self, physical_hostname): host name # noqa: E501 :param physical_hostname: The physical_hostname of this HostnamePortPair. # noqa: E501 - :type: str + :type physical_hostname: str """ self._physical_hostname = physical_hostname @@ -94,37 +102,40 @@ def port(self, port): port # noqa: E501 :param port: The port of this HostnamePortPair. # noqa: E501 - :type: str + :type port: str """ self._port = port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HostnamePortPair, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/hub_data.py b/src/clients/ctm_api_client/models/hub_data.py index 4162098..d8feb0d 100644 --- a/src/clients/ctm_api_client/models/hub_data.py +++ b/src/clients/ctm_api_client/models/hub_data.py @@ -5,65 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HubData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "status": "str", - "sync_status": "str", - "name": "str", - "cpu": "str", - "memory": "str", - "message": "str", + openapi_types = { + 'status': 'str', + 'sync_status': 'str', + 'name': 'str', + 'cpu': 'str', + 'memory': 'str', + 'message': 'str', + 'site_name': 'str' } attribute_map = { - "status": "status", - "sync_status": "syncStatus", - "name": "name", - "cpu": "cpu", - "memory": "memory", - "message": "message", + 'status': 'status', + 'sync_status': 'syncStatus', + 'name': 'name', + 'cpu': 'cpu', + 'memory': 'memory', + 'message': 'message', + 'site_name': 'siteName' } - def __init__( - self, - status=None, - sync_status=None, - name=None, - cpu=None, - memory=None, - message=None, - _configuration=None, - ): # noqa: E501 - """HubData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, status=None, sync_status=None, name=None, cpu=None, memory=None, message=None, site_name=None, local_vars_configuration=None): # noqa: E501 + """HubData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._status = None self._sync_status = None @@ -71,6 +68,7 @@ def __init__( self._cpu = None self._memory = None self._message = None + self._site_name = None self.discriminator = None if status is not None: @@ -85,6 +83,8 @@ def __init__( self.memory = memory if message is not None: self.message = message + if site_name is not None: + self.site_name = site_name @property def status(self): @@ -104,7 +104,7 @@ def status(self, status): Hub state # noqa: E501 :param status: The status of this HubData. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -127,7 +127,7 @@ def sync_status(self, sync_status): Hub sync status # noqa: E501 :param sync_status: The sync_status of this HubData. # noqa: E501 - :type: str + :type sync_status: str """ self._sync_status = sync_status @@ -150,7 +150,7 @@ def name(self, name): Agent name # noqa: E501 :param name: The name of this HubData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -173,7 +173,7 @@ def cpu(self, cpu): CPU # noqa: E501 :param cpu: The cpu of this HubData. # noqa: E501 - :type: str + :type cpu: str """ self._cpu = cpu @@ -196,7 +196,7 @@ def memory(self, memory): memory usage # noqa: E501 :param memory: The memory of this HubData. # noqa: E501 - :type: str + :type memory: str """ self._memory = memory @@ -219,37 +219,63 @@ def message(self, message): Hub Health Message # noqa: E501 :param message: The message of this HubData. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + @property + def site_name(self): + """Gets the site_name of this HubData. # noqa: E501 + + Hub Site Name # noqa: E501 + + :return: The site_name of this HubData. # noqa: E501 + :rtype: str + """ + return self._site_name + + @site_name.setter + def site_name(self, site_name): + """Sets the site_name of this HubData. + + Hub Site Name # noqa: E501 + + :param site_name: The site_name of this HubData. # noqa: E501 + :type site_name: str + """ + + self._site_name = site_name + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HubData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/hub_status.py b/src/clients/ctm_api_client/models/hub_status.py index 3cae3f8..97fefdc 100644 --- a/src/clients/ctm_api_client/models/hub_status.py +++ b/src/clients/ctm_api_client/models/hub_status.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class HubStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"status": "str"} + openapi_types = { + 'status': 'str' + } - attribute_map = {"status": "status"} + attribute_map = { + 'status': 'status' + } - def __init__(self, status=None, _configuration=None): # noqa: E501 - """HubStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 + """HubStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._status = None self.discriminator = None @@ -66,37 +74,40 @@ def status(self, status): Hub status # noqa: E501 :param status: The status of this HubStatus. # noqa: E501 - :type: str + :type status: str """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(HubStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/job.py b/src/clients/ctm_api_client/models/job.py index f69e4ea..9298a78 100644 --- a/src/clients/ctm_api_client/models/job.py +++ b/src/clients/ctm_api_client/models/job.py @@ -5,52 +5,130 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Job(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"duration": "int", "run_as": "str", "archive_rule": "str"} + openapi_types = { + 'duration': 'int', + 'run_as': 'str', + 'archive_rule': 'str', + 'job_id': 'str', + 'folder_id': 'str', + 'number_of_runs': 'int', + 'name': 'str', + 'folder': 'str', + 'type': 'str', + 'status': 'str', + 'held': 'bool', + 'deleted': 'bool', + 'cyclic': 'bool', + 'start_time': 'str', + 'end_time': 'str', + 'estimated_start_time': 'list[str]', + 'estimated_end_time': 'list[str]', + 'order_date': 'str', + 'ctm': 'str', + 'description': 'str', + 'host': 'str', + 'library': 'str', + 'application': 'str', + 'sub_application': 'str', + 'job_json': 'str', + 'output_uri': 'str', + 'log_uri': 'str' + } attribute_map = { - "duration": "duration", - "run_as": "runAs", - "archive_rule": "archiveRule", + 'duration': 'duration', + 'run_as': 'runAs', + 'archive_rule': 'archiveRule', + 'job_id': 'jobId', + 'folder_id': 'folderId', + 'number_of_runs': 'numberOfRuns', + 'name': 'name', + 'folder': 'folder', + 'type': 'type', + 'status': 'status', + 'held': 'held', + 'deleted': 'deleted', + 'cyclic': 'cyclic', + 'start_time': 'startTime', + 'end_time': 'endTime', + 'estimated_start_time': 'estimatedStartTime', + 'estimated_end_time': 'estimatedEndTime', + 'order_date': 'orderDate', + 'ctm': 'ctm', + 'description': 'description', + 'host': 'host', + 'library': 'library', + 'application': 'application', + 'sub_application': 'subApplication', + 'job_json': 'jobJSON', + 'output_uri': 'outputURI', + 'log_uri': 'logURI' } - def __init__( - self, duration=None, run_as=None, archive_rule=None, _configuration=None - ): # noqa: E501 - """Job - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, duration=None, run_as=None, archive_rule=None, job_id=None, folder_id=None, number_of_runs=None, name=None, folder=None, type=None, status=None, held=None, deleted=None, cyclic=None, start_time=None, end_time=None, estimated_start_time=None, estimated_end_time=None, order_date=None, ctm=None, description=None, host=None, library=None, application=None, sub_application=None, job_json=None, output_uri=None, log_uri=None, local_vars_configuration=None): # noqa: E501 + """Job - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._duration = None self._run_as = None self._archive_rule = None + self._job_id = None + self._folder_id = None + self._number_of_runs = None + self._name = None + self._folder = None + self._type = None + self._status = None + self._held = None + self._deleted = None + self._cyclic = None + self._start_time = None + self._end_time = None + self._estimated_start_time = None + self._estimated_end_time = None + self._order_date = None + self._ctm = None + self._description = None + self._host = None + self._library = None + self._application = None + self._sub_application = None + self._job_json = None + self._output_uri = None + self._log_uri = None self.discriminator = None if duration is not None: @@ -59,6 +137,54 @@ def __init__( self.run_as = run_as if archive_rule is not None: self.archive_rule = archive_rule + if job_id is not None: + self.job_id = job_id + if folder_id is not None: + self.folder_id = folder_id + if number_of_runs is not None: + self.number_of_runs = number_of_runs + if name is not None: + self.name = name + if folder is not None: + self.folder = folder + if type is not None: + self.type = type + if status is not None: + self.status = status + if held is not None: + self.held = held + if deleted is not None: + self.deleted = deleted + if cyclic is not None: + self.cyclic = cyclic + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + if estimated_start_time is not None: + self.estimated_start_time = estimated_start_time + if estimated_end_time is not None: + self.estimated_end_time = estimated_end_time + if order_date is not None: + self.order_date = order_date + if ctm is not None: + self.ctm = ctm + if description is not None: + self.description = description + if host is not None: + self.host = host + if library is not None: + self.library = library + if application is not None: + self.application = application + if sub_application is not None: + self.sub_application = sub_application + if job_json is not None: + self.job_json = job_json + if output_uri is not None: + self.output_uri = output_uri + if log_uri is not None: + self.log_uri = log_uri @property def duration(self): @@ -76,7 +202,7 @@ def duration(self, duration): :param duration: The duration of this Job. # noqa: E501 - :type: int + :type duration: int """ self._duration = duration @@ -97,7 +223,7 @@ def run_as(self, run_as): :param run_as: The run_as of this Job. # noqa: E501 - :type: str + :type run_as: str """ self._run_as = run_as @@ -118,37 +244,592 @@ def archive_rule(self, archive_rule): :param archive_rule: The archive_rule of this Job. # noqa: E501 - :type: str + :type archive_rule: str """ self._archive_rule = archive_rule - def to_dict(self): + @property + def job_id(self): + """Gets the job_id of this Job. # noqa: E501 + + Order ID of the job. # noqa: E501 + + :return: The job_id of this Job. # noqa: E501 + :rtype: str + """ + return self._job_id + + @job_id.setter + def job_id(self, job_id): + """Sets the job_id of this Job. + + Order ID of the job. # noqa: E501 + + :param job_id: The job_id of this Job. # noqa: E501 + :type job_id: str + """ + + self._job_id = job_id + + @property + def folder_id(self): + """Gets the folder_id of this Job. # noqa: E501 + + Order ID of the folder containing this job. # noqa: E501 + + :return: The folder_id of this Job. # noqa: E501 + :rtype: str + """ + return self._folder_id + + @folder_id.setter + def folder_id(self, folder_id): + """Sets the folder_id of this Job. + + Order ID of the folder containing this job. # noqa: E501 + + :param folder_id: The folder_id of this Job. # noqa: E501 + :type folder_id: str + """ + + self._folder_id = folder_id + + @property + def number_of_runs(self): + """Gets the number_of_runs of this Job. # noqa: E501 + + The run number (in case of cyclic jobs or reruns) # noqa: E501 + + :return: The number_of_runs of this Job. # noqa: E501 + :rtype: int + """ + return self._number_of_runs + + @number_of_runs.setter + def number_of_runs(self, number_of_runs): + """Sets the number_of_runs of this Job. + + The run number (in case of cyclic jobs or reruns) # noqa: E501 + + :param number_of_runs: The number_of_runs of this Job. # noqa: E501 + :type number_of_runs: int + """ + + self._number_of_runs = number_of_runs + + @property + def name(self): + """Gets the name of this Job. # noqa: E501 + + The name of the run job. # noqa: E501 + + :return: The name of this Job. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Job. + + The name of the run job. # noqa: E501 + + :param name: The name of this Job. # noqa: E501 + :type name: str + """ + + self._name = name + + @property + def folder(self): + """Gets the folder of this Job. # noqa: E501 + + The name of the run job. # noqa: E501 + + :return: The folder of this Job. # noqa: E501 + :rtype: str + """ + return self._folder + + @folder.setter + def folder(self, folder): + """Sets the folder of this Job. + + The name of the run job. # noqa: E501 + + :param folder: The folder of this Job. # noqa: E501 + :type folder: str + """ + + self._folder = folder + + @property + def type(self): + """Gets the type of this Job. # noqa: E501 + + The type of the run job. # noqa: E501 + + :return: The type of this Job. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Job. + + The type of the run job. # noqa: E501 + + :param type: The type of this Job. # noqa: E501 + :type type: str + """ + + self._type = type + + @property + def status(self): + """Gets the status of this Job. # noqa: E501 + + The status of the run job. # noqa: E501 + + :return: The status of this Job. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Job. + + The status of the run job. # noqa: E501 + + :param status: The status of this Job. # noqa: E501 + :type status: str + """ + + self._status = status + + @property + def held(self): + """Gets the held of this Job. # noqa: E501 + + Is job held. # noqa: E501 + + :return: The held of this Job. # noqa: E501 + :rtype: bool + """ + return self._held + + @held.setter + def held(self, held): + """Sets the held of this Job. + + Is job held. # noqa: E501 + + :param held: The held of this Job. # noqa: E501 + :type held: bool + """ + + self._held = held + + @property + def deleted(self): + """Gets the deleted of this Job. # noqa: E501 + + Is job held. # noqa: E501 + + :return: The deleted of this Job. # noqa: E501 + :rtype: bool + """ + return self._deleted + + @deleted.setter + def deleted(self, deleted): + """Sets the deleted of this Job. + + Is job held. # noqa: E501 + + :param deleted: The deleted of this Job. # noqa: E501 + :type deleted: bool + """ + + self._deleted = deleted + + @property + def cyclic(self): + """Gets the cyclic of this Job. # noqa: E501 + + Is it a cyclic job. # noqa: E501 + + :return: The cyclic of this Job. # noqa: E501 + :rtype: bool + """ + return self._cyclic + + @cyclic.setter + def cyclic(self, cyclic): + """Sets the cyclic of this Job. + + Is it a cyclic job. # noqa: E501 + + :param cyclic: The cyclic of this Job. # noqa: E501 + :type cyclic: bool + """ + + self._cyclic = cyclic + + @property + def start_time(self): + """Gets the start_time of this Job. # noqa: E501 + + The start time of the job run. # noqa: E501 + + :return: The start_time of this Job. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this Job. + + The start time of the job run. # noqa: E501 + + :param start_time: The start_time of this Job. # noqa: E501 + :type start_time: str + """ + + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this Job. # noqa: E501 + + The end time of the job run. # noqa: E501 + + :return: The end_time of this Job. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this Job. + + The end time of the job run. # noqa: E501 + + :param end_time: The end_time of this Job. # noqa: E501 + :type end_time: str + """ + + self._end_time = end_time + + @property + def estimated_start_time(self): + """Gets the estimated_start_time of this Job. # noqa: E501 + + The estimated start time of the jobs. # noqa: E501 + + :return: The estimated_start_time of this Job. # noqa: E501 + :rtype: list[str] + """ + return self._estimated_start_time + + @estimated_start_time.setter + def estimated_start_time(self, estimated_start_time): + """Sets the estimated_start_time of this Job. + + The estimated start time of the jobs. # noqa: E501 + + :param estimated_start_time: The estimated_start_time of this Job. # noqa: E501 + :type estimated_start_time: list[str] + """ + + self._estimated_start_time = estimated_start_time + + @property + def estimated_end_time(self): + """Gets the estimated_end_time of this Job. # noqa: E501 + + The estimated end time of the jobs. # noqa: E501 + + :return: The estimated_end_time of this Job. # noqa: E501 + :rtype: list[str] + """ + return self._estimated_end_time + + @estimated_end_time.setter + def estimated_end_time(self, estimated_end_time): + """Sets the estimated_end_time of this Job. + + The estimated end time of the jobs. # noqa: E501 + + :param estimated_end_time: The estimated_end_time of this Job. # noqa: E501 + :type estimated_end_time: list[str] + """ + + self._estimated_end_time = estimated_end_time + + @property + def order_date(self): + """Gets the order_date of this Job. # noqa: E501 + + The order date. # noqa: E501 + + :return: The order_date of this Job. # noqa: E501 + :rtype: str + """ + return self._order_date + + @order_date.setter + def order_date(self, order_date): + """Sets the order_date of this Job. + + The order date. # noqa: E501 + + :param order_date: The order_date of this Job. # noqa: E501 + :type order_date: str + """ + + self._order_date = order_date + + @property + def ctm(self): + """Gets the ctm of this Job. # noqa: E501 + + The controlm server. # noqa: E501 + + :return: The ctm of this Job. # noqa: E501 + :rtype: str + """ + return self._ctm + + @ctm.setter + def ctm(self, ctm): + """Sets the ctm of this Job. + + The controlm server. # noqa: E501 + + :param ctm: The ctm of this Job. # noqa: E501 + :type ctm: str + """ + + self._ctm = ctm + + @property + def description(self): + """Gets the description of this Job. # noqa: E501 + + The job description. # noqa: E501 + + :return: The description of this Job. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Job. + + The job description. # noqa: E501 + + :param description: The description of this Job. # noqa: E501 + :type description: str + """ + + self._description = description + + @property + def host(self): + """Gets the host of this Job. # noqa: E501 + + host machine where the job runs. # noqa: E501 + + :return: The host of this Job. # noqa: E501 + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this Job. + + host machine where the job runs. # noqa: E501 + + :param host: The host of this Job. # noqa: E501 + :type host: str + """ + + self._host = host + + @property + def library(self): + """Gets the library of this Job. # noqa: E501 + + The folder library. # noqa: E501 + + :return: The library of this Job. # noqa: E501 + :rtype: str + """ + return self._library + + @library.setter + def library(self, library): + """Sets the library of this Job. + + The folder library. # noqa: E501 + + :param library: The library of this Job. # noqa: E501 + :type library: str + """ + + self._library = library + + @property + def application(self): + """Gets the application of this Job. # noqa: E501 + + job application. # noqa: E501 + + :return: The application of this Job. # noqa: E501 + :rtype: str + """ + return self._application + + @application.setter + def application(self, application): + """Sets the application of this Job. + + job application. # noqa: E501 + + :param application: The application of this Job. # noqa: E501 + :type application: str + """ + + self._application = application + + @property + def sub_application(self): + """Gets the sub_application of this Job. # noqa: E501 + + job subApplication. # noqa: E501 + + :return: The sub_application of this Job. # noqa: E501 + :rtype: str + """ + return self._sub_application + + @sub_application.setter + def sub_application(self, sub_application): + """Sets the sub_application of this Job. + + job subApplication. # noqa: E501 + + :param sub_application: The sub_application of this Job. # noqa: E501 + :type sub_application: str + """ + + self._sub_application = sub_application + + @property + def job_json(self): + """Gets the job_json of this Job. # noqa: E501 + + The JSON string that describes the job. # noqa: E501 + + :return: The job_json of this Job. # noqa: E501 + :rtype: str + """ + return self._job_json + + @job_json.setter + def job_json(self, job_json): + """Sets the job_json of this Job. + + The JSON string that describes the job. # noqa: E501 + + :param job_json: The job_json of this Job. # noqa: E501 + :type job_json: str + """ + + self._job_json = job_json + + @property + def output_uri(self): + """Gets the output_uri of this Job. # noqa: E501 + + A URI that can be used to get the output of the run job # noqa: E501 + + :return: The output_uri of this Job. # noqa: E501 + :rtype: str + """ + return self._output_uri + + @output_uri.setter + def output_uri(self, output_uri): + """Sets the output_uri of this Job. + + A URI that can be used to get the output of the run job # noqa: E501 + + :param output_uri: The output_uri of this Job. # noqa: E501 + :type output_uri: str + """ + + self._output_uri = output_uri + + @property + def log_uri(self): + """Gets the log_uri of this Job. # noqa: E501 + + A URI that can be used to get the log of the run job # noqa: E501 + + :return: The log_uri of this Job. # noqa: E501 + :rtype: str + """ + return self._log_uri + + @log_uri.setter + def log_uri(self, log_uri): + """Sets the log_uri of this Job. + + A URI that can be used to get the log of the run job # noqa: E501 + + :param log_uri: The log_uri of this Job. # noqa: E501 + :type log_uri: str + """ + + self._log_uri = log_uri + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Job, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/job_level_auth.py b/src/clients/ctm_api_client/models/job_level_auth.py index 8176780..4ec3e28 100644 --- a/src/clients/ctm_api_client/models/job_level_auth.py +++ b/src/clients/ctm_api_client/models/job_level_auth.py @@ -5,52 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class JobLevelAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"privilege": "str", "application": "str", "sub_application": "str"} + openapi_types = { + 'privilege': 'str', + 'application': 'str', + 'sub_application': 'str' + } attribute_map = { - "privilege": "Privilege", - "application": "Application", - "sub_application": "SubApplication", + 'privilege': 'Privilege', + 'application': 'Application', + 'sub_application': 'SubApplication' } - def __init__( - self, - privilege=None, - application=None, - sub_application=None, - _configuration=None, - ): # noqa: E501 - """JobLevelAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, privilege=None, application=None, sub_application=None, local_vars_configuration=None): # noqa: E501 + """JobLevelAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._privilege = None self._application = None @@ -82,7 +84,7 @@ def privilege(self, privilege): access level (Full, Update, Browse) # noqa: E501 :param privilege: The privilege of this JobLevelAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege @@ -105,7 +107,7 @@ def application(self, application): job application # noqa: E501 :param application: The application of this JobLevelAuth. # noqa: E501 - :type: str + :type application: str """ self._application = application @@ -128,37 +130,40 @@ def sub_application(self, sub_application): job sub application # noqa: E501 :param sub_application: The sub_application of this JobLevelAuth. # noqa: E501 - :type: str + :type sub_application: str """ self._sub_application = sub_application - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(JobLevelAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/job_run_status.py b/src/clients/ctm_api_client/models/job_run_status.py index 82d849f..c2dd712 100644 --- a/src/clients/ctm_api_client/models/job_run_status.py +++ b/src/clients/ctm_api_client/models/job_run_status.py @@ -5,116 +5,96 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class JobRunStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "job_id": "str", - "folder_id": "str", - "number_of_runs": "int", - "name": "str", - "folder": "str", - "type": "str", - "status": "str", - "held": "bool", - "deleted": "bool", - "cyclic": "bool", - "start_time": "str", - "end_time": "str", - "estimated_start_time": "list[str]", - "estimated_end_time": "list[str]", - "order_date": "str", - "ctm": "str", - "description": "str", - "host": "str", - "application": "str", - "sub_application": "str", - "job_json": "str", - "output_uri": "str", - "log_uri": "str", + openapi_types = { + 'job_id': 'str', + 'folder_id': 'str', + 'number_of_runs': 'int', + 'name': 'str', + 'folder': 'str', + 'type': 'str', + 'status': 'str', + 'held': 'bool', + 'deleted': 'bool', + 'cyclic': 'bool', + 'start_time': 'str', + 'end_time': 'str', + 'estimated_start_time': 'list[str]', + 'estimated_end_time': 'list[str]', + 'order_date': 'str', + 'ctm': 'str', + 'description': 'str', + 'host': 'str', + 'library': 'str', + 'application': 'str', + 'sub_application': 'str', + 'job_json': 'str', + 'output_uri': 'str', + 'log_uri': 'str' } attribute_map = { - "job_id": "jobId", - "folder_id": "folderId", - "number_of_runs": "numberOfRuns", - "name": "name", - "folder": "folder", - "type": "type", - "status": "status", - "held": "held", - "deleted": "deleted", - "cyclic": "cyclic", - "start_time": "startTime", - "end_time": "endTime", - "estimated_start_time": "estimatedStartTime", - "estimated_end_time": "estimatedEndTime", - "order_date": "orderDate", - "ctm": "ctm", - "description": "description", - "host": "host", - "application": "application", - "sub_application": "subApplication", - "job_json": "jobJSON", - "output_uri": "outputURI", - "log_uri": "logURI", + 'job_id': 'jobId', + 'folder_id': 'folderId', + 'number_of_runs': 'numberOfRuns', + 'name': 'name', + 'folder': 'folder', + 'type': 'type', + 'status': 'status', + 'held': 'held', + 'deleted': 'deleted', + 'cyclic': 'cyclic', + 'start_time': 'startTime', + 'end_time': 'endTime', + 'estimated_start_time': 'estimatedStartTime', + 'estimated_end_time': 'estimatedEndTime', + 'order_date': 'orderDate', + 'ctm': 'ctm', + 'description': 'description', + 'host': 'host', + 'library': 'library', + 'application': 'application', + 'sub_application': 'subApplication', + 'job_json': 'jobJSON', + 'output_uri': 'outputURI', + 'log_uri': 'logURI' } - def __init__( - self, - job_id=None, - folder_id=None, - number_of_runs=None, - name=None, - folder=None, - type=None, - status=None, - held=None, - deleted=None, - cyclic=None, - start_time=None, - end_time=None, - estimated_start_time=None, - estimated_end_time=None, - order_date=None, - ctm=None, - description=None, - host=None, - application=None, - sub_application=None, - job_json=None, - output_uri=None, - log_uri=None, - _configuration=None, - ): # noqa: E501 - """JobRunStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, job_id=None, folder_id=None, number_of_runs=None, name=None, folder=None, type=None, status=None, held=None, deleted=None, cyclic=None, start_time=None, end_time=None, estimated_start_time=None, estimated_end_time=None, order_date=None, ctm=None, description=None, host=None, library=None, application=None, sub_application=None, job_json=None, output_uri=None, log_uri=None, local_vars_configuration=None): # noqa: E501 + """JobRunStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._job_id = None self._folder_id = None @@ -134,6 +114,7 @@ def __init__( self._ctm = None self._description = None self._host = None + self._library = None self._application = None self._sub_application = None self._job_json = None @@ -176,6 +157,8 @@ def __init__( self.description = description if host is not None: self.host = host + if library is not None: + self.library = library if application is not None: self.application = application if sub_application is not None: @@ -205,12 +188,10 @@ def job_id(self, job_id): Order ID of the job. # noqa: E501 :param job_id: The job_id of this JobRunStatus. # noqa: E501 - :type: str + :type job_id: str """ - if self._configuration.client_side_validation and job_id is None: - raise ValueError( - "Invalid value for `job_id`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and job_id is None: # noqa: E501 + raise ValueError("Invalid value for `job_id`, must not be `None`") # noqa: E501 self._job_id = job_id @@ -232,7 +213,7 @@ def folder_id(self, folder_id): Order ID of the folder containing this job. # noqa: E501 :param folder_id: The folder_id of this JobRunStatus. # noqa: E501 - :type: str + :type folder_id: str """ self._folder_id = folder_id @@ -255,7 +236,7 @@ def number_of_runs(self, number_of_runs): The run number (in case of cyclic jobs or reruns) # noqa: E501 :param number_of_runs: The number_of_runs of this JobRunStatus. # noqa: E501 - :type: int + :type number_of_runs: int """ self._number_of_runs = number_of_runs @@ -278,7 +259,7 @@ def name(self, name): The name of the run job. # noqa: E501 :param name: The name of this JobRunStatus. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -301,7 +282,7 @@ def folder(self, folder): The name of the run job. # noqa: E501 :param folder: The folder of this JobRunStatus. # noqa: E501 - :type: str + :type folder: str """ self._folder = folder @@ -324,7 +305,7 @@ def type(self, type): The type of the run job. # noqa: E501 :param type: The type of this JobRunStatus. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -347,7 +328,7 @@ def status(self, status): The status of the run job. # noqa: E501 :param status: The status of this JobRunStatus. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -370,7 +351,7 @@ def held(self, held): Is job held. # noqa: E501 :param held: The held of this JobRunStatus. # noqa: E501 - :type: bool + :type held: bool """ self._held = held @@ -393,7 +374,7 @@ def deleted(self, deleted): Is job held. # noqa: E501 :param deleted: The deleted of this JobRunStatus. # noqa: E501 - :type: bool + :type deleted: bool """ self._deleted = deleted @@ -416,7 +397,7 @@ def cyclic(self, cyclic): Is it a cyclic job. # noqa: E501 :param cyclic: The cyclic of this JobRunStatus. # noqa: E501 - :type: bool + :type cyclic: bool """ self._cyclic = cyclic @@ -439,7 +420,7 @@ def start_time(self, start_time): The start time of the job run. # noqa: E501 :param start_time: The start_time of this JobRunStatus. # noqa: E501 - :type: str + :type start_time: str """ self._start_time = start_time @@ -462,7 +443,7 @@ def end_time(self, end_time): The end time of the job run. # noqa: E501 :param end_time: The end_time of this JobRunStatus. # noqa: E501 - :type: str + :type end_time: str """ self._end_time = end_time @@ -485,7 +466,7 @@ def estimated_start_time(self, estimated_start_time): The estimated start time of the jobs. # noqa: E501 :param estimated_start_time: The estimated_start_time of this JobRunStatus. # noqa: E501 - :type: list[str] + :type estimated_start_time: list[str] """ self._estimated_start_time = estimated_start_time @@ -508,7 +489,7 @@ def estimated_end_time(self, estimated_end_time): The estimated end time of the jobs. # noqa: E501 :param estimated_end_time: The estimated_end_time of this JobRunStatus. # noqa: E501 - :type: list[str] + :type estimated_end_time: list[str] """ self._estimated_end_time = estimated_end_time @@ -531,7 +512,7 @@ def order_date(self, order_date): The order date. # noqa: E501 :param order_date: The order_date of this JobRunStatus. # noqa: E501 - :type: str + :type order_date: str """ self._order_date = order_date @@ -554,7 +535,7 @@ def ctm(self, ctm): The controlm server. # noqa: E501 :param ctm: The ctm of this JobRunStatus. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -577,7 +558,7 @@ def description(self, description): The job description. # noqa: E501 :param description: The description of this JobRunStatus. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -600,11 +581,34 @@ def host(self, host): host machine where the job runs. # noqa: E501 :param host: The host of this JobRunStatus. # noqa: E501 - :type: str + :type host: str """ self._host = host + @property + def library(self): + """Gets the library of this JobRunStatus. # noqa: E501 + + The folder library. # noqa: E501 + + :return: The library of this JobRunStatus. # noqa: E501 + :rtype: str + """ + return self._library + + @library.setter + def library(self, library): + """Sets the library of this JobRunStatus. + + The folder library. # noqa: E501 + + :param library: The library of this JobRunStatus. # noqa: E501 + :type library: str + """ + + self._library = library + @property def application(self): """Gets the application of this JobRunStatus. # noqa: E501 @@ -623,7 +627,7 @@ def application(self, application): job application. # noqa: E501 :param application: The application of this JobRunStatus. # noqa: E501 - :type: str + :type application: str """ self._application = application @@ -646,7 +650,7 @@ def sub_application(self, sub_application): job subApplication. # noqa: E501 :param sub_application: The sub_application of this JobRunStatus. # noqa: E501 - :type: str + :type sub_application: str """ self._sub_application = sub_application @@ -669,7 +673,7 @@ def job_json(self, job_json): The JSON string that describes the job. # noqa: E501 :param job_json: The job_json of this JobRunStatus. # noqa: E501 - :type: str + :type job_json: str """ self._job_json = job_json @@ -692,7 +696,7 @@ def output_uri(self, output_uri): A URI that can be used to get the output of the run job # noqa: E501 :param output_uri: The output_uri of this JobRunStatus. # noqa: E501 - :type: str + :type output_uri: str """ self._output_uri = output_uri @@ -715,37 +719,40 @@ def log_uri(self, log_uri): A URI that can be used to get the log of the run job # noqa: E501 :param log_uri: The log_uri of this JobRunStatus. # noqa: E501 - :type: str + :type log_uri: str """ self._log_uri = log_uri - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(JobRunStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/job_status_result.py b/src/clients/ctm_api_client/models/job_status_result.py index ba2fe01..9977e5f 100644 --- a/src/clients/ctm_api_client/models/job_status_result.py +++ b/src/clients/ctm_api_client/models/job_status_result.py @@ -5,75 +5,70 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class JobStatusResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "statuses": "list[JobRunStatus]", - "start_index": "int", - "items_per_page": "int", - "returned": "int", - "total": "int", - "sort": "str", - "next_uri": "str", - "prev_uri": "str", - "monitor_page_uri": "str", + openapi_types = { + 'completion': 'str', + 'statuses': 'list[JobRunStatus]', + 'start_index': 'int', + 'items_per_page': 'int', + 'returned': 'int', + 'total': 'int', + 'sort': 'str', + 'next_uri': 'str', + 'prev_uri': 'str', + 'monitor_page_uri': 'str' } attribute_map = { - "statuses": "statuses", - "start_index": "startIndex", - "items_per_page": "itemsPerPage", - "returned": "returned", - "total": "total", - "sort": "sort", - "next_uri": "nextURI", - "prev_uri": "prevURI", - "monitor_page_uri": "monitorPageURI", + 'completion': 'completion', + 'statuses': 'statuses', + 'start_index': 'startIndex', + 'items_per_page': 'itemsPerPage', + 'returned': 'returned', + 'total': 'total', + 'sort': 'sort', + 'next_uri': 'nextURI', + 'prev_uri': 'prevURI', + 'monitor_page_uri': 'monitorPageURI' } - def __init__( - self, - statuses=None, - start_index=None, - items_per_page=None, - returned=None, - total=None, - sort=None, - next_uri=None, - prev_uri=None, - monitor_page_uri=None, - _configuration=None, - ): # noqa: E501 - """JobStatusResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completion=None, statuses=None, start_index=None, items_per_page=None, returned=None, total=None, sort=None, next_uri=None, prev_uri=None, monitor_page_uri=None, local_vars_configuration=None): # noqa: E501 + """JobStatusResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self._completion = None self._statuses = None self._start_index = None self._items_per_page = None @@ -85,6 +80,8 @@ def __init__( self._monitor_page_uri = None self.discriminator = None + if completion is not None: + self.completion = completion if statuses is not None: self.statuses = statuses if start_index is not None: @@ -104,6 +101,33 @@ def __init__( if monitor_page_uri is not None: self.monitor_page_uri = monitor_page_uri + @property + def completion(self): + """Gets the completion of this JobStatusResult. # noqa: E501 + + + :return: The completion of this JobStatusResult. # noqa: E501 + :rtype: str + """ + return self._completion + + @completion.setter + def completion(self, completion): + """Sets the completion of this JobStatusResult. + + + :param completion: The completion of this JobStatusResult. # noqa: E501 + :type completion: str + """ + allowed_values = ["Completed", "Pending"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and completion not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `completion` ({0}), must be one of {1}" # noqa: E501 + .format(completion, allowed_values) + ) + + self._completion = completion + @property def statuses(self): """Gets the statuses of this JobStatusResult. # noqa: E501 @@ -122,7 +146,7 @@ def statuses(self, statuses): The list of statuses tracked by the given runId. # noqa: E501 :param statuses: The statuses of this JobStatusResult. # noqa: E501 - :type: list[JobRunStatus] + :type statuses: list[JobRunStatus] """ self._statuses = statuses @@ -145,7 +169,7 @@ def start_index(self, start_index): The index of the first item in the list. # noqa: E501 :param start_index: The start_index of this JobStatusResult. # noqa: E501 - :type: int + :type start_index: int """ self._start_index = start_index @@ -168,7 +192,7 @@ def items_per_page(self, items_per_page): The maximum number of items returned by each status request. # noqa: E501 :param items_per_page: The items_per_page of this JobStatusResult. # noqa: E501 - :type: int + :type items_per_page: int """ self._items_per_page = items_per_page @@ -191,7 +215,7 @@ def returned(self, returned): The number of the return items by the search. # noqa: E501 :param returned: The returned of this JobStatusResult. # noqa: E501 - :type: int + :type returned: int """ self._returned = returned @@ -214,7 +238,7 @@ def total(self, total): The total number of items. # noqa: E501 :param total: The total of this JobStatusResult. # noqa: E501 - :type: int + :type total: int """ self._total = total @@ -237,7 +261,7 @@ def sort(self, sort): The field the list is sorted by. # noqa: E501 :param sort: The sort of this JobStatusResult. # noqa: E501 - :type: str + :type sort: str """ self._sort = sort @@ -260,7 +284,7 @@ def next_uri(self, next_uri): URI to get the next items in the list, if any. # noqa: E501 :param next_uri: The next_uri of this JobStatusResult. # noqa: E501 - :type: str + :type next_uri: str """ self._next_uri = next_uri @@ -283,7 +307,7 @@ def prev_uri(self, prev_uri): URI to get the previous items in the list, if any. # noqa: E501 :param prev_uri: The prev_uri of this JobStatusResult. # noqa: E501 - :type: str + :type prev_uri: str """ self._prev_uri = prev_uri @@ -306,37 +330,40 @@ def monitor_page_uri(self, monitor_page_uri): A URI to a page displaying the workflow run live. # noqa: E501 :param monitor_page_uri: The monitor_page_uri of this JobStatusResult. # noqa: E501 - :type: str + :type monitor_page_uri: str """ self._monitor_page_uri = monitor_page_uri - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(JobStatusResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/jobtype_agent.py b/src/clients/ctm_api_client/models/jobtype_agent.py index c2f3cc5..9fac49b 100644 --- a/src/clients/ctm_api_client/models/jobtype_agent.py +++ b/src/clients/ctm_api_client/models/jobtype_agent.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class JobtypeAgent(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"server": "str", "agent": "str"} - - attribute_map = {"server": "server", "agent": "agent"} - - def __init__(self, server=None, agent=None, _configuration=None): # noqa: E501 - """JobtypeAgent - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'server': 'str', + 'agent': 'str' + } + + attribute_map = { + 'server': 'server', + 'agent': 'agent' + } + + def __init__(self, server=None, agent=None, local_vars_configuration=None): # noqa: E501 + """JobtypeAgent - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._server = None self._agent = None @@ -69,7 +79,7 @@ def server(self, server): Server name # noqa: E501 :param server: The server of this JobtypeAgent. # noqa: E501 - :type: str + :type server: str """ self._server = server @@ -92,37 +102,40 @@ def agent(self, agent): Agent name # noqa: E501 :param agent: The agent of this JobtypeAgent. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(JobtypeAgent, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/key_value.py b/src/clients/ctm_api_client/models/key_value.py index d806946..b3808dc 100644 --- a/src/clients/ctm_api_client/models/key_value.py +++ b/src/clients/ctm_api_client/models/key_value.py @@ -5,80 +5,82 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class KeyValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "value": "str", - "default_value": "str", - "validation": "str", - "category": "str", - "description": "str", - "err_msg": "str", - "verification": "str", - "table": "str", - "type": "str", - "limits": "str", + openapi_types = { + 'name': 'str', + 'value': 'str', + 'default_value': 'str', + 'validation': 'str', + 'category': 'str', + 'description': 'str', + 'err_msg': 'str', + 'verification': 'str', + 'table': 'str', + 'type': 'str', + 'limits': 'str', + 'refresh': 'str', + 'refresh_type_description': 'str', + 'last_updated': 'str', + 'component': 'str', + 'component_type': 'str', + 'component_host': 'str' } attribute_map = { - "name": "name", - "value": "value", - "default_value": "defaultValue", - "validation": "validation", - "category": "category", - "description": "description", - "err_msg": "errMsg", - "verification": "verification", - "table": "table", - "type": "type", - "limits": "limits", + 'name': 'name', + 'value': 'value', + 'default_value': 'defaultValue', + 'validation': 'validation', + 'category': 'category', + 'description': 'description', + 'err_msg': 'errMsg', + 'verification': 'verification', + 'table': 'table', + 'type': 'type', + 'limits': 'limits', + 'refresh': 'refresh', + 'refresh_type_description': 'refreshTypeDescription', + 'last_updated': 'LastUpdated', + 'component': 'component', + 'component_type': 'componentType', + 'component_host': 'componentHost' } - def __init__( - self, - name=None, - value=None, - default_value=None, - validation=None, - category=None, - description=None, - err_msg=None, - verification=None, - table=None, - type=None, - limits=None, - _configuration=None, - ): # noqa: E501 - """KeyValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, value=None, default_value=None, validation=None, category=None, description=None, err_msg=None, verification=None, table=None, type=None, limits=None, refresh=None, refresh_type_description=None, last_updated=None, component=None, component_type=None, component_host=None, local_vars_configuration=None): # noqa: E501 + """KeyValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -91,6 +93,12 @@ def __init__( self._table = None self._type = None self._limits = None + self._refresh = None + self._refresh_type_description = None + self._last_updated = None + self._component = None + self._component_type = None + self._component_host = None self.discriminator = None self.name = name @@ -113,6 +121,18 @@ def __init__( self.type = type if limits is not None: self.limits = limits + if refresh is not None: + self.refresh = refresh + if refresh_type_description is not None: + self.refresh_type_description = refresh_type_description + if last_updated is not None: + self.last_updated = last_updated + if component is not None: + self.component = component + if component_type is not None: + self.component_type = component_type + if component_host is not None: + self.component_host = component_host @property def name(self): @@ -132,12 +152,10 @@ def name(self, name): Unique key # noqa: E501 :param name: The name of this KeyValue. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -159,12 +177,10 @@ def value(self, value): Any value in string form. # noqa: E501 :param value: The value of this KeyValue. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value @@ -186,7 +202,7 @@ def default_value(self, default_value): The default value if exist. # noqa: E501 :param default_value: The default_value of this KeyValue. # noqa: E501 - :type: str + :type default_value: str """ self._default_value = default_value @@ -209,7 +225,7 @@ def validation(self, validation): The validation type number. # noqa: E501 :param validation: The validation of this KeyValue. # noqa: E501 - :type: str + :type validation: str """ self._validation = validation @@ -232,7 +248,7 @@ def category(self, category): The category of the parameter. # noqa: E501 :param category: The category of this KeyValue. # noqa: E501 - :type: str + :type category: str """ self._category = category @@ -255,7 +271,7 @@ def description(self, description): The description of the parameter. # noqa: E501 :param description: The description of this KeyValue. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -278,7 +294,7 @@ def err_msg(self, err_msg): The error message of the parameter. # noqa: E501 :param err_msg: The err_msg of this KeyValue. # noqa: E501 - :type: str + :type err_msg: str """ self._err_msg = err_msg @@ -301,7 +317,7 @@ def verification(self, verification): The verification type of the parameter. # noqa: E501 :param verification: The verification of this KeyValue. # noqa: E501 - :type: str + :type verification: str """ self._verification = verification @@ -324,7 +340,7 @@ def table(self, table): The table the parameter belongs to. # noqa: E501 :param table: The table of this KeyValue. # noqa: E501 - :type: str + :type table: str """ self._table = table @@ -347,7 +363,7 @@ def type(self, type): The parameter type. # noqa: E501 :param type: The type of this KeyValue. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -370,37 +386,178 @@ def limits(self, limits): The validation limits of the parameter. # noqa: E501 :param limits: The limits of this KeyValue. # noqa: E501 - :type: str + :type limits: str """ self._limits = limits - def to_dict(self): + @property + def refresh(self): + """Gets the refresh of this KeyValue. # noqa: E501 + + The server needs to undergo a 'refresh' process in order for the new value of the system parameter to become effective. # noqa: E501 + + :return: The refresh of this KeyValue. # noqa: E501 + :rtype: str + """ + return self._refresh + + @refresh.setter + def refresh(self, refresh): + """Sets the refresh of this KeyValue. + + The server needs to undergo a 'refresh' process in order for the new value of the system parameter to become effective. # noqa: E501 + + :param refresh: The refresh of this KeyValue. # noqa: E501 + :type refresh: str + """ + + self._refresh = refresh + + @property + def refresh_type_description(self): + """Gets the refresh_type_description of this KeyValue. # noqa: E501 + + Explanation about the refresh type's process that should be done. # noqa: E501 + + :return: The refresh_type_description of this KeyValue. # noqa: E501 + :rtype: str + """ + return self._refresh_type_description + + @refresh_type_description.setter + def refresh_type_description(self, refresh_type_description): + """Sets the refresh_type_description of this KeyValue. + + Explanation about the refresh type's process that should be done. # noqa: E501 + + :param refresh_type_description: The refresh_type_description of this KeyValue. # noqa: E501 + :type refresh_type_description: str + """ + + self._refresh_type_description = refresh_type_description + + @property + def last_updated(self): + """Gets the last_updated of this KeyValue. # noqa: E501 + + The component type. # noqa: E501 + + :return: The last_updated of this KeyValue. # noqa: E501 + :rtype: str + """ + return self._last_updated + + @last_updated.setter + def last_updated(self, last_updated): + """Sets the last_updated of this KeyValue. + + The component type. # noqa: E501 + + :param last_updated: The last_updated of this KeyValue. # noqa: E501 + :type last_updated: str + """ + + self._last_updated = last_updated + + @property + def component(self): + """Gets the component of this KeyValue. # noqa: E501 + + The component in the mainframe. # noqa: E501 + + :return: The component of this KeyValue. # noqa: E501 + :rtype: str + """ + return self._component + + @component.setter + def component(self, component): + """Sets the component of this KeyValue. + + The component in the mainframe. # noqa: E501 + + :param component: The component of this KeyValue. # noqa: E501 + :type component: str + """ + + self._component = component + + @property + def component_type(self): + """Gets the component_type of this KeyValue. # noqa: E501 + + The component type. # noqa: E501 + + :return: The component_type of this KeyValue. # noqa: E501 + :rtype: str + """ + return self._component_type + + @component_type.setter + def component_type(self, component_type): + """Sets the component_type of this KeyValue. + + The component type. # noqa: E501 + + :param component_type: The component_type of this KeyValue. # noqa: E501 + :type component_type: str + """ + + self._component_type = component_type + + @property + def component_host(self): + """Gets the component_host of this KeyValue. # noqa: E501 + + The component host. # noqa: E501 + + :return: The component_host of this KeyValue. # noqa: E501 + :rtype: str + """ + return self._component_host + + @component_host.setter + def component_host(self, component_host): + """Sets the component_host of this KeyValue. + + The component host. # noqa: E501 + + :param component_host: The component_host of this KeyValue. # noqa: E501 + :type component_host: str + """ + + self._component_host = component_host + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(KeyValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/key_value_list_result.py b/src/clients/ctm_api_client/models/key_value_list_result.py deleted file mode 100644 index 399a768..0000000 --- a/src/clients/ctm_api_client/models/key_value_list_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class KeyValueListResult(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """KeyValueListResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(KeyValueListResult, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KeyValueListResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KeyValueListResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/key_value_type.py b/src/clients/ctm_api_client/models/key_value_type.py index 3c3f473..9d056a8 100644 --- a/src/clients/ctm_api_client/models/key_value_type.py +++ b/src/clients/ctm_api_client/models/key_value_type.py @@ -5,54 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class KeyValueType(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "value": "str", - "default_value": "str", - "type": "str", + openapi_types = { + 'name': 'str', + 'value': 'str', + 'default_value': 'str', + 'type': 'str' } attribute_map = { - "name": "name", - "value": "value", - "default_value": "defaultValue", - "type": "type", + 'name': 'name', + 'value': 'value', + 'default_value': 'defaultValue', + 'type': 'type' } - def __init__( - self, name=None, value=None, default_value=None, type=None, _configuration=None - ): # noqa: E501 - """KeyValueType - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, value=None, default_value=None, type=None, local_vars_configuration=None): # noqa: E501 + """KeyValueType - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -85,12 +87,10 @@ def name(self, name): Unique key # noqa: E501 :param name: The name of this KeyValueType. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -112,12 +112,10 @@ def value(self, value): Any value in string form. # noqa: E501 :param value: The value of this KeyValueType. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value @@ -139,7 +137,7 @@ def default_value(self, default_value): The default value if exist. # noqa: E501 :param default_value: The default_value of this KeyValueType. # noqa: E501 - :type: str + :type default_value: str """ self._default_value = default_value @@ -162,37 +160,40 @@ def type(self, type): the type of the request. # noqa: E501 :param type: The type of this KeyValueType. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(KeyValueType, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/key_value_type_list_result.py b/src/clients/ctm_api_client/models/key_value_type_list_result.py deleted file mode 100644 index 1c25de3..0000000 --- a/src/clients/ctm_api_client/models/key_value_type_list_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class KeyValueTypeListResult(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """KeyValueTypeListResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(KeyValueTypeListResult, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KeyValueTypeListResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KeyValueTypeListResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/known_hosts.py b/src/clients/ctm_api_client/models/known_hosts.py index 22f480b..d256e36 100644 --- a/src/clients/ctm_api_client/models/known_hosts.py +++ b/src/clients/ctm_api_client/models/known_hosts.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class KnownHosts(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"hosts": "list[str]", "clusters": "list[str]"} - - attribute_map = {"hosts": "hosts", "clusters": "clusters"} - - def __init__(self, hosts=None, clusters=None, _configuration=None): # noqa: E501 - """KnownHosts - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'hosts': 'list[str]', + 'clusters': 'list[str]' + } + + attribute_map = { + 'hosts': 'hosts', + 'clusters': 'clusters' + } + + def __init__(self, hosts=None, clusters=None, local_vars_configuration=None): # noqa: E501 + """KnownHosts - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._hosts = None self._clusters = None @@ -67,7 +77,7 @@ def hosts(self, hosts): :param hosts: The hosts of this KnownHosts. # noqa: E501 - :type: list[str] + :type hosts: list[str] """ self._hosts = hosts @@ -88,37 +98,40 @@ def clusters(self, clusters): :param clusters: The clusters of this KnownHosts. # noqa: E501 - :type: list[str] + :type clusters: list[str] """ self._clusters = clusters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(KnownHosts, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ldap_domain_settings.py b/src/clients/ctm_api_client/models/ldap_domain_settings.py index 6487b8b..335d7be 100644 --- a/src/clients/ctm_api_client/models/ldap_domain_settings.py +++ b/src/clients/ctm_api_client/models/ldap_domain_settings.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LdapDomainSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "domain_name": "str", - "directory_search_user": "str", - "directory_search_password": "str", - "communication_protocol": "str", - "directory_server_type": "str", - "server_host_name_and_port": "list[HostnamePortPair]", - "directory_search_base": "list[str]", + openapi_types = { + 'domain_name': 'str', + 'directory_search_user': 'str', + 'directory_search_password': 'str', + 'communication_protocol': 'str', + 'directory_server_type': 'str', + 'server_host_name_and_port': 'list[HostnamePortPair]', + 'directory_search_base': 'list[str]' } attribute_map = { - "domain_name": "domainName", - "directory_search_user": "directorySearchUser", - "directory_search_password": "directorySearchPassword", - "communication_protocol": "communicationProtocol", - "directory_server_type": "directoryServerType", - "server_host_name_and_port": "serverHostNameAndPort", - "directory_search_base": "directorySearchBase", + 'domain_name': 'domainName', + 'directory_search_user': 'directorySearchUser', + 'directory_search_password': 'directorySearchPassword', + 'communication_protocol': 'communicationProtocol', + 'directory_server_type': 'directoryServerType', + 'server_host_name_and_port': 'serverHostNameAndPort', + 'directory_search_base': 'directorySearchBase' } - def __init__( - self, - domain_name=None, - directory_search_user=None, - directory_search_password=None, - communication_protocol=None, - directory_server_type=None, - server_host_name_and_port=None, - directory_search_base=None, - _configuration=None, - ): # noqa: E501 - """LdapDomainSettings - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, domain_name=None, directory_search_user=None, directory_search_password=None, communication_protocol=None, directory_server_type=None, server_host_name_and_port=None, directory_search_base=None, local_vars_configuration=None): # noqa: E501 + """LdapDomainSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._domain_name = None self._directory_search_user = None @@ -108,7 +102,7 @@ def domain_name(self, domain_name): :param domain_name: The domain_name of this LdapDomainSettings. # noqa: E501 - :type: str + :type domain_name: str """ self._domain_name = domain_name @@ -129,7 +123,7 @@ def directory_search_user(self, directory_search_user): :param directory_search_user: The directory_search_user of this LdapDomainSettings. # noqa: E501 - :type: str + :type directory_search_user: str """ self._directory_search_user = directory_search_user @@ -150,7 +144,7 @@ def directory_search_password(self, directory_search_password): :param directory_search_password: The directory_search_password of this LdapDomainSettings. # noqa: E501 - :type: str + :type directory_search_password: str """ self._directory_search_password = directory_search_password @@ -171,7 +165,7 @@ def communication_protocol(self, communication_protocol): :param communication_protocol: The communication_protocol of this LdapDomainSettings. # noqa: E501 - :type: str + :type communication_protocol: str """ self._communication_protocol = communication_protocol @@ -192,7 +186,7 @@ def directory_server_type(self, directory_server_type): :param directory_server_type: The directory_server_type of this LdapDomainSettings. # noqa: E501 - :type: str + :type directory_server_type: str """ self._directory_server_type = directory_server_type @@ -213,7 +207,7 @@ def server_host_name_and_port(self, server_host_name_and_port): :param server_host_name_and_port: The server_host_name_and_port of this LdapDomainSettings. # noqa: E501 - :type: list[HostnamePortPair] + :type server_host_name_and_port: list[HostnamePortPair] """ self._server_host_name_and_port = server_host_name_and_port @@ -234,37 +228,40 @@ def directory_search_base(self, directory_search_base): :param directory_search_base: The directory_search_base of this LdapDomainSettings. # noqa: E501 - :type: list[str] + :type directory_search_base: list[str] """ self._directory_search_base = directory_search_base - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LdapDomainSettings, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/log.py b/src/clients/ctm_api_client/models/log.py index b0c9828..7d68e37 100644 --- a/src/clients/ctm_api_client/models/log.py +++ b/src/clients/ctm_api_client/models/log.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Log(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"log": "str"} + openapi_types = { + 'log': 'str' + } - attribute_map = {"log": "log"} + attribute_map = { + 'log': 'log' + } - def __init__(self, log=None, _configuration=None): # noqa: E501 - """Log - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, log=None, local_vars_configuration=None): # noqa: E501 + """Log - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._log = None self.discriminator = None @@ -64,37 +72,40 @@ def log(self, log): :param log: The log of this Log. # noqa: E501 - :type: str + :type log: str """ self._log = log - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Log, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/log_data_arguments.py b/src/clients/ctm_api_client/models/log_data_arguments.py index e58cf2b..96b7a02 100644 --- a/src/clients/ctm_api_client/models/log_data_arguments.py +++ b/src/clients/ctm_api_client/models/log_data_arguments.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LogDataArguments(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value_str": "str"} + openapi_types = { + 'value_str': 'str' + } - attribute_map = {"value_str": "value_str"} + attribute_map = { + 'value_str': 'value_str' + } - def __init__(self, value_str=None, _configuration=None): # noqa: E501 - """LogDataArguments - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value_str=None, local_vars_configuration=None): # noqa: E501 + """LogDataArguments - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value_str = None self.discriminator = None @@ -64,37 +72,40 @@ def value_str(self, value_str): :param value_str: The value_str of this LogDataArguments. # noqa: E501 - :type: str + :type value_str: str """ self._value_str = value_str - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LogDataArguments, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/log_job_parameters.py b/src/clients/ctm_api_client/models/log_job_parameters.py index 5f4bf96..21f8b85 100644 --- a/src/clients/ctm_api_client/models/log_job_parameters.py +++ b/src/clients/ctm_api_client/models/log_job_parameters.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LogJobParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "from_rerun_count": "str", - "order_id": "str", - "to_rerun_count": "str", + openapi_types = { + 'from_rerun_count': 'str', + 'order_id': 'str', + 'to_rerun_count': 'str' } attribute_map = { - "from_rerun_count": "from_rerun_count", - "order_id": "order_id", - "to_rerun_count": "to_rerun_count", + 'from_rerun_count': 'from_rerun_count', + 'order_id': 'order_id', + 'to_rerun_count': 'to_rerun_count' } - def __init__( - self, - from_rerun_count=None, - order_id=None, - to_rerun_count=None, - _configuration=None, - ): # noqa: E501 - """LogJobParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, from_rerun_count=None, order_id=None, to_rerun_count=None, local_vars_configuration=None): # noqa: E501 + """LogJobParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._from_rerun_count = None self._order_id = None @@ -84,7 +82,7 @@ def from_rerun_count(self, from_rerun_count): :param from_rerun_count: The from_rerun_count of this LogJobParameters. # noqa: E501 - :type: str + :type from_rerun_count: str """ self._from_rerun_count = from_rerun_count @@ -105,7 +103,7 @@ def order_id(self, order_id): :param order_id: The order_id of this LogJobParameters. # noqa: E501 - :type: str + :type order_id: str """ self._order_id = order_id @@ -126,37 +124,40 @@ def to_rerun_count(self, to_rerun_count): :param to_rerun_count: The to_rerun_count of this LogJobParameters. # noqa: E501 - :type: str + :type to_rerun_count: str """ self._to_rerun_count = to_rerun_count - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LogJobParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/log_job_result_item.py b/src/clients/ctm_api_client/models/log_job_result_item.py index 32d3014..a91c916 100644 --- a/src/clients/ctm_api_client/models/log_job_result_item.py +++ b/src/clients/ctm_api_client/models/log_job_result_item.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LogJobResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "data_arguments": "list[LogDataArguments]", - "formatted_message": "str", - "full_line": "str", - "local_timestamp_iso8601": "str", - "message": "str", - "message_code": "str", + openapi_types = { + 'data_arguments': 'list[LogDataArguments]', + 'formatted_message': 'str', + 'full_line': 'str', + 'local_timestamp_iso8601': 'str', + 'message': 'str', + 'message_code': 'str' } attribute_map = { - "data_arguments": "data_arguments", - "formatted_message": "formatted_message", - "full_line": "full_line", - "local_timestamp_iso8601": "local_timestamp_iso8601", - "message": "message", - "message_code": "message_code", + 'data_arguments': 'data_arguments', + 'formatted_message': 'formatted_message', + 'full_line': 'full_line', + 'local_timestamp_iso8601': 'local_timestamp_iso8601', + 'message': 'message', + 'message_code': 'message_code' } - def __init__( - self, - data_arguments=None, - formatted_message=None, - full_line=None, - local_timestamp_iso8601=None, - message=None, - message_code=None, - _configuration=None, - ): # noqa: E501 - """LogJobResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, data_arguments=None, formatted_message=None, full_line=None, local_timestamp_iso8601=None, message=None, message_code=None, local_vars_configuration=None): # noqa: E501 + """LogJobResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._data_arguments = None self._formatted_message = None @@ -102,7 +97,7 @@ def data_arguments(self, data_arguments): :param data_arguments: The data_arguments of this LogJobResultItem. # noqa: E501 - :type: list[LogDataArguments] + :type data_arguments: list[LogDataArguments] """ self._data_arguments = data_arguments @@ -123,7 +118,7 @@ def formatted_message(self, formatted_message): :param formatted_message: The formatted_message of this LogJobResultItem. # noqa: E501 - :type: str + :type formatted_message: str """ self._formatted_message = formatted_message @@ -144,7 +139,7 @@ def full_line(self, full_line): :param full_line: The full_line of this LogJobResultItem. # noqa: E501 - :type: str + :type full_line: str """ self._full_line = full_line @@ -165,7 +160,7 @@ def local_timestamp_iso8601(self, local_timestamp_iso8601): :param local_timestamp_iso8601: The local_timestamp_iso8601 of this LogJobResultItem. # noqa: E501 - :type: str + :type local_timestamp_iso8601: str """ self._local_timestamp_iso8601 = local_timestamp_iso8601 @@ -186,7 +181,7 @@ def message(self, message): :param message: The message of this LogJobResultItem. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -207,37 +202,40 @@ def message_code(self, message_code): :param message_code: The message_code of this LogJobResultItem. # noqa: E501 - :type: str + :type message_code: str """ self._message_code = message_code - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LogJobResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/log_job_results.py b/src/clients/ctm_api_client/models/log_job_results.py index c2d250b..475ef03 100644 --- a/src/clients/ctm_api_client/models/log_job_results.py +++ b/src/clients/ctm_api_client/models/log_job_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LogJobResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[LogJobResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[LogJobResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """LogJobResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """LogJobResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -73,12 +69,9 @@ def __init__( self.completed_status = completed_status if error is not None: self.error = error - if _from is not None: - self._from = _from - if results is not None: - self.results = results - if to is not None: - self.to = to + self._from = _from + self.results = results + self.to = to @property def completed_status(self): @@ -96,7 +89,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this LogJobResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +110,7 @@ def error(self, error): :param error: The error of this LogJobResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +131,7 @@ def _from(self, _from): :param _from: The _from of this LogJobResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +152,7 @@ def results(self, results): :param results: The results of this LogJobResults. # noqa: E501 - :type: list[LogJobResultItem] + :type results: list[LogJobResultItem] """ self._results = results @@ -180,37 +173,40 @@ def to(self, to): :param to: The to of this LogJobResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LogJobResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/log_params.py b/src/clients/ctm_api_client/models/log_params.py index 0738473..b51035e 100644 --- a/src/clients/ctm_api_client/models/log_params.py +++ b/src/clients/ctm_api_client/models/log_params.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LogParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm": "str", - "order_id": "str", - "number_of_runs": "int", - "log_table": "str", + openapi_types = { + 'ctm': 'str', + 'order_id': 'str', + 'number_of_runs': 'int', + 'log_table': 'str' } attribute_map = { - "ctm": "ctm", - "order_id": "orderId", - "number_of_runs": "numberOfRuns", - "log_table": "logTable", + 'ctm': 'ctm', + 'order_id': 'orderId', + 'number_of_runs': 'numberOfRuns', + 'log_table': 'logTable' } - def __init__( - self, - ctm=None, - order_id=None, - number_of_runs=None, - log_table=None, - _configuration=None, - ): # noqa: E501 - """LogParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm=None, order_id=None, number_of_runs=None, log_table=None, local_vars_configuration=None): # noqa: E501 + """LogParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm = None self._order_id = None @@ -92,7 +89,7 @@ def ctm(self, ctm): The name of the Control-M server in which the job was ordered from. HIDDEN. # noqa: E501 :param ctm: The ctm of this LogParams. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -115,7 +112,7 @@ def order_id(self, order_id): Job's order id. HIDDEN. # noqa: E501 :param order_id: The order_id of this LogParams. # noqa: E501 - :type: str + :type order_id: str """ self._order_id = order_id @@ -138,7 +135,7 @@ def number_of_runs(self, number_of_runs): Job's rerun number. HIDDEN. # noqa: E501 :param number_of_runs: The number_of_runs of this LogParams. # noqa: E501 - :type: int + :type number_of_runs: int """ self._number_of_runs = number_of_runs @@ -161,37 +158,40 @@ def log_table(self, log_table): Job's log table name, accepted as a value in search request. HIDDEN. # noqa: E501 :param log_table: The log_table of this LogParams. # noqa: E501 - :type: str + :type log_table: str """ self._log_table = log_table - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LogParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/login_credentials.py b/src/clients/ctm_api_client/models/login_credentials.py index 04fd164..c4607b9 100644 --- a/src/clients/ctm_api_client/models/login_credentials.py +++ b/src/clients/ctm_api_client/models/login_credentials.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LoginCredentials(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"username": "str", "password": "str"} - - attribute_map = {"username": "username", "password": "password"} - - def __init__(self, username=None, password=None, _configuration=None): # noqa: E501 - """LoginCredentials - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'username': 'str', + 'password': 'str' + } + + attribute_map = { + 'username': 'username', + 'password': 'password' + } + + def __init__(self, username=None, password=None, local_vars_configuration=None): # noqa: E501 + """LoginCredentials - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._username = None self._password = None @@ -65,12 +75,10 @@ def username(self, username): :param username: The username of this LoginCredentials. # noqa: E501 - :type: str + :type username: str """ - if self._configuration.client_side_validation and username is None: - raise ValueError( - "Invalid value for `username`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and username is None: # noqa: E501 + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 self._username = username @@ -90,41 +98,42 @@ def password(self, password): :param password: The password of this LoginCredentials. # noqa: E501 - :type: str + :type password: str """ - if self._configuration.client_side_validation and password is None: - raise ValueError( - "Invalid value for `password`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 + raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 self._password = password - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LoginCredentials, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/login_result.py b/src/clients/ctm_api_client/models/login_result.py index 8dbebc6..1763bfb 100644 --- a/src/clients/ctm_api_client/models/login_result.py +++ b/src/clients/ctm_api_client/models/login_result.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class LoginResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"username": "str", "token": "str", "version": "str"} - - attribute_map = {"username": "username", "token": "token", "version": "version"} - - def __init__( - self, username=None, token=None, version=None, _configuration=None - ): # noqa: E501 - """LoginResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'username': 'str', + 'token': 'str', + 'version': 'str' + } + + attribute_map = { + 'username': 'username', + 'token': 'token', + 'version': 'version' + } + + def __init__(self, username=None, token=None, version=None, local_vars_configuration=None): # noqa: E501 + """LoginResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._username = None self._token = None @@ -72,7 +82,7 @@ def username(self, username): :param username: The username of this LoginResult. # noqa: E501 - :type: str + :type username: str """ self._username = username @@ -93,7 +103,7 @@ def token(self, token): :param token: The token of this LoginResult. # noqa: E501 - :type: str + :type token: str """ self._token = token @@ -114,37 +124,40 @@ def version(self, version): :param version: The version of this LoginResult. # noqa: E501 - :type: str + :type version: str """ self._version = version - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(LoginResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/manifest_group_item_object.py b/src/clients/ctm_api_client/models/manifest_group_item_object.py index 6848a01..33285ab 100644 --- a/src/clients/ctm_api_client/models/manifest_group_item_object.py +++ b/src/clients/ctm_api_client/models/manifest_group_item_object.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ManifestGroupItemObject(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "icon_base64": "str"} - - attribute_map = {"name": "name", "icon_base64": "iconBase64"} - - def __init__(self, name=None, icon_base64=None, _configuration=None): # noqa: E501 - """ManifestGroupItemObject - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'icon_base64': 'str' + } + + attribute_map = { + 'name': 'name', + 'icon_base64': 'iconBase64' + } + + def __init__(self, name=None, icon_base64=None, local_vars_configuration=None): # noqa: E501 + """ManifestGroupItemObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._icon_base64 = None @@ -67,7 +77,7 @@ def name(self, name): :param name: The name of this ManifestGroupItemObject. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -88,37 +98,40 @@ def icon_base64(self, icon_base64): :param icon_base64: The icon_base64 of this ManifestGroupItemObject. # noqa: E501 - :type: str + :type icon_base64: str """ self._icon_base64 = icon_base64 - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ManifestGroupItemObject, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/manifest_group_object.py b/src/clients/ctm_api_client/models/manifest_group_object.py index 4d60927..7315f25 100644 --- a/src/clients/ctm_api_client/models/manifest_group_object.py +++ b/src/clients/ctm_api_client/models/manifest_group_object.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ManifestGroupObject(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"item": "list[ManifestGroupItemObject]"} + openapi_types = { + 'item': 'list[ManifestGroupItemObject]' + } - attribute_map = {"item": "item"} + attribute_map = { + 'item': 'item' + } - def __init__(self, item=None, _configuration=None): # noqa: E501 - """ManifestGroupObject - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, item=None, local_vars_configuration=None): # noqa: E501 + """ManifestGroupObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._item = None self.discriminator = None @@ -64,37 +72,40 @@ def item(self, item): :param item: The item of this ManifestGroupObject. # noqa: E501 - :type: list[ManifestGroupItemObject] + :type item: list[ManifestGroupItemObject] """ self._item = item - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ManifestGroupObject, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/matching.py b/src/clients/ctm_api_client/models/matching.py deleted file mode 100644 index 0cab7e7..0000000 --- a/src/clients/ctm_api_client/models/matching.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class Matching(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """Matching - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Matching, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Matching): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Matching): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/mft_configuration_data.py b/src/clients/ctm_api_client/models/mft_configuration_data.py index 17d1720..6d1a749 100644 --- a/src/clients/ctm_api_client/models/mft_configuration_data.py +++ b/src/clients/ctm_api_client/models/mft_configuration_data.py @@ -5,98 +5,82 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MftConfigurationData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "connection_timeout_in_seconds": "int", - "connection_retries": "int", - "connection_time_between_retries_in_seconds": "int", - "debug_level": "int", - "pgp_temp_dir": "str", - "ssl_debug_trace": "bool", - "pam_authentication": "bool", - "proxy_is_in_use": "bool", - "proxy_host": "str", - "proxy_port": "int", - "proxy_user": "str", - "proxy_password": "str", - "file_watcher_search_interval": "int", - "file_watcher_static_iterations": "int", - "file_watcher_check_file_is_in_use": "bool", - "file_actions_retries_interval_in_seconds": "int", - "file_actions_retries_num": "int", + openapi_types = { + 'connection_timeout_in_seconds': 'int', + 'connection_retries': 'int', + 'connection_time_between_retries_in_seconds': 'int', + 'debug_level': 'int', + 'pgp_temp_dir': 'str', + 'ssl_debug_trace': 'bool', + 'pam_authentication': 'bool', + 'proxy_is_in_use': 'bool', + 'proxy_host': 'str', + 'proxy_port': 'int', + 'proxy_user': 'str', + 'proxy_password': 'str', + 'file_watcher_search_interval': 'int', + 'file_watcher_static_iterations': 'int', + 'file_watcher_check_file_is_in_use': 'bool', + 'file_actions_retries_interval_in_seconds': 'int', + 'file_actions_retries_num': 'int' } attribute_map = { - "connection_timeout_in_seconds": "connectionTimeoutInSeconds", - "connection_retries": "connectionRetries", - "connection_time_between_retries_in_seconds": "connectionTimeBetweenRetriesInSeconds", - "debug_level": "debugLevel", - "pgp_temp_dir": "pgpTempDir", - "ssl_debug_trace": "sslDebugTrace", - "pam_authentication": "pamAuthentication", - "proxy_is_in_use": "proxyIsInUse", - "proxy_host": "proxyHost", - "proxy_port": "proxyPort", - "proxy_user": "proxyUser", - "proxy_password": "proxyPassword", - "file_watcher_search_interval": "fileWatcherSearchInterval", - "file_watcher_static_iterations": "fileWatcherStaticIterations", - "file_watcher_check_file_is_in_use": "fileWatcherCheckFileIsInUse", - "file_actions_retries_interval_in_seconds": "fileActionsRetriesIntervalInSeconds", - "file_actions_retries_num": "fileActionsRetriesNum", + 'connection_timeout_in_seconds': 'connectionTimeoutInSeconds', + 'connection_retries': 'connectionRetries', + 'connection_time_between_retries_in_seconds': 'connectionTimeBetweenRetriesInSeconds', + 'debug_level': 'debugLevel', + 'pgp_temp_dir': 'pgpTempDir', + 'ssl_debug_trace': 'sslDebugTrace', + 'pam_authentication': 'pamAuthentication', + 'proxy_is_in_use': 'proxyIsInUse', + 'proxy_host': 'proxyHost', + 'proxy_port': 'proxyPort', + 'proxy_user': 'proxyUser', + 'proxy_password': 'proxyPassword', + 'file_watcher_search_interval': 'fileWatcherSearchInterval', + 'file_watcher_static_iterations': 'fileWatcherStaticIterations', + 'file_watcher_check_file_is_in_use': 'fileWatcherCheckFileIsInUse', + 'file_actions_retries_interval_in_seconds': 'fileActionsRetriesIntervalInSeconds', + 'file_actions_retries_num': 'fileActionsRetriesNum' } - def __init__( - self, - connection_timeout_in_seconds=None, - connection_retries=None, - connection_time_between_retries_in_seconds=None, - debug_level=None, - pgp_temp_dir=None, - ssl_debug_trace=None, - pam_authentication=None, - proxy_is_in_use=None, - proxy_host=None, - proxy_port=None, - proxy_user=None, - proxy_password=None, - file_watcher_search_interval=None, - file_watcher_static_iterations=None, - file_watcher_check_file_is_in_use=None, - file_actions_retries_interval_in_seconds=None, - file_actions_retries_num=None, - _configuration=None, - ): # noqa: E501 - """MftConfigurationData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, connection_timeout_in_seconds=None, connection_retries=None, connection_time_between_retries_in_seconds=None, debug_level=None, pgp_temp_dir=None, ssl_debug_trace=None, pam_authentication=None, proxy_is_in_use=None, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None, file_watcher_search_interval=None, file_watcher_static_iterations=None, file_watcher_check_file_is_in_use=None, file_actions_retries_interval_in_seconds=None, file_actions_retries_num=None, local_vars_configuration=None): # noqa: E501 + """MftConfigurationData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._connection_timeout_in_seconds = None self._connection_retries = None @@ -122,9 +106,7 @@ def __init__( if connection_retries is not None: self.connection_retries = connection_retries if connection_time_between_retries_in_seconds is not None: - self.connection_time_between_retries_in_seconds = ( - connection_time_between_retries_in_seconds - ) + self.connection_time_between_retries_in_seconds = connection_time_between_retries_in_seconds if debug_level is not None: self.debug_level = debug_level if pgp_temp_dir is not None: @@ -150,9 +132,7 @@ def __init__( if file_watcher_check_file_is_in_use is not None: self.file_watcher_check_file_is_in_use = file_watcher_check_file_is_in_use if file_actions_retries_interval_in_seconds is not None: - self.file_actions_retries_interval_in_seconds = ( - file_actions_retries_interval_in_seconds - ) + self.file_actions_retries_interval_in_seconds = file_actions_retries_interval_in_seconds if file_actions_retries_num is not None: self.file_actions_retries_num = file_actions_retries_num @@ -174,7 +154,7 @@ def connection_timeout_in_seconds(self, connection_timeout_in_seconds): Connection timeout (seconds) HIDDEN # noqa: E501 :param connection_timeout_in_seconds: The connection_timeout_in_seconds of this MftConfigurationData. # noqa: E501 - :type: int + :type connection_timeout_in_seconds: int """ self._connection_timeout_in_seconds = connection_timeout_in_seconds @@ -197,7 +177,7 @@ def connection_retries(self, connection_retries): Number of connection retries HIDDEN # noqa: E501 :param connection_retries: The connection_retries of this MftConfigurationData. # noqa: E501 - :type: int + :type connection_retries: int """ self._connection_retries = connection_retries @@ -214,20 +194,16 @@ def connection_time_between_retries_in_seconds(self): return self._connection_time_between_retries_in_seconds @connection_time_between_retries_in_seconds.setter - def connection_time_between_retries_in_seconds( - self, connection_time_between_retries_in_seconds - ): + def connection_time_between_retries_in_seconds(self, connection_time_between_retries_in_seconds): """Sets the connection_time_between_retries_in_seconds of this MftConfigurationData. Time between connection retries (seconds) HIDDEN # noqa: E501 :param connection_time_between_retries_in_seconds: The connection_time_between_retries_in_seconds of this MftConfigurationData. # noqa: E501 - :type: int + :type connection_time_between_retries_in_seconds: int """ - self._connection_time_between_retries_in_seconds = ( - connection_time_between_retries_in_seconds - ) + self._connection_time_between_retries_in_seconds = connection_time_between_retries_in_seconds @property def debug_level(self): @@ -247,7 +223,7 @@ def debug_level(self, debug_level): MFT debug level (0-5) HIDDEN # noqa: E501 :param debug_level: The debug_level of this MftConfigurationData. # noqa: E501 - :type: int + :type debug_level: int """ self._debug_level = debug_level @@ -270,7 +246,7 @@ def pgp_temp_dir(self, pgp_temp_dir): PGP temporary directory HIDDEN # noqa: E501 :param pgp_temp_dir: The pgp_temp_dir of this MftConfigurationData. # noqa: E501 - :type: str + :type pgp_temp_dir: str """ self._pgp_temp_dir = pgp_temp_dir @@ -293,7 +269,7 @@ def ssl_debug_trace(self, ssl_debug_trace): Enable SSL debug trace HIDDEN # noqa: E501 :param ssl_debug_trace: The ssl_debug_trace of this MftConfigurationData. # noqa: E501 - :type: bool + :type ssl_debug_trace: bool """ self._ssl_debug_trace = ssl_debug_trace @@ -316,7 +292,7 @@ def pam_authentication(self, pam_authentication): Use PAM password authentication HIDDEN # noqa: E501 :param pam_authentication: The pam_authentication of this MftConfigurationData. # noqa: E501 - :type: bool + :type pam_authentication: bool """ self._pam_authentication = pam_authentication @@ -339,7 +315,7 @@ def proxy_is_in_use(self, proxy_is_in_use): Use web proxy HIDDEN # noqa: E501 :param proxy_is_in_use: The proxy_is_in_use of this MftConfigurationData. # noqa: E501 - :type: bool + :type proxy_is_in_use: bool """ self._proxy_is_in_use = proxy_is_in_use @@ -362,7 +338,7 @@ def proxy_host(self, proxy_host): Proxy host HIDDEN # noqa: E501 :param proxy_host: The proxy_host of this MftConfigurationData. # noqa: E501 - :type: str + :type proxy_host: str """ self._proxy_host = proxy_host @@ -385,7 +361,7 @@ def proxy_port(self, proxy_port): Proxy port HIDDEN # noqa: E501 :param proxy_port: The proxy_port of this MftConfigurationData. # noqa: E501 - :type: int + :type proxy_port: int """ self._proxy_port = proxy_port @@ -408,7 +384,7 @@ def proxy_user(self, proxy_user): Proxy user HIDDEN # noqa: E501 :param proxy_user: The proxy_user of this MftConfigurationData. # noqa: E501 - :type: str + :type proxy_user: str """ self._proxy_user = proxy_user @@ -431,7 +407,7 @@ def proxy_password(self, proxy_password): Proxy password HIDDEN # noqa: E501 :param proxy_password: The proxy_password of this MftConfigurationData. # noqa: E501 - :type: str + :type proxy_password: str """ self._proxy_password = proxy_password @@ -454,7 +430,7 @@ def file_watcher_search_interval(self, file_watcher_search_interval): File watch search interval (seconds) HIDDEN # noqa: E501 :param file_watcher_search_interval: The file_watcher_search_interval of this MftConfigurationData. # noqa: E501 - :type: int + :type file_watcher_search_interval: int """ self._file_watcher_search_interval = file_watcher_search_interval @@ -477,7 +453,7 @@ def file_watcher_static_iterations(self, file_watcher_static_iterations): Number of iterations while file is static HIDDEN # noqa: E501 :param file_watcher_static_iterations: The file_watcher_static_iterations of this MftConfigurationData. # noqa: E501 - :type: int + :type file_watcher_static_iterations: int """ self._file_watcher_static_iterations = file_watcher_static_iterations @@ -500,7 +476,7 @@ def file_watcher_check_file_is_in_use(self, file_watcher_check_file_is_in_use): Check that file is not in use HIDDEN # noqa: E501 :param file_watcher_check_file_is_in_use: The file_watcher_check_file_is_in_use of this MftConfigurationData. # noqa: E501 - :type: bool + :type file_watcher_check_file_is_in_use: bool """ self._file_watcher_check_file_is_in_use = file_watcher_check_file_is_in_use @@ -517,20 +493,16 @@ def file_actions_retries_interval_in_seconds(self): return self._file_actions_retries_interval_in_seconds @file_actions_retries_interval_in_seconds.setter - def file_actions_retries_interval_in_seconds( - self, file_actions_retries_interval_in_seconds - ): + def file_actions_retries_interval_in_seconds(self, file_actions_retries_interval_in_seconds): """Sets the file_actions_retries_interval_in_seconds of this MftConfigurationData. File action retry interval (seconds) HIDDEN # noqa: E501 :param file_actions_retries_interval_in_seconds: The file_actions_retries_interval_in_seconds of this MftConfigurationData. # noqa: E501 - :type: int + :type file_actions_retries_interval_in_seconds: int """ - self._file_actions_retries_interval_in_seconds = ( - file_actions_retries_interval_in_seconds - ) + self._file_actions_retries_interval_in_seconds = file_actions_retries_interval_in_seconds @property def file_actions_retries_num(self): @@ -550,37 +522,40 @@ def file_actions_retries_num(self, file_actions_retries_num): Number of file action retries HIDDEN # noqa: E501 :param file_actions_retries_num: The file_actions_retries_num of this MftConfigurationData. # noqa: E501 - :type: int + :type file_actions_retries_num: int """ self._file_actions_retries_num = file_actions_retries_num - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MftConfigurationData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/mft_entities_list_names.py b/src/clients/ctm_api_client/models/mft_entities_list_names.py index 519632a..2697af2 100644 --- a/src/clients/ctm_api_client/models/mft_entities_list_names.py +++ b/src/clients/ctm_api_client/models/mft_entities_list_names.py @@ -5,64 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MFTEntitiesListNames(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "users": "list[str]", - "virtual_folders": "list[str]", - "groups": "list[str]", - "company_names": "list[str]", + openapi_types = { + 'users': 'list[str]', + 'virtual_folders': 'list[str]', + 'groups': 'list[str]', + 'company_names': 'list[str]', + 'users_companies': 'list[UsersCompanies]' } attribute_map = { - "users": "users", - "virtual_folders": "virtualFolders", - "groups": "groups", - "company_names": "companyNames", + 'users': 'users', + 'virtual_folders': 'virtualFolders', + 'groups': 'groups', + 'company_names': 'companyNames', + 'users_companies': 'usersCompanies' } - def __init__( - self, - users=None, - virtual_folders=None, - groups=None, - company_names=None, - _configuration=None, - ): # noqa: E501 - """MFTEntitiesListNames - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, users=None, virtual_folders=None, groups=None, company_names=None, users_companies=None, local_vars_configuration=None): # noqa: E501 + """MFTEntitiesListNames - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._users = None self._virtual_folders = None self._groups = None self._company_names = None + self._users_companies = None self.discriminator = None if users is not None: @@ -73,6 +73,8 @@ def __init__( self.groups = groups if company_names is not None: self.company_names = company_names + if users_companies is not None: + self.users_companies = users_companies @property def users(self): @@ -90,7 +92,7 @@ def users(self, users): :param users: The users of this MFTEntitiesListNames. # noqa: E501 - :type: list[str] + :type users: list[str] """ self._users = users @@ -111,7 +113,7 @@ def virtual_folders(self, virtual_folders): :param virtual_folders: The virtual_folders of this MFTEntitiesListNames. # noqa: E501 - :type: list[str] + :type virtual_folders: list[str] """ self._virtual_folders = virtual_folders @@ -132,7 +134,7 @@ def groups(self, groups): :param groups: The groups of this MFTEntitiesListNames. # noqa: E501 - :type: list[str] + :type groups: list[str] """ self._groups = groups @@ -153,37 +155,61 @@ def company_names(self, company_names): :param company_names: The company_names of this MFTEntitiesListNames. # noqa: E501 - :type: list[str] + :type company_names: list[str] """ self._company_names = company_names - def to_dict(self): + @property + def users_companies(self): + """Gets the users_companies of this MFTEntitiesListNames. # noqa: E501 + + + :return: The users_companies of this MFTEntitiesListNames. # noqa: E501 + :rtype: list[UsersCompanies] + """ + return self._users_companies + + @users_companies.setter + def users_companies(self, users_companies): + """Sets the users_companies of this MFTEntitiesListNames. + + + :param users_companies: The users_companies of this MFTEntitiesListNames. # noqa: E501 + :type users_companies: list[UsersCompanies] + """ + + self._users_companies = users_companies + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MFTEntitiesListNames, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/mft_external_user_projection_data.py b/src/clients/ctm_api_client/models/mft_external_user_projection_data.py index 3fa7a91..2e88952 100644 --- a/src/clients/ctm_api_client/models/mft_external_user_projection_data.py +++ b/src/clients/ctm_api_client/models/mft_external_user_projection_data.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MFTExternalUserProjectionData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "company": "str", - "is_locked": "bool", - "lock_reason": "str", - "allowed_folders_names": "list[str]", + openapi_types = { + 'name': 'str', + 'company': 'str', + 'is_locked': 'bool', + 'lock_reason': 'str', + 'allowed_folders_names': 'list[str]' } attribute_map = { - "name": "name", - "company": "company", - "is_locked": "isLocked", - "lock_reason": "lockReason", - "allowed_folders_names": "allowedFoldersNames", + 'name': 'name', + 'company': 'company', + 'is_locked': 'isLocked', + 'lock_reason': 'lockReason', + 'allowed_folders_names': 'allowedFoldersNames' } - def __init__( - self, - name=None, - company=None, - is_locked=None, - lock_reason=None, - allowed_folders_names=None, - _configuration=None, - ): # noqa: E501 - """MFTExternalUserProjectionData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, company=None, is_locked=None, lock_reason=None, allowed_folders_names=None, local_vars_configuration=None): # noqa: E501 + """MFTExternalUserProjectionData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._company = None @@ -98,7 +94,7 @@ def name(self, name): external user name # noqa: E501 :param name: The name of this MFTExternalUserProjectionData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -121,7 +117,7 @@ def company(self, company): user's company # noqa: E501 :param company: The company of this MFTExternalUserProjectionData. # noqa: E501 - :type: str + :type company: str """ self._company = company @@ -144,7 +140,7 @@ def is_locked(self, is_locked): indicates whether the user account is locked # noqa: E501 :param is_locked: The is_locked of this MFTExternalUserProjectionData. # noqa: E501 - :type: bool + :type is_locked: bool """ self._is_locked = is_locked @@ -167,7 +163,7 @@ def lock_reason(self, lock_reason): provides the reason for locking the user account # noqa: E501 :param lock_reason: The lock_reason of this MFTExternalUserProjectionData. # noqa: E501 - :type: str + :type lock_reason: str """ self._lock_reason = lock_reason @@ -190,37 +186,40 @@ def allowed_folders_names(self, allowed_folders_names): users's allowed folder names # noqa: E501 :param allowed_folders_names: The allowed_folders_names of this MFTExternalUserProjectionData. # noqa: E501 - :type: list[str] + :type allowed_folders_names: list[str] """ self._allowed_folders_names = allowed_folders_names - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MFTExternalUserProjectionData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/mft_folder_projection_data.py b/src/clients/ctm_api_client/models/mft_folder_projection_data.py index 3f8f0aa..8108066 100644 --- a/src/clients/ctm_api_client/models/mft_folder_projection_data.py +++ b/src/clients/ctm_api_client/models/mft_folder_projection_data.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MFTFolderProjectionData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "authorized_internal_users": "list[str]", - "authorized_external_users_and_groups": "list[str]", - "access_type": "str", + openapi_types = { + 'name': 'str', + 'authorized_internal_users': 'list[str]', + 'authorized_external_users_and_groups': 'list[str]', + 'access_type': 'str' } attribute_map = { - "name": "name", - "authorized_internal_users": "authorizedInternalUsers", - "authorized_external_users_and_groups": "authorizedExternalUsersAndGroups", - "access_type": "accessType", + 'name': 'name', + 'authorized_internal_users': 'authorizedInternalUsers', + 'authorized_external_users_and_groups': 'authorizedExternalUsersAndGroups', + 'access_type': 'accessType' } - def __init__( - self, - name=None, - authorized_internal_users=None, - authorized_external_users_and_groups=None, - access_type=None, - _configuration=None, - ): # noqa: E501 - """MFTFolderProjectionData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, authorized_internal_users=None, authorized_external_users_and_groups=None, access_type=None, local_vars_configuration=None): # noqa: E501 + """MFTFolderProjectionData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._authorized_internal_users = None @@ -70,9 +67,7 @@ def __init__( if authorized_internal_users is not None: self.authorized_internal_users = authorized_internal_users if authorized_external_users_and_groups is not None: - self.authorized_external_users_and_groups = ( - authorized_external_users_and_groups - ) + self.authorized_external_users_and_groups = authorized_external_users_and_groups if access_type is not None: self.access_type = access_type @@ -94,7 +89,7 @@ def name(self, name): The name of the folder # noqa: E501 :param name: The name of this MFTFolderProjectionData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -117,7 +112,7 @@ def authorized_internal_users(self, authorized_internal_users): Authorized Internal Users # noqa: E501 :param authorized_internal_users: The authorized_internal_users of this MFTFolderProjectionData. # noqa: E501 - :type: list[str] + :type authorized_internal_users: list[str] """ self._authorized_internal_users = authorized_internal_users @@ -134,20 +129,16 @@ def authorized_external_users_and_groups(self): return self._authorized_external_users_and_groups @authorized_external_users_and_groups.setter - def authorized_external_users_and_groups( - self, authorized_external_users_and_groups - ): + def authorized_external_users_and_groups(self, authorized_external_users_and_groups): """Sets the authorized_external_users_and_groups of this MFTFolderProjectionData. Authorized External Users And User Groups # noqa: E501 :param authorized_external_users_and_groups: The authorized_external_users_and_groups of this MFTFolderProjectionData. # noqa: E501 - :type: list[str] + :type authorized_external_users_and_groups: list[str] """ - self._authorized_external_users_and_groups = ( - authorized_external_users_and_groups - ) + self._authorized_external_users_and_groups = authorized_external_users_and_groups @property def access_type(self): @@ -167,37 +158,40 @@ def access_type(self, access_type): Folder's access type (Limited, Unlimited). # noqa: E501 :param access_type: The access_type of this MFTFolderProjectionData. # noqa: E501 - :type: str + :type access_type: str """ self._access_type = access_type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MFTFolderProjectionData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/mft_folder_projection_properties.py b/src/clients/ctm_api_client/models/mft_folder_projection_properties.py index 6a48e7f..ca2cfc2 100644 --- a/src/clients/ctm_api_client/models/mft_folder_projection_properties.py +++ b/src/clients/ctm_api_client/models/mft_folder_projection_properties.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MFTFolderProjectionProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "allowed_internal_user_names": "list[str]", - "allowed_user_names": "list[str]", - "allowed_group_names": "list[str]", - "access_type": "str", + openapi_types = { + 'name': 'str', + 'allowed_internal_user_names': 'list[str]', + 'allowed_user_names': 'list[str]', + 'allowed_group_names': 'list[str]', + 'access_type': 'str' } attribute_map = { - "name": "name", - "allowed_internal_user_names": "allowedInternalUserNames", - "allowed_user_names": "allowedUserNames", - "allowed_group_names": "allowedGroupNames", - "access_type": "accessType", + 'name': 'name', + 'allowed_internal_user_names': 'allowedInternalUserNames', + 'allowed_user_names': 'allowedUserNames', + 'allowed_group_names': 'allowedGroupNames', + 'access_type': 'accessType' } - def __init__( - self, - name=None, - allowed_internal_user_names=None, - allowed_user_names=None, - allowed_group_names=None, - access_type=None, - _configuration=None, - ): # noqa: E501 - """MFTFolderProjectionProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, allowed_internal_user_names=None, allowed_user_names=None, allowed_group_names=None, access_type=None, local_vars_configuration=None): # noqa: E501 + """MFTFolderProjectionProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._allowed_internal_user_names = None @@ -98,7 +94,7 @@ def name(self, name): The name of the folder. # noqa: E501 :param name: The name of this MFTFolderProjectionProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -121,7 +117,7 @@ def allowed_internal_user_names(self, allowed_internal_user_names): Authorized Internal Users. # noqa: E501 :param allowed_internal_user_names: The allowed_internal_user_names of this MFTFolderProjectionProperties. # noqa: E501 - :type: list[str] + :type allowed_internal_user_names: list[str] """ self._allowed_internal_user_names = allowed_internal_user_names @@ -144,7 +140,7 @@ def allowed_user_names(self, allowed_user_names): Authorized External Users. # noqa: E501 :param allowed_user_names: The allowed_user_names of this MFTFolderProjectionProperties. # noqa: E501 - :type: list[str] + :type allowed_user_names: list[str] """ self._allowed_user_names = allowed_user_names @@ -167,7 +163,7 @@ def allowed_group_names(self, allowed_group_names): Array of allowed group names. # noqa: E501 :param allowed_group_names: The allowed_group_names of this MFTFolderProjectionProperties. # noqa: E501 - :type: list[str] + :type allowed_group_names: list[str] """ self._allowed_group_names = allowed_group_names @@ -190,37 +186,40 @@ def access_type(self, access_type): Folder's access type (Limited, Unlimited). # noqa: E501 :param access_type: The access_type of this MFTFolderProjectionProperties. # noqa: E501 - :type: str + :type access_type: str """ self._access_type = access_type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MFTFolderProjectionProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/mft_user_group_projection_data.py b/src/clients/ctm_api_client/models/mft_user_group_projection_data.py index 6a22ad7..12188c3 100644 --- a/src/clients/ctm_api_client/models/mft_user_group_projection_data.py +++ b/src/clients/ctm_api_client/models/mft_user_group_projection_data.py @@ -5,63 +5,63 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MFTUserGroupProjectionData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "allowed_folders_names": "list[str]", - "external_users": "list[str]", - "ldap_groups": "list[str]", - "name": "str", + openapi_types = { + 'allowed_folders_names': 'list[str]', + 'external_users': 'list[str]', + 'ldap_groups': 'list[str]', + 'ldap_users': 'list[str]', + 'name': 'str' } attribute_map = { - "allowed_folders_names": "allowedFoldersNames", - "external_users": "externalUsers", - "ldap_groups": "ldapGroups", - "name": "name", + 'allowed_folders_names': 'allowedFoldersNames', + 'external_users': 'externalUsers', + 'ldap_groups': 'ldapGroups', + 'ldap_users': 'ldapUsers', + 'name': 'name' } - def __init__( - self, - allowed_folders_names=None, - external_users=None, - ldap_groups=None, - name=None, - _configuration=None, - ): # noqa: E501 - """MFTUserGroupProjectionData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, allowed_folders_names=None, external_users=None, ldap_groups=None, ldap_users=None, name=None, local_vars_configuration=None): # noqa: E501 + """MFTUserGroupProjectionData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._allowed_folders_names = None self._external_users = None self._ldap_groups = None + self._ldap_users = None self._name = None self.discriminator = None @@ -71,6 +71,8 @@ def __init__( self.external_users = external_users if ldap_groups is not None: self.ldap_groups = ldap_groups + if ldap_users is not None: + self.ldap_users = ldap_users if name is not None: self.name = name @@ -92,7 +94,7 @@ def allowed_folders_names(self, allowed_folders_names): user's allowed folder names # noqa: E501 :param allowed_folders_names: The allowed_folders_names of this MFTUserGroupProjectionData. # noqa: E501 - :type: list[str] + :type allowed_folders_names: list[str] """ self._allowed_folders_names = allowed_folders_names @@ -115,7 +117,7 @@ def external_users(self, external_users): external users names # noqa: E501 :param external_users: The external_users of this MFTUserGroupProjectionData. # noqa: E501 - :type: list[str] + :type external_users: list[str] """ self._external_users = external_users @@ -138,11 +140,34 @@ def ldap_groups(self, ldap_groups): ldap groups names # noqa: E501 :param ldap_groups: The ldap_groups of this MFTUserGroupProjectionData. # noqa: E501 - :type: list[str] + :type ldap_groups: list[str] """ self._ldap_groups = ldap_groups + @property + def ldap_users(self): + """Gets the ldap_users of this MFTUserGroupProjectionData. # noqa: E501 + + ldap users names # noqa: E501 + + :return: The ldap_users of this MFTUserGroupProjectionData. # noqa: E501 + :rtype: list[str] + """ + return self._ldap_users + + @ldap_users.setter + def ldap_users(self, ldap_users): + """Sets the ldap_users of this MFTUserGroupProjectionData. + + ldap users names # noqa: E501 + + :param ldap_users: The ldap_users of this MFTUserGroupProjectionData. # noqa: E501 + :type ldap_users: list[str] + """ + + self._ldap_users = ldap_users + @property def name(self): """Gets the name of this MFTUserGroupProjectionData. # noqa: E501 @@ -161,37 +186,40 @@ def name(self, name): user group name # noqa: E501 :param name: The name of this MFTUserGroupProjectionData. # noqa: E501 - :type: str + :type name: str """ self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MFTUserGroupProjectionData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/monitoring_privilege_category.py b/src/clients/ctm_api_client/models/monitoring_privilege_category.py index 92dc2c4..636d2b9 100644 --- a/src/clients/ctm_api_client/models/monitoring_privilege_category.py +++ b/src/clients/ctm_api_client/models/monitoring_privilege_category.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MonitoringPrivilegeCategory(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"alert": "str", "viewpoint_archive": "str"} - - attribute_map = {"alert": "Alert", "viewpoint_archive": "ViewpointArchive"} - - def __init__( - self, alert=None, viewpoint_archive=None, _configuration=None - ): # noqa: E501 - """MonitoringPrivilegeCategory - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'alert': 'str', + 'viewpoint_archive': 'str' + } + + attribute_map = { + 'alert': 'Alert', + 'viewpoint_archive': 'ViewpointArchive' + } + + def __init__(self, alert=None, viewpoint_archive=None, local_vars_configuration=None): # noqa: E501 + """MonitoringPrivilegeCategory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._alert = None self._viewpoint_archive = None @@ -71,7 +79,7 @@ def alert(self, alert): Alerts access level (None, Browse, Update, Full) # noqa: E501 :param alert: The alert of this MonitoringPrivilegeCategory. # noqa: E501 - :type: str + :type alert: str """ self._alert = alert @@ -94,37 +102,40 @@ def viewpoint_archive(self, viewpoint_archive): Archived Viewpoints access level (None, Browse, Update, Full) # noqa: E501 :param viewpoint_archive: The viewpoint_archive of this MonitoringPrivilegeCategory. # noqa: E501 - :type: str + :type viewpoint_archive: str """ self._viewpoint_archive = viewpoint_archive - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MonitoringPrivilegeCategory, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/msg_data_arguments.py b/src/clients/ctm_api_client/models/msg_data_arguments.py index ad524db..7696a53 100644 --- a/src/clients/ctm_api_client/models/msg_data_arguments.py +++ b/src/clients/ctm_api_client/models/msg_data_arguments.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class MsgDataArguments(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value_str": "str"} + openapi_types = { + 'value_str': 'str' + } - attribute_map = {"value_str": "value_str"} + attribute_map = { + 'value_str': 'value_str' + } - def __init__(self, value_str=None, _configuration=None): # noqa: E501 - """MsgDataArguments - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value_str=None, local_vars_configuration=None): # noqa: E501 + """MsgDataArguments - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value_str = None self.discriminator = None @@ -64,37 +72,40 @@ def value_str(self, value_str): :param value_str: The value_str of this MsgDataArguments. # noqa: E501 - :type: str + :type value_str: str """ self._value_str = value_str - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(MsgDataArguments, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/name_value_attribute.py b/src/clients/ctm_api_client/models/name_value_attribute.py index 9744e13..d25e3a8 100644 --- a/src/clients/ctm_api_client/models/name_value_attribute.py +++ b/src/clients/ctm_api_client/models/name_value_attribute.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class NameValueAttribute(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str"} - - attribute_map = {"name": "name", "value": "value"} - - def __init__(self, name=None, value=None, _configuration=None): # noqa: E501 - """NameValueAttribute - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """NameValueAttribute - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -67,7 +77,7 @@ def name(self, name): :param name: The name of this NameValueAttribute. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -88,37 +98,40 @@ def value(self, value): :param value: The value of this NameValueAttribute. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(NameValueAttribute, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/new_sample.py b/src/clients/ctm_api_client/models/new_sample.py index e047e0b..e189269 100644 --- a/src/clients/ctm_api_client/models/new_sample.py +++ b/src/clients/ctm_api_client/models/new_sample.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class NewSample(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"title": "str", "description": "str"} - - attribute_map = {"title": "title", "description": "description"} - - def __init__(self, title=None, description=None, _configuration=None): # noqa: E501 - """NewSample - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'title': 'str', + 'description': 'str' + } + + attribute_map = { + 'title': 'title', + 'description': 'description' + } + + def __init__(self, title=None, description=None, local_vars_configuration=None): # noqa: E501 + """NewSample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._title = None self._description = None @@ -66,12 +76,10 @@ def title(self, title): :param title: The title of this NewSample. # noqa: E501 - :type: str + :type title: str """ - if self._configuration.client_side_validation and title is None: - raise ValueError( - "Invalid value for `title`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -91,37 +99,40 @@ def description(self, description): :param description: The description of this NewSample. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(NewSample, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/node.py b/src/clients/ctm_api_client/models/node.py index d011e2e..8f00174 100644 --- a/src/clients/ctm_api_client/models/node.py +++ b/src/clients/ctm_api_client/models/node.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Node(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "id": "str", - "role": "str", - "host": "str", - "availability": "list[Availability]", - "performance": "list[Performance]", + openapi_types = { + 'name': 'str', + 'id': 'str', + 'role': 'str', + 'host': 'str', + 'availability': 'list[Availability]', + 'performance': 'list[Performance]' } attribute_map = { - "name": "name", - "id": "id", - "role": "role", - "host": "host", - "availability": "availability", - "performance": "performance", + 'name': 'name', + 'id': 'id', + 'role': 'role', + 'host': 'host', + 'availability': 'availability', + 'performance': 'performance' } - def __init__( - self, - name=None, - id=None, - role=None, - host=None, - availability=None, - performance=None, - _configuration=None, - ): # noqa: E501 - """Node - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, id=None, role=None, host=None, availability=None, performance=None, local_vars_configuration=None): # noqa: E501 + """Node - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._id = None @@ -104,7 +99,7 @@ def name(self, name): Node Name # noqa: E501 :param name: The name of this Node. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -127,7 +122,7 @@ def id(self, id): A unique id of the node # noqa: E501 :param id: The id of this Node. # noqa: E501 - :type: str + :type id: str """ self._id = id @@ -150,7 +145,7 @@ def role(self, role): The role of the node # noqa: E501 :param role: The role of this Node. # noqa: E501 - :type: str + :type role: str """ self._role = role @@ -173,7 +168,7 @@ def host(self, host): The Host running the node # noqa: E501 :param host: The host of this Node. # noqa: E501 - :type: str + :type host: str """ self._host = host @@ -194,7 +189,7 @@ def availability(self, availability): :param availability: The availability of this Node. # noqa: E501 - :type: list[Availability] + :type availability: list[Availability] """ self._availability = availability @@ -215,37 +210,40 @@ def performance(self, performance): :param performance: The performance of this Node. # noqa: E501 - :type: list[Performance] + :type performance: list[Performance] """ self._performance = performance - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Node, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/optional_value.py b/src/clients/ctm_api_client/models/optional_value.py index 46767d5..27930b9 100644 --- a/src/clients/ctm_api_client/models/optional_value.py +++ b/src/clients/ctm_api_client/models/optional_value.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OptionalValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value": "str"} + openapi_types = { + 'value': 'str' + } - attribute_map = {"value": "value"} + attribute_map = { + 'value': 'value' + } - def __init__(self, value=None, _configuration=None): # noqa: E501 - """OptionalValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """OptionalValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value = None self.discriminator = None @@ -66,37 +74,40 @@ def value(self, value): The parameter value # noqa: E501 :param value: The value of this OptionalValue. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OptionalValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/order_folder_parameters.py b/src/clients/ctm_api_client/models/order_folder_parameters.py index 061bb67..d59d848 100644 --- a/src/clients/ctm_api_client/models/order_folder_parameters.py +++ b/src/clients/ctm_api_client/models/order_folder_parameters.py @@ -5,83 +5,72 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OrderFolderParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm": "str", - "folder": "str", - "jobs": "str", - "library": "str", - "create_duplicate": "bool", - "hold": "bool", - "ignore_criteria": "bool", - "independent_flow": "bool", - "order_date": "str", - "order_into_folder": "str", - "wait_for_order_date": "bool", - "variables": "list[dict(str, str)]", + openapi_types = { + 'ctm': 'str', + 'folder': 'str', + 'jobs': 'str', + 'library': 'str', + 'create_duplicate': 'bool', + 'hold': 'bool', + 'ignore_criteria': 'bool', + 'independent_flow': 'bool', + 'order_date': 'str', + 'order_into_folder': 'str', + 'wait_for_order_date': 'bool', + 'variables': 'list[dict(str, str)]' } attribute_map = { - "ctm": "ctm", - "folder": "folder", - "jobs": "jobs", - "library": "library", - "create_duplicate": "createDuplicate", - "hold": "hold", - "ignore_criteria": "ignoreCriteria", - "independent_flow": "independentFlow", - "order_date": "orderDate", - "order_into_folder": "orderIntoFolder", - "wait_for_order_date": "waitForOrderDate", - "variables": "variables", + 'ctm': 'ctm', + 'folder': 'folder', + 'jobs': 'jobs', + 'library': 'library', + 'create_duplicate': 'createDuplicate', + 'hold': 'hold', + 'ignore_criteria': 'ignoreCriteria', + 'independent_flow': 'independentFlow', + 'order_date': 'orderDate', + 'order_into_folder': 'orderIntoFolder', + 'wait_for_order_date': 'waitForOrderDate', + 'variables': 'variables' } - def __init__( - self, - ctm=None, - folder=None, - jobs=None, - library=None, - create_duplicate=None, - hold=None, - ignore_criteria=None, - independent_flow=None, - order_date=None, - order_into_folder=None, - wait_for_order_date=None, - variables=None, - _configuration=None, - ): # noqa: E501 - """OrderFolderParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm=None, folder=None, jobs=None, library=None, create_duplicate=None, hold=None, ignore_criteria=None, independent_flow=None, order_date=None, order_into_folder=None, wait_for_order_date=None, variables=None, local_vars_configuration=None): # noqa: E501 + """OrderFolderParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm = None self._folder = None @@ -140,7 +129,7 @@ def ctm(self, ctm): The Control-M Server to order from. REQUIRED. # noqa: E501 :param ctm: The ctm of this OrderFolderParameters. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -163,7 +152,7 @@ def folder(self, folder): The folder to order. REQUIRED. # noqa: E501 :param folder: The folder of this OrderFolderParameters. # noqa: E501 - :type: str + :type folder: str """ self._folder = folder @@ -186,7 +175,7 @@ def jobs(self, jobs): Filter the jobs to order. # noqa: E501 :param jobs: The jobs of this OrderFolderParameters. # noqa: E501 - :type: str + :type jobs: str """ self._jobs = jobs @@ -209,7 +198,7 @@ def library(self, library): The z/os library that contains the job (only for MF). # noqa: E501 :param library: The library of this OrderFolderParameters. # noqa: E501 - :type: str + :type library: str """ self._library = library @@ -232,7 +221,7 @@ def create_duplicate(self, create_duplicate): Is it allowed to order the same jobs more than once to the same SMART folder. HIDDEN. # noqa: E501 :param create_duplicate: The create_duplicate of this OrderFolderParameters. # noqa: E501 - :type: bool + :type create_duplicate: bool """ self._create_duplicate = create_duplicate @@ -255,7 +244,7 @@ def hold(self, hold): Are jobs ordered in a HOLD state. HIDDEN. # noqa: E501 :param hold: The hold of this OrderFolderParameters. # noqa: E501 - :type: bool + :type hold: bool """ self._hold = hold @@ -278,7 +267,7 @@ def ignore_criteria(self, ignore_criteria): Is scheduling criteria to be ignored. HIDDEN. # noqa: E501 :param ignore_criteria: The ignore_criteria of this OrderFolderParameters. # noqa: E501 - :type: bool + :type ignore_criteria: bool """ self._ignore_criteria = ignore_criteria @@ -301,7 +290,7 @@ def independent_flow(self, independent_flow): Whether to generate new flow in this order. HIDDEN. # noqa: E501 :param independent_flow: The independent_flow of this OrderFolderParameters. # noqa: E501 - :type: bool + :type independent_flow: bool """ self._independent_flow = independent_flow @@ -324,7 +313,7 @@ def order_date(self, order_date): The order date that is attached to this order command. HIDDEN. # noqa: E501 :param order_date: The order_date of this OrderFolderParameters. # noqa: E501 - :type: str + :type order_date: str """ self._order_date = order_date @@ -347,7 +336,7 @@ def order_into_folder(self, order_into_folder): Policy for placing the jobs in a SMART folder. HIDDEN. # noqa: E501 :param order_into_folder: The order_into_folder of this OrderFolderParameters. # noqa: E501 - :type: str + :type order_into_folder: str """ self._order_into_folder = order_into_folder @@ -370,7 +359,7 @@ def wait_for_order_date(self, wait_for_order_date): Whether to wait for the order date when running the jobs. HIDDEN. # noqa: E501 :param wait_for_order_date: The wait_for_order_date of this OrderFolderParameters. # noqa: E501 - :type: bool + :type wait_for_order_date: bool """ self._wait_for_order_date = wait_for_order_date @@ -393,37 +382,40 @@ def variables(self, variables): Job Variables for this run. HIDDEN. # noqa: E501 :param variables: The variables of this OrderFolderParameters. # noqa: E501 - :type: list[dict(str, str)] + :type variables: list[dict(str, str)] """ self._variables = variables - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OrderFolderParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/order_folder_result_item.py b/src/clients/ctm_api_client/models/order_folder_result_item.py index 0a1395f..9d29f1f 100644 --- a/src/clients/ctm_api_client/models/order_folder_result_item.py +++ b/src/clients/ctm_api_client/models/order_folder_result_item.py @@ -5,69 +5,73 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OrderFolderResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "errored_count": "int", - "folder_name": "str", - "not_met_criteria_count": "int", - "order_folder_status": "str", - "ordered_count": "int", - "ordered_list": "list[OrderedItemItem]", + openapi_types = { + 'errored_count': 'int', + 'folder_name': 'str', + 'not_met_criteria_count': 'int', + 'error_occured': 'bool', + 'error_msg_id': 'str', + 'error_message': 'str', + 'order_folder_status': 'str', + 'ordered_count': 'int', + 'ordered_list': 'list[OrderedItemItem]' } attribute_map = { - "errored_count": "errored_count", - "folder_name": "folder_name", - "not_met_criteria_count": "not_met_criteria_count", - "order_folder_status": "order_folder_status", - "ordered_count": "ordered_count", - "ordered_list": "ordered_list", + 'errored_count': 'errored_count', + 'folder_name': 'folder_name', + 'not_met_criteria_count': 'not_met_criteria_count', + 'error_occured': 'error_occured', + 'error_msg_id': 'error_msg_id', + 'error_message': 'error_message', + 'order_folder_status': 'order_folder_status', + 'ordered_count': 'ordered_count', + 'ordered_list': 'ordered_list' } - def __init__( - self, - errored_count=None, - folder_name=None, - not_met_criteria_count=None, - order_folder_status=None, - ordered_count=None, - ordered_list=None, - _configuration=None, - ): # noqa: E501 - """OrderFolderResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, errored_count=None, folder_name=None, not_met_criteria_count=None, error_occured=None, error_msg_id=None, error_message=None, order_folder_status=None, ordered_count=None, ordered_list=None, local_vars_configuration=None): # noqa: E501 + """OrderFolderResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._errored_count = None self._folder_name = None self._not_met_criteria_count = None + self._error_occured = None + self._error_msg_id = None + self._error_message = None self._order_folder_status = None self._ordered_count = None self._ordered_list = None @@ -79,6 +83,12 @@ def __init__( self.folder_name = folder_name if not_met_criteria_count is not None: self.not_met_criteria_count = not_met_criteria_count + if error_occured is not None: + self.error_occured = error_occured + if error_msg_id is not None: + self.error_msg_id = error_msg_id + if error_message is not None: + self.error_message = error_message if order_folder_status is not None: self.order_folder_status = order_folder_status if ordered_count is not None: @@ -102,7 +112,7 @@ def errored_count(self, errored_count): :param errored_count: The errored_count of this OrderFolderResultItem. # noqa: E501 - :type: int + :type errored_count: int """ self._errored_count = errored_count @@ -123,7 +133,7 @@ def folder_name(self, folder_name): :param folder_name: The folder_name of this OrderFolderResultItem. # noqa: E501 - :type: str + :type folder_name: str """ self._folder_name = folder_name @@ -144,11 +154,74 @@ def not_met_criteria_count(self, not_met_criteria_count): :param not_met_criteria_count: The not_met_criteria_count of this OrderFolderResultItem. # noqa: E501 - :type: int + :type not_met_criteria_count: int """ self._not_met_criteria_count = not_met_criteria_count + @property + def error_occured(self): + """Gets the error_occured of this OrderFolderResultItem. # noqa: E501 + + + :return: The error_occured of this OrderFolderResultItem. # noqa: E501 + :rtype: bool + """ + return self._error_occured + + @error_occured.setter + def error_occured(self, error_occured): + """Sets the error_occured of this OrderFolderResultItem. + + + :param error_occured: The error_occured of this OrderFolderResultItem. # noqa: E501 + :type error_occured: bool + """ + + self._error_occured = error_occured + + @property + def error_msg_id(self): + """Gets the error_msg_id of this OrderFolderResultItem. # noqa: E501 + + + :return: The error_msg_id of this OrderFolderResultItem. # noqa: E501 + :rtype: str + """ + return self._error_msg_id + + @error_msg_id.setter + def error_msg_id(self, error_msg_id): + """Sets the error_msg_id of this OrderFolderResultItem. + + + :param error_msg_id: The error_msg_id of this OrderFolderResultItem. # noqa: E501 + :type error_msg_id: str + """ + + self._error_msg_id = error_msg_id + + @property + def error_message(self): + """Gets the error_message of this OrderFolderResultItem. # noqa: E501 + + + :return: The error_message of this OrderFolderResultItem. # noqa: E501 + :rtype: str + """ + return self._error_message + + @error_message.setter + def error_message(self, error_message): + """Sets the error_message of this OrderFolderResultItem. + + + :param error_message: The error_message of this OrderFolderResultItem. # noqa: E501 + :type error_message: str + """ + + self._error_message = error_message + @property def order_folder_status(self): """Gets the order_folder_status of this OrderFolderResultItem. # noqa: E501 @@ -165,22 +238,13 @@ def order_folder_status(self, order_folder_status): :param order_folder_status: The order_folder_status of this OrderFolderResultItem. # noqa: E501 - :type: str + :type order_folder_status: str """ - allowed_values = [ - "OrderFolderStatusSuccess", - "FolderNotFound", - "UnKnownError", - "UNRECOGNIZED", - ] # noqa: E501 - if ( - self._configuration.client_side_validation - and order_folder_status not in allowed_values - ): + allowed_values = ["OrderFolderStatusSuccess", "FolderNotFound", "UnKnownError", "UNRECOGNIZED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and order_folder_status not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `order_folder_status` ({0}), must be one of {1}".format( # noqa: E501 - order_folder_status, allowed_values - ) + "Invalid value for `order_folder_status` ({0}), must be one of {1}" # noqa: E501 + .format(order_folder_status, allowed_values) ) self._order_folder_status = order_folder_status @@ -201,7 +265,7 @@ def ordered_count(self, ordered_count): :param ordered_count: The ordered_count of this OrderFolderResultItem. # noqa: E501 - :type: int + :type ordered_count: int """ self._ordered_count = ordered_count @@ -222,37 +286,40 @@ def ordered_list(self, ordered_list): :param ordered_list: The ordered_list of this OrderFolderResultItem. # noqa: E501 - :type: list[OrderedItemItem] + :type ordered_list: list[OrderedItemItem] """ self._ordered_list = ordered_list - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OrderFolderResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/order_folder_results.py b/src/clients/ctm_api_client/models/order_folder_results.py index f4380ae..2c262ae 100644 --- a/src/clients/ctm_api_client/models/order_folder_results.py +++ b/src/clients/ctm_api_client/models/order_folder_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OrderFolderResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[OrderFolderResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[OrderFolderResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """OrderFolderResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """OrderFolderResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -73,12 +69,9 @@ def __init__( self.completed_status = completed_status if error is not None: self.error = error - if _from is not None: - self._from = _from - if results is not None: - self.results = results - if to is not None: - self.to = to + self._from = _from + self.results = results + self.to = to @property def completed_status(self): @@ -96,7 +89,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this OrderFolderResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +110,7 @@ def error(self, error): :param error: The error of this OrderFolderResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +131,7 @@ def _from(self, _from): :param _from: The _from of this OrderFolderResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +152,7 @@ def results(self, results): :param results: The results of this OrderFolderResults. # noqa: E501 - :type: list[OrderFolderResultItem] + :type results: list[OrderFolderResultItem] """ self._results = results @@ -180,37 +173,40 @@ def to(self, to): :param to: The to of this OrderFolderResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OrderFolderResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/order_parameters.py b/src/clients/ctm_api_client/models/order_parameters.py index 009f0f5..6cd8ffe 100644 --- a/src/clients/ctm_api_client/models/order_parameters.py +++ b/src/clients/ctm_api_client/models/order_parameters.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OrderParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "create_duplicate": "bool", - "hold": "bool", - "ignore_criteria": "bool", - "independent_flow": "bool", - "order_date": "str", - "order_into_folder": "str", - "order_into_folder_order_id": "str", - "variables": "list[NameValueAttribute]", - "wait_for_order_date": "bool", + openapi_types = { + 'create_duplicate': 'bool', + 'hold': 'bool', + 'ignore_criteria': 'bool', + 'independent_flow': 'bool', + 'order_date': 'str', + 'order_into_folder': 'str', + 'order_into_folder_order_id': 'str', + 'variables': 'list[NameValueAttribute]', + 'wait_for_order_date': 'bool' } attribute_map = { - "create_duplicate": "create_duplicate", - "hold": "hold", - "ignore_criteria": "ignore_criteria", - "independent_flow": "independent_flow", - "order_date": "order_date", - "order_into_folder": "order_into_folder", - "order_into_folder_order_id": "order_into_folder_order_id", - "variables": "variables", - "wait_for_order_date": "wait_for_order_date", + 'create_duplicate': 'create_duplicate', + 'hold': 'hold', + 'ignore_criteria': 'ignore_criteria', + 'independent_flow': 'independent_flow', + 'order_date': 'order_date', + 'order_into_folder': 'order_into_folder', + 'order_into_folder_order_id': 'order_into_folder_order_id', + 'variables': 'variables', + 'wait_for_order_date': 'wait_for_order_date' } - def __init__( - self, - create_duplicate=None, - hold=None, - ignore_criteria=None, - independent_flow=None, - order_date=None, - order_into_folder=None, - order_into_folder_order_id=None, - variables=None, - wait_for_order_date=None, - _configuration=None, - ): # noqa: E501 - """OrderParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, create_duplicate=None, hold=None, ignore_criteria=None, independent_flow=None, order_date=None, order_into_folder=None, order_into_folder_order_id=None, variables=None, wait_for_order_date=None, local_vars_configuration=None): # noqa: E501 + """OrderParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._create_duplicate = None self._hold = None @@ -120,7 +112,7 @@ def create_duplicate(self, create_duplicate): :param create_duplicate: The create_duplicate of this OrderParameters. # noqa: E501 - :type: bool + :type create_duplicate: bool """ self._create_duplicate = create_duplicate @@ -141,7 +133,7 @@ def hold(self, hold): :param hold: The hold of this OrderParameters. # noqa: E501 - :type: bool + :type hold: bool """ self._hold = hold @@ -162,7 +154,7 @@ def ignore_criteria(self, ignore_criteria): :param ignore_criteria: The ignore_criteria of this OrderParameters. # noqa: E501 - :type: bool + :type ignore_criteria: bool """ self._ignore_criteria = ignore_criteria @@ -183,7 +175,7 @@ def independent_flow(self, independent_flow): :param independent_flow: The independent_flow of this OrderParameters. # noqa: E501 - :type: bool + :type independent_flow: bool """ self._independent_flow = independent_flow @@ -204,7 +196,7 @@ def order_date(self, order_date): :param order_date: The order_date of this OrderParameters. # noqa: E501 - :type: str + :type order_date: str """ self._order_date = order_date @@ -225,23 +217,13 @@ def order_into_folder(self, order_into_folder): :param order_into_folder: The order_into_folder of this OrderParameters. # noqa: E501 - :type: str + :type order_into_folder: str """ - allowed_values = [ - "New", - "Recent", - "OrderId", - "Alone", - "UNRECOGNIZED", - ] # noqa: E501 - if ( - self._configuration.client_side_validation - and order_into_folder not in allowed_values - ): + allowed_values = ["New", "Recent", "OrderId", "Alone", "UNRECOGNIZED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and order_into_folder not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `order_into_folder` ({0}), must be one of {1}".format( # noqa: E501 - order_into_folder, allowed_values - ) + "Invalid value for `order_into_folder` ({0}), must be one of {1}" # noqa: E501 + .format(order_into_folder, allowed_values) ) self._order_into_folder = order_into_folder @@ -262,7 +244,7 @@ def order_into_folder_order_id(self, order_into_folder_order_id): :param order_into_folder_order_id: The order_into_folder_order_id of this OrderParameters. # noqa: E501 - :type: str + :type order_into_folder_order_id: str """ self._order_into_folder_order_id = order_into_folder_order_id @@ -283,7 +265,7 @@ def variables(self, variables): :param variables: The variables of this OrderParameters. # noqa: E501 - :type: list[NameValueAttribute] + :type variables: list[NameValueAttribute] """ self._variables = variables @@ -304,37 +286,40 @@ def wait_for_order_date(self, wait_for_order_date): :param wait_for_order_date: The wait_for_order_date of this OrderParameters. # noqa: E501 - :type: bool + :type wait_for_order_date: bool """ self._wait_for_order_date = wait_for_order_date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OrderParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ordered_item_item.py b/src/clients/ctm_api_client/models/ordered_item_item.py index fde614d..c4a14f6 100644 --- a/src/clients/ctm_api_client/models/ordered_item_item.py +++ b/src/clients/ctm_api_client/models/ordered_item_item.py @@ -5,71 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OrderedItemItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "file_name": "str", - "folder_name": "str", - "full_msg": "str", - "job_name": "str", - "job_type": "str", - "msg_data_arguments": "list[MsgDataArguments]", - "msg_id": "str", - "order_id": "str", + openapi_types = { + 'file_name': 'str', + 'folder_name': 'str', + 'full_msg': 'str', + 'job_name': 'str', + 'job_type': 'str', + 'msg_data_arguments': 'list[MsgDataArguments]', + 'msg_id': 'str', + 'order_id': 'str' } attribute_map = { - "file_name": "file_name", - "folder_name": "folder_name", - "full_msg": "full_msg", - "job_name": "job_name", - "job_type": "job_type", - "msg_data_arguments": "msg_data_arguments", - "msg_id": "msg_id", - "order_id": "order_id", + 'file_name': 'file_name', + 'folder_name': 'folder_name', + 'full_msg': 'full_msg', + 'job_name': 'job_name', + 'job_type': 'job_type', + 'msg_data_arguments': 'msg_data_arguments', + 'msg_id': 'msg_id', + 'order_id': 'order_id' } - def __init__( - self, - file_name=None, - folder_name=None, - full_msg=None, - job_name=None, - job_type=None, - msg_data_arguments=None, - msg_id=None, - order_id=None, - _configuration=None, - ): # noqa: E501 - """OrderedItemItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, file_name=None, folder_name=None, full_msg=None, job_name=None, job_type=None, msg_data_arguments=None, msg_id=None, order_id=None, local_vars_configuration=None): # noqa: E501 + """OrderedItemItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._file_name = None self._folder_name = None @@ -114,7 +107,7 @@ def file_name(self, file_name): :param file_name: The file_name of this OrderedItemItem. # noqa: E501 - :type: str + :type file_name: str """ self._file_name = file_name @@ -135,7 +128,7 @@ def folder_name(self, folder_name): :param folder_name: The folder_name of this OrderedItemItem. # noqa: E501 - :type: str + :type folder_name: str """ self._folder_name = folder_name @@ -156,7 +149,7 @@ def full_msg(self, full_msg): :param full_msg: The full_msg of this OrderedItemItem. # noqa: E501 - :type: str + :type full_msg: str """ self._full_msg = full_msg @@ -177,7 +170,7 @@ def job_name(self, job_name): :param job_name: The job_name of this OrderedItemItem. # noqa: E501 - :type: str + :type job_name: str """ self._job_name = job_name @@ -198,22 +191,13 @@ def job_type(self, job_type): :param job_type: The job_type of this OrderedItemItem. # noqa: E501 - :type: str + :type job_type: str """ - allowed_values = [ - "job", - "smartFolder", - "subFolder", - "UNRECOGNIZED", - ] # noqa: E501 - if ( - self._configuration.client_side_validation - and job_type not in allowed_values - ): + allowed_values = ["job", "smartFolder", "subFolder", "UNRECOGNIZED"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and job_type not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `job_type` ({0}), must be one of {1}".format( # noqa: E501 - job_type, allowed_values - ) + "Invalid value for `job_type` ({0}), must be one of {1}" # noqa: E501 + .format(job_type, allowed_values) ) self._job_type = job_type @@ -234,7 +218,7 @@ def msg_data_arguments(self, msg_data_arguments): :param msg_data_arguments: The msg_data_arguments of this OrderedItemItem. # noqa: E501 - :type: list[MsgDataArguments] + :type msg_data_arguments: list[MsgDataArguments] """ self._msg_data_arguments = msg_data_arguments @@ -255,7 +239,7 @@ def msg_id(self, msg_id): :param msg_id: The msg_id of this OrderedItemItem. # noqa: E501 - :type: str + :type msg_id: str """ self._msg_id = msg_id @@ -276,37 +260,40 @@ def order_id(self, order_id): :param order_id: The order_id of this OrderedItemItem. # noqa: E501 - :type: str + :type order_id: str """ self._order_id = order_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OrderedItemItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/output.py b/src/clients/ctm_api_client/models/output.py index 41a344b..8fe2a69 100644 --- a/src/clients/ctm_api_client/models/output.py +++ b/src/clients/ctm_api_client/models/output.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Output(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"output": "str"} + openapi_types = { + 'output': 'str' + } - attribute_map = {"output": "output"} + attribute_map = { + 'output': 'output' + } - def __init__(self, output=None, _configuration=None): # noqa: E501 - """Output - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, output=None, local_vars_configuration=None): # noqa: E501 + """Output - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._output = None self.discriminator = None @@ -64,37 +72,40 @@ def output(self, output): :param output: The output of this Output. # noqa: E501 - :type: str + :type output: str """ self._output = output - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Output, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/output_params.py b/src/clients/ctm_api_client/models/output_params.py index d9a2142..050704f 100644 --- a/src/clients/ctm_api_client/models/output_params.py +++ b/src/clients/ctm_api_client/models/output_params.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class OutputParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm": "str", - "order_id": "str", - "number_of_runs": "int", - "output_table": "str", + openapi_types = { + 'ctm': 'str', + 'order_id': 'str', + 'number_of_runs': 'int', + 'output_table': 'str' } attribute_map = { - "ctm": "ctm", - "order_id": "orderId", - "number_of_runs": "numberOfRuns", - "output_table": "outputTable", + 'ctm': 'ctm', + 'order_id': 'orderId', + 'number_of_runs': 'numberOfRuns', + 'output_table': 'outputTable' } - def __init__( - self, - ctm=None, - order_id=None, - number_of_runs=None, - output_table=None, - _configuration=None, - ): # noqa: E501 - """OutputParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm=None, order_id=None, number_of_runs=None, output_table=None, local_vars_configuration=None): # noqa: E501 + """OutputParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm = None self._order_id = None @@ -92,7 +89,7 @@ def ctm(self, ctm): The name of the Control-M server in which the job was ordered from. HIDDEN. # noqa: E501 :param ctm: The ctm of this OutputParams. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -115,7 +112,7 @@ def order_id(self, order_id): Job's order id. HIDDEN. # noqa: E501 :param order_id: The order_id of this OutputParams. # noqa: E501 - :type: str + :type order_id: str """ self._order_id = order_id @@ -138,7 +135,7 @@ def number_of_runs(self, number_of_runs): Job's rerun number. HIDDEN. # noqa: E501 :param number_of_runs: The number_of_runs of this OutputParams. # noqa: E501 - :type: int + :type number_of_runs: int """ self._number_of_runs = number_of_runs @@ -161,37 +158,40 @@ def output_table(self, output_table): Job's output table name, accepted as a value in search request. HIDDEN. # noqa: E501 :param output_table: The output_table of this OutputParams. # noqa: E501 - :type: str + :type output_table: str """ self._output_table = output_table - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(OutputParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/passwords_object.py b/src/clients/ctm_api_client/models/passwords_object.py index 2981696..961376d 100644 --- a/src/clients/ctm_api_client/models/passwords_object.py +++ b/src/clients/ctm_api_client/models/passwords_object.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PasswordsObject(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"user": "str", "current_password": "str", "new_password": "str"} + openapi_types = { + 'user': 'str', + 'current_password': 'str', + 'new_password': 'str' + } attribute_map = { - "user": "user", - "current_password": "currentPassword", - "new_password": "newPassword", + 'user': 'user', + 'current_password': 'currentPassword', + 'new_password': 'newPassword' } - def __init__( - self, user=None, current_password=None, new_password=None, _configuration=None - ): # noqa: E501 - """PasswordsObject - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, user=None, current_password=None, new_password=None, local_vars_configuration=None): # noqa: E501 + """PasswordsObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._user = None self._current_password = None @@ -78,7 +84,7 @@ def user(self, user): user name HIDDEN # noqa: E501 :param user: The user of this PasswordsObject. # noqa: E501 - :type: str + :type user: str """ self._user = user @@ -101,7 +107,7 @@ def current_password(self, current_password): current password # noqa: E501 :param current_password: The current_password of this PasswordsObject. # noqa: E501 - :type: str + :type current_password: str """ self._current_password = current_password @@ -124,37 +130,40 @@ def new_password(self, new_password): new password # noqa: E501 :param new_password: The new_password of this PasswordsObject. # noqa: E501 - :type: str + :type new_password: str """ self._new_password = new_password - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PasswordsObject, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/performance.py b/src/clients/ctm_api_client/models/performance.py index 6843c17..22a49b7 100644 --- a/src/clients/ctm_api_client/models/performance.py +++ b/src/clients/ctm_api_client/models/performance.py @@ -5,56 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Performance(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "type": "str", - "name": "str", - "unit": "str", - "value": "str", - "key": "str", + openapi_types = { + 'type': 'str', + 'name': 'str', + 'unit': 'str', + 'value': 'str', + 'key': 'str' } attribute_map = { - "type": "type", - "name": "name", - "unit": "unit", - "value": "value", - "key": "key", + 'type': 'type', + 'name': 'name', + 'unit': 'unit', + 'value': 'value', + 'key': 'key' } - def __init__( - self, type=None, name=None, unit=None, value=None, key=None, _configuration=None - ): # noqa: E501 - """Performance - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, type=None, name=None, unit=None, value=None, key=None, local_vars_configuration=None): # noqa: E501 + """Performance - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._type = None self._name = None @@ -92,7 +94,7 @@ def type(self, type): the type of the availability metric # noqa: E501 :param type: The type of this Performance. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -115,7 +117,7 @@ def name(self, name): the name of the metric # noqa: E501 :param name: The name of this Performance. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -138,7 +140,7 @@ def unit(self, unit): the unit of measurement # noqa: E501 :param unit: The unit of this Performance. # noqa: E501 - :type: str + :type unit: str """ self._unit = unit @@ -161,7 +163,7 @@ def value(self, value): the value of the metric # noqa: E501 :param value: The value of this Performance. # noqa: E501 - :type: str + :type value: str """ self._value = value @@ -184,37 +186,40 @@ def key(self, key): A unique key for the metric # noqa: E501 :param key: The key of this Performance. # noqa: E501 - :type: str + :type key: str """ self._key = key - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Performance, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/pgp_template_data.py b/src/clients/ctm_api_client/models/pgp_template_data.py index 2136cfe..8d87b9d 100644 --- a/src/clients/ctm_api_client/models/pgp_template_data.py +++ b/src/clients/ctm_api_client/models/pgp_template_data.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PgpTemplateData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "executable_full_path": "str", - "exit_code": "int", - "passphrase": "str", - "recipient": "str", - "encryption_attributes": "str", - "decryption_attributes": "str", + openapi_types = { + 'name': 'str', + 'executable_full_path': 'str', + 'exit_code': 'int', + 'passphrase': 'str', + 'recipient': 'str', + 'encryption_attributes': 'str', + 'decryption_attributes': 'str' } attribute_map = { - "name": "name", - "executable_full_path": "executableFullPath", - "exit_code": "exitCode", - "passphrase": "passphrase", - "recipient": "recipient", - "encryption_attributes": "encryptionAttributes", - "decryption_attributes": "decryptionAttributes", + 'name': 'name', + 'executable_full_path': 'executableFullPath', + 'exit_code': 'exitCode', + 'passphrase': 'passphrase', + 'recipient': 'recipient', + 'encryption_attributes': 'encryptionAttributes', + 'decryption_attributes': 'decryptionAttributes' } - def __init__( - self, - name=None, - executable_full_path=None, - exit_code=0, - passphrase=None, - recipient=None, - encryption_attributes=None, - decryption_attributes=None, - _configuration=None, - ): # noqa: E501 - """PgpTemplateData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, executable_full_path=None, exit_code=0, passphrase=None, recipient=None, encryption_attributes=None, decryption_attributes=None, local_vars_configuration=None): # noqa: E501 + """PgpTemplateData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._executable_full_path = None @@ -110,7 +104,7 @@ def name(self, name): Template name HIDDEN # noqa: E501 :param name: The name of this PgpTemplateData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -133,7 +127,7 @@ def executable_full_path(self, executable_full_path): Executable Full Path HIDDEN # noqa: E501 :param executable_full_path: The executable_full_path of this PgpTemplateData. # noqa: E501 - :type: str + :type executable_full_path: str """ self._executable_full_path = executable_full_path @@ -156,7 +150,7 @@ def exit_code(self, exit_code): Exit code (default 0) HIDDEN # noqa: E501 :param exit_code: The exit_code of this PgpTemplateData. # noqa: E501 - :type: int + :type exit_code: int """ self._exit_code = exit_code @@ -179,7 +173,7 @@ def passphrase(self, passphrase): passphrase HIDDEN # noqa: E501 :param passphrase: The passphrase of this PgpTemplateData. # noqa: E501 - :type: str + :type passphrase: str """ self._passphrase = passphrase @@ -202,7 +196,7 @@ def recipient(self, recipient): Recipient HIDDEN # noqa: E501 :param recipient: The recipient of this PgpTemplateData. # noqa: E501 - :type: str + :type recipient: str """ self._recipient = recipient @@ -225,7 +219,7 @@ def encryption_attributes(self, encryption_attributes): Encryption Attributes HIDDEN # noqa: E501 :param encryption_attributes: The encryption_attributes of this PgpTemplateData. # noqa: E501 - :type: str + :type encryption_attributes: str """ self._encryption_attributes = encryption_attributes @@ -248,37 +242,40 @@ def decryption_attributes(self, decryption_attributes): Decryption Attributes HIDDEN # noqa: E501 :param decryption_attributes: The decryption_attributes of this PgpTemplateData. # noqa: E501 - :type: str + :type decryption_attributes: str """ self._decryption_attributes = decryption_attributes - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PgpTemplateData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ping_agent_params.py b/src/clients/ctm_api_client/models/ping_agent_params.py index 231eb35..8c99c3d 100644 --- a/src/clients/ctm_api_client/models/ping_agent_params.py +++ b/src/clients/ctm_api_client/models/ping_agent_params.py @@ -5,49 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PingAgentParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"discover": "bool", "timeout": "int"} - - attribute_map = {"discover": "discover", "timeout": "timeout"} - - def __init__(self, discover=False, timeout=60, _configuration=None): # noqa: E501 - """PingAgentParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'discover': 'bool', + 'timeout': 'int', + 'agent_type': 'str' + } + + attribute_map = { + 'discover': 'discover', + 'timeout': 'timeout', + 'agent_type': 'agentType' + } + + def __init__(self, discover=False, timeout=60, agent_type=None, local_vars_configuration=None): # noqa: E501 + """PingAgentParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._discover = None self._timeout = None + self._agent_type = None self.discriminator = None - self.discover = discover - self.timeout = timeout + if discover is not None: + self.discover = discover + if timeout is not None: + self.timeout = timeout + if agent_type is not None: + self.agent_type = agent_type @property def discover(self): @@ -67,12 +84,8 @@ def discover(self, discover): Discover parameter when true the agent will be added to the Control-M. HIDDEN # noqa: E501 :param discover: The discover of this PingAgentParams. # noqa: E501 - :type: bool + :type discover: bool """ - if self._configuration.client_side_validation and discover is None: - raise ValueError( - "Invalid value for `discover`, must not be `None`" - ) # noqa: E501 self._discover = discover @@ -94,41 +107,63 @@ def timeout(self, timeout): maximum time in seconds to wait (default 60). HIDDEN # noqa: E501 :param timeout: The timeout of this PingAgentParams. # noqa: E501 - :type: int + :type timeout: int """ - if self._configuration.client_side_validation and timeout is None: - raise ValueError( - "Invalid value for `timeout`, must not be `None`" - ) # noqa: E501 self._timeout = timeout - def to_dict(self): + @property + def agent_type(self): + """Gets the agent_type of this PingAgentParams. # noqa: E501 + + The agent's type. # noqa: E501 + + :return: The agent_type of this PingAgentParams. # noqa: E501 + :rtype: str + """ + return self._agent_type + + @agent_type.setter + def agent_type(self, agent_type): + """Sets the agent_type of this PingAgentParams. + + The agent's type. # noqa: E501 + + :param agent_type: The agent_type of this PingAgentParams. # noqa: E501 + :type agent_type: str + """ + + self._agent_type = agent_type + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PingAgentParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/planning_privilege_category.py b/src/clients/ctm_api_client/models/planning_privilege_category.py index 6bd1f18..1674e2f 100644 --- a/src/clients/ctm_api_client/models/planning_privilege_category.py +++ b/src/clients/ctm_api_client/models/planning_privilege_category.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PlanningPrivilegeCategory(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "periodical_statistics": "str", - "forecast_or_batch_impact_manager_config": "str", - "promotion_rules": "str", - "promote_action": "str", + openapi_types = { + 'periodical_statistics': 'str', + 'forecast_or_batch_impact_manager_config': 'str', + 'promotion_rules': 'str', + 'promote_action': 'str' } attribute_map = { - "periodical_statistics": "PeriodicalStatistics", - "forecast_or_batch_impact_manager_config": "ForecastOrBatchImpactManagerConfig", - "promotion_rules": "PromotionRules", - "promote_action": "PromoteAction", + 'periodical_statistics': 'PeriodicalStatistics', + 'forecast_or_batch_impact_manager_config': 'ForecastOrBatchImpactManagerConfig', + 'promotion_rules': 'PromotionRules', + 'promote_action': 'PromoteAction' } - def __init__( - self, - periodical_statistics=None, - forecast_or_batch_impact_manager_config=None, - promotion_rules=None, - promote_action=None, - _configuration=None, - ): # noqa: E501 - """PlanningPrivilegeCategory - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, periodical_statistics=None, forecast_or_batch_impact_manager_config=None, promotion_rules=None, promote_action=None, local_vars_configuration=None): # noqa: E501 + """PlanningPrivilegeCategory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._periodical_statistics = None self._forecast_or_batch_impact_manager_config = None @@ -68,9 +65,7 @@ def __init__( if periodical_statistics is not None: self.periodical_statistics = periodical_statistics if forecast_or_batch_impact_manager_config is not None: - self.forecast_or_batch_impact_manager_config = ( - forecast_or_batch_impact_manager_config - ) + self.forecast_or_batch_impact_manager_config = forecast_or_batch_impact_manager_config if promotion_rules is not None: self.promotion_rules = promotion_rules if promote_action is not None: @@ -94,7 +89,7 @@ def periodical_statistics(self, periodical_statistics): Periodical Statistics access level (None, Browse, Update, Full) # noqa: E501 :param periodical_statistics: The periodical_statistics of this PlanningPrivilegeCategory. # noqa: E501 - :type: str + :type periodical_statistics: str """ self._periodical_statistics = periodical_statistics @@ -111,20 +106,16 @@ def forecast_or_batch_impact_manager_config(self): return self._forecast_or_batch_impact_manager_config @forecast_or_batch_impact_manager_config.setter - def forecast_or_batch_impact_manager_config( - self, forecast_or_batch_impact_manager_config - ): + def forecast_or_batch_impact_manager_config(self, forecast_or_batch_impact_manager_config): """Sets the forecast_or_batch_impact_manager_config of this PlanningPrivilegeCategory. Forecast/BIM Configuration access level (None, Browse, Update, Full) # noqa: E501 :param forecast_or_batch_impact_manager_config: The forecast_or_batch_impact_manager_config of this PlanningPrivilegeCategory. # noqa: E501 - :type: str + :type forecast_or_batch_impact_manager_config: str """ - self._forecast_or_batch_impact_manager_config = ( - forecast_or_batch_impact_manager_config - ) + self._forecast_or_batch_impact_manager_config = forecast_or_batch_impact_manager_config @property def promotion_rules(self): @@ -144,7 +135,7 @@ def promotion_rules(self, promotion_rules): Promotion Rules access level (None, Browse, Update, Full) # noqa: E501 :param promotion_rules: The promotion_rules of this PlanningPrivilegeCategory. # noqa: E501 - :type: str + :type promotion_rules: str """ self._promotion_rules = promotion_rules @@ -167,37 +158,40 @@ def promote_action(self, promote_action): Promote Action access level (None, Browse, Update, Full) # noqa: E501 :param promote_action: The promote_action of this PlanningPrivilegeCategory. # noqa: E501 - :type: str + :type promote_action: str """ self._promote_action = promote_action - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PlanningPrivilegeCategory, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/plugin_data.py b/src/clients/ctm_api_client/models/plugin_data.py index fa856a0..76e5481 100644 --- a/src/clients/ctm_api_client/models/plugin_data.py +++ b/src/clients/ctm_api_client/models/plugin_data.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PluginData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "application_type": "str", - "application_version": "str", - "plugin_version": "str", - "version": "str", - "current_state": "str", - "status": "str", - "status_message": "str", - "last_update": "str", - "b2b_activated": "str", + openapi_types = { + 'application_type': 'str', + 'application_version': 'str', + 'plugin_version': 'str', + 'version': 'str', + 'current_state': 'str', + 'status': 'str', + 'status_message': 'str', + 'last_update': 'str', + 'b2b_activated': 'str' } attribute_map = { - "application_type": "applicationType", - "application_version": "applicationVersion", - "plugin_version": "pluginVersion", - "version": "version", - "current_state": "currentState", - "status": "status", - "status_message": "statusMessage", - "last_update": "lastUpdate", - "b2b_activated": "b2bActivated", + 'application_type': 'applicationType', + 'application_version': 'applicationVersion', + 'plugin_version': 'pluginVersion', + 'version': 'version', + 'current_state': 'currentState', + 'status': 'status', + 'status_message': 'statusMessage', + 'last_update': 'lastUpdate', + 'b2b_activated': 'b2bActivated' } - def __init__( - self, - application_type=None, - application_version=None, - plugin_version=None, - version=None, - current_state=None, - status=None, - status_message=None, - last_update=None, - b2b_activated=None, - _configuration=None, - ): # noqa: E501 - """PluginData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, application_type=None, application_version=None, plugin_version=None, version=None, current_state=None, status=None, status_message=None, last_update=None, b2b_activated=None, local_vars_configuration=None): # noqa: E501 + """PluginData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._application_type = None self._application_version = None @@ -122,7 +114,7 @@ def application_type(self, application_type): The application type # noqa: E501 :param application_type: The application_type of this PluginData. # noqa: E501 - :type: str + :type application_type: str """ self._application_type = application_type @@ -145,7 +137,7 @@ def application_version(self, application_version): The application version # noqa: E501 :param application_version: The application_version of this PluginData. # noqa: E501 - :type: str + :type application_version: str """ self._application_version = application_version @@ -168,7 +160,7 @@ def plugin_version(self, plugin_version): The plugin version # noqa: E501 :param plugin_version: The plugin_version of this PluginData. # noqa: E501 - :type: str + :type plugin_version: str """ self._plugin_version = plugin_version @@ -191,7 +183,7 @@ def version(self, version): The version # noqa: E501 :param version: The version of this PluginData. # noqa: E501 - :type: str + :type version: str """ self._version = version @@ -214,7 +206,7 @@ def current_state(self, current_state): The current state # noqa: E501 :param current_state: The current_state of this PluginData. # noqa: E501 - :type: str + :type current_state: str """ self._current_state = current_state @@ -237,7 +229,7 @@ def status(self, status): The status # noqa: E501 :param status: The status of this PluginData. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -260,7 +252,7 @@ def status_message(self, status_message): The status message # noqa: E501 :param status_message: The status_message of this PluginData. # noqa: E501 - :type: str + :type status_message: str """ self._status_message = status_message @@ -283,7 +275,7 @@ def last_update(self, last_update): The last update # noqa: E501 :param last_update: The last_update of this PluginData. # noqa: E501 - :type: str + :type last_update: str """ self._last_update = last_update @@ -306,37 +298,40 @@ def b2b_activated(self, b2b_activated): The B2B activated indication # noqa: E501 :param b2b_activated: The b2b_activated of this PluginData. # noqa: E501 - :type: str + :type b2b_activated: str """ self._b2b_activated = b2b_activated - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PluginData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/plugin_mng_auth.py b/src/clients/ctm_api_client/models/plugin_mng_auth.py index f99e684..948e4d8 100644 --- a/src/clients/ctm_api_client/models/plugin_mng_auth.py +++ b/src/clients/ctm_api_client/models/plugin_mng_auth.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PluginMngAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "controlm_server": "str", - "agent": "str", - "plugin_type": "str", - "privilege": "str", + openapi_types = { + 'controlm_server': 'str', + 'agent': 'str', + 'plugin_type': 'str', + 'privilege': 'str' } attribute_map = { - "controlm_server": "ControlmServer", - "agent": "Agent", - "plugin_type": "PluginType", - "privilege": "Privilege", + 'controlm_server': 'ControlmServer', + 'agent': 'Agent', + 'plugin_type': 'PluginType', + 'privilege': 'Privilege' } - def __init__( - self, - controlm_server=None, - agent=None, - plugin_type=None, - privilege=None, - _configuration=None, - ): # noqa: E501 - """PluginMngAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, controlm_server=None, agent=None, plugin_type=None, privilege=None, local_vars_configuration=None): # noqa: E501 + """PluginMngAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._controlm_server = None self._agent = None @@ -92,7 +89,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this PluginMngAuth. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -115,7 +112,7 @@ def agent(self, agent): agent name # noqa: E501 :param agent: The agent of this PluginMngAuth. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -138,7 +135,7 @@ def plugin_type(self, plugin_type): plugin type # noqa: E501 :param plugin_type: The plugin_type of this PluginMngAuth. # noqa: E501 - :type: str + :type plugin_type: str """ self._plugin_type = plugin_type @@ -161,37 +158,40 @@ def privilege(self, privilege): access level (full, update, browse) # noqa: E501 :param privilege: The privilege of this PluginMngAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PluginMngAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/pool_variables_error_info.py b/src/clients/ctm_api_client/models/pool_variables_error_info.py index 2f40f28..5d1d20e 100644 --- a/src/clients/ctm_api_client/models/pool_variables_error_info.py +++ b/src/clients/ctm_api_client/models/pool_variables_error_info.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PoolVariablesErrorInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"ctmvar_error_info": "list[CtmvarErrorInfo]", "pool_name": "str"} - - attribute_map = {"ctmvar_error_info": "ctmvar_error_info", "pool_name": "pool_name"} - - def __init__( - self, ctmvar_error_info=None, pool_name=None, _configuration=None - ): # noqa: E501 - """PoolVariablesErrorInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'ctmvar_error_info': 'list[CtmvarErrorInfo]', + 'pool_name': 'str' + } + + attribute_map = { + 'ctmvar_error_info': 'ctmvar_error_info', + 'pool_name': 'pool_name' + } + + def __init__(self, ctmvar_error_info=None, pool_name=None, local_vars_configuration=None): # noqa: E501 + """PoolVariablesErrorInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctmvar_error_info = None self._pool_name = None @@ -69,7 +77,7 @@ def ctmvar_error_info(self, ctmvar_error_info): :param ctmvar_error_info: The ctmvar_error_info of this PoolVariablesErrorInfo. # noqa: E501 - :type: list[CtmvarErrorInfo] + :type ctmvar_error_info: list[CtmvarErrorInfo] """ self._ctmvar_error_info = ctmvar_error_info @@ -90,37 +98,40 @@ def pool_name(self, pool_name): :param pool_name: The pool_name of this PoolVariablesErrorInfo. # noqa: E501 - :type: str + :type pool_name: str """ self._pool_name = pool_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PoolVariablesErrorInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/pool_variables_name.py b/src/clients/ctm_api_client/models/pool_variables_name.py index c23d7a3..c636399 100644 --- a/src/clients/ctm_api_client/models/pool_variables_name.py +++ b/src/clients/ctm_api_client/models/pool_variables_name.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PoolVariablesName(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"pool_name": "str", "variable_name": "list[str]"} - - attribute_map = {"pool_name": "pool_name", "variable_name": "variable_name"} - - def __init__( - self, pool_name=None, variable_name=None, _configuration=None - ): # noqa: E501 - """PoolVariablesName - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'pool_name': 'str', + 'variable_name': 'list[str]' + } + + attribute_map = { + 'pool_name': 'pool_name', + 'variable_name': 'variable_name' + } + + def __init__(self, pool_name=None, variable_name=None, local_vars_configuration=None): # noqa: E501 + """PoolVariablesName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._pool_name = None self._variable_name = None @@ -69,7 +77,7 @@ def pool_name(self, pool_name): :param pool_name: The pool_name of this PoolVariablesName. # noqa: E501 - :type: str + :type pool_name: str """ self._pool_name = pool_name @@ -90,37 +98,40 @@ def variable_name(self, variable_name): :param variable_name: The variable_name of this PoolVariablesName. # noqa: E501 - :type: list[str] + :type variable_name: list[str] """ self._variable_name = variable_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PoolVariablesName, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/pool_variables_name_value.py b/src/clients/ctm_api_client/models/pool_variables_name_value.py index 3a6e00a..e5db0ed 100644 --- a/src/clients/ctm_api_client/models/pool_variables_name_value.py +++ b/src/clients/ctm_api_client/models/pool_variables_name_value.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PoolVariablesNameValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "pool_name": "str", - "variable_name_value": "list[VariableNameValue]", + openapi_types = { + 'pool_name': 'str', + 'variable_name_value': 'list[VariableNameValue]' } attribute_map = { - "pool_name": "pool_name", - "variable_name_value": "variable_name_value", + 'pool_name': 'pool_name', + 'variable_name_value': 'variable_name_value' } - def __init__( - self, pool_name=None, variable_name_value=None, _configuration=None - ): # noqa: E501 - """PoolVariablesNameValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, pool_name=None, variable_name_value=None, local_vars_configuration=None): # noqa: E501 + """PoolVariablesNameValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._pool_name = None self._variable_name_value = None @@ -75,7 +77,7 @@ def pool_name(self, pool_name): :param pool_name: The pool_name of this PoolVariablesNameValue. # noqa: E501 - :type: str + :type pool_name: str """ self._pool_name = pool_name @@ -96,37 +98,40 @@ def variable_name_value(self, variable_name_value): :param variable_name_value: The variable_name_value of this PoolVariablesNameValue. # noqa: E501 - :type: list[VariableNameValue] + :type variable_name_value: list[VariableNameValue] """ self._variable_name_value = variable_name_value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PoolVariablesNameValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/possible_value_properties.py b/src/clients/ctm_api_client/models/possible_value_properties.py index 363cc96..a5fa90a 100644 --- a/src/clients/ctm_api_client/models/possible_value_properties.py +++ b/src/clients/ctm_api_client/models/possible_value_properties.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PossibleValueProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"label": "str", "label_id": "str", "value": "str"} - - attribute_map = {"label": "label", "label_id": "labelID", "value": "value"} - - def __init__( - self, label=None, label_id=None, value=None, _configuration=None - ): # noqa: E501 - """PossibleValueProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'label': 'str', + 'label_id': 'str', + 'value': 'str' + } + + attribute_map = { + 'label': 'label', + 'label_id': 'labelID', + 'value': 'value' + } + + def __init__(self, label=None, label_id=None, value=None, local_vars_configuration=None): # noqa: E501 + """PossibleValueProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._label = None self._label_id = None @@ -72,7 +82,7 @@ def label(self, label): :param label: The label of this PossibleValueProperties. # noqa: E501 - :type: str + :type label: str """ self._label = label @@ -93,7 +103,7 @@ def label_id(self, label_id): :param label_id: The label_id of this PossibleValueProperties. # noqa: E501 - :type: str + :type label_id: str """ self._label_id = label_id @@ -114,37 +124,40 @@ def value(self, value): :param value: The value of this PossibleValueProperties. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PossibleValueProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/privilege_name.py b/src/clients/ctm_api_client/models/privilege_name.py index c093090..6166fc7 100644 --- a/src/clients/ctm_api_client/models/privilege_name.py +++ b/src/clients/ctm_api_client/models/privilege_name.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PrivilegeName(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"privilege": "str", "name": "str"} - - attribute_map = {"privilege": "Privilege", "name": "Name"} - - def __init__(self, privilege=None, name=None, _configuration=None): # noqa: E501 - """PrivilegeName - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'privilege': 'str', + 'name': 'str' + } + + attribute_map = { + 'privilege': 'Privilege', + 'name': 'Name' + } + + def __init__(self, privilege=None, name=None, local_vars_configuration=None): # noqa: E501 + """PrivilegeName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._privilege = None self._name = None @@ -69,7 +79,7 @@ def privilege(self, privilege): access level (none, full, update, browse) # noqa: E501 :param privilege: The privilege of this PrivilegeName. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege @@ -92,37 +102,40 @@ def name(self, name): pattern value # noqa: E501 :param name: The name of this PrivilegeName. # noqa: E501 - :type: str + :type name: str """ self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PrivilegeName, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/privilege_name_controlm.py b/src/clients/ctm_api_client/models/privilege_name_controlm.py index 5e8804e..5aaa20c 100644 --- a/src/clients/ctm_api_client/models/privilege_name_controlm.py +++ b/src/clients/ctm_api_client/models/privilege_name_controlm.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class PrivilegeNameControlm(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"privilege": "str", "controlm_server": "str", "name": "str"} + openapi_types = { + 'privilege': 'str', + 'controlm_server': 'str', + 'name': 'str' + } attribute_map = { - "privilege": "Privilege", - "controlm_server": "ControlmServer", - "name": "Name", + 'privilege': 'Privilege', + 'controlm_server': 'ControlmServer', + 'name': 'Name' } - def __init__( - self, privilege=None, controlm_server=None, name=None, _configuration=None - ): # noqa: E501 - """PrivilegeNameControlm - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, privilege=None, controlm_server=None, name=None, local_vars_configuration=None): # noqa: E501 + """PrivilegeNameControlm - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._privilege = None self._controlm_server = None @@ -78,7 +84,7 @@ def privilege(self, privilege): access level (Full, Update, Browse) # noqa: E501 :param privilege: The privilege of this PrivilegeNameControlm. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege @@ -101,7 +107,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this PrivilegeNameControlm. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -124,37 +130,40 @@ def name(self, name): property name # noqa: E501 :param name: The name of this PrivilegeNameControlm. # noqa: E501 - :type: str + :type name: str """ self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(PrivilegeNameControlm, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/privileges.py b/src/clients/ctm_api_client/models/privileges.py index 419cd40..2dd995d 100644 --- a/src/clients/ctm_api_client/models/privileges.py +++ b/src/clients/ctm_api_client/models/privileges.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Privileges(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "client_access": "ClientAccessPrivilegeCategory", - "configuration_manager": "ConfigurationManagerPrivilegeCategory", - "monitoring": "MonitoringPrivilegeCategory", - "planning": "PlanningPrivilegeCategory", - "tools": "ToolsPrivilegeCategory", - "viewpoint_manager": "ViewpointManagerPrivilegeCategory", + openapi_types = { + 'client_access': 'ClientAccessPrivilegeCategory', + 'configuration_manager': 'ConfigurationManagerPrivilegeCategory', + 'monitoring': 'MonitoringPrivilegeCategory', + 'planning': 'PlanningPrivilegeCategory', + 'tools': 'ToolsPrivilegeCategory', + 'viewpoint_manager': 'ViewpointManagerPrivilegeCategory' } attribute_map = { - "client_access": "ClientAccess", - "configuration_manager": "ConfigurationManager", - "monitoring": "Monitoring", - "planning": "Planning", - "tools": "Tools", - "viewpoint_manager": "ViewpointManager", + 'client_access': 'ClientAccess', + 'configuration_manager': 'ConfigurationManager', + 'monitoring': 'Monitoring', + 'planning': 'Planning', + 'tools': 'Tools', + 'viewpoint_manager': 'ViewpointManager' } - def __init__( - self, - client_access=None, - configuration_manager=None, - monitoring=None, - planning=None, - tools=None, - viewpoint_manager=None, - _configuration=None, - ): # noqa: E501 - """Privileges - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, client_access=None, configuration_manager=None, monitoring=None, planning=None, tools=None, viewpoint_manager=None, local_vars_configuration=None): # noqa: E501 + """Privileges - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._client_access = None self._configuration_manager = None @@ -102,7 +97,7 @@ def client_access(self, client_access): :param client_access: The client_access of this Privileges. # noqa: E501 - :type: ClientAccessPrivilegeCategory + :type client_access: ClientAccessPrivilegeCategory """ self._client_access = client_access @@ -123,7 +118,7 @@ def configuration_manager(self, configuration_manager): :param configuration_manager: The configuration_manager of this Privileges. # noqa: E501 - :type: ConfigurationManagerPrivilegeCategory + :type configuration_manager: ConfigurationManagerPrivilegeCategory """ self._configuration_manager = configuration_manager @@ -144,7 +139,7 @@ def monitoring(self, monitoring): :param monitoring: The monitoring of this Privileges. # noqa: E501 - :type: MonitoringPrivilegeCategory + :type monitoring: MonitoringPrivilegeCategory """ self._monitoring = monitoring @@ -165,7 +160,7 @@ def planning(self, planning): :param planning: The planning of this Privileges. # noqa: E501 - :type: PlanningPrivilegeCategory + :type planning: PlanningPrivilegeCategory """ self._planning = planning @@ -186,7 +181,7 @@ def tools(self, tools): :param tools: The tools of this Privileges. # noqa: E501 - :type: ToolsPrivilegeCategory + :type tools: ToolsPrivilegeCategory """ self._tools = tools @@ -207,37 +202,40 @@ def viewpoint_manager(self, viewpoint_manager): :param viewpoint_manager: The viewpoint_manager of this Privileges. # noqa: E501 - :type: ViewpointManagerPrivilegeCategory + :type viewpoint_manager: ViewpointManagerPrivilegeCategory """ self._viewpoint_manager = viewpoint_manager - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Privileges, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/product_description.py b/src/clients/ctm_api_client/models/product_description.py index cc3d428..d30745b 100644 --- a/src/clients/ctm_api_client/models/product_description.py +++ b/src/clients/ctm_api_client/models/product_description.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ProductDescription(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "product_name": "str", - "product_description": "str", - "is_section_open": "bool", - "static_text": "bool", - "token_component": "bool", + openapi_types = { + 'product_name': 'str', + 'product_description': 'str', + 'is_section_open': 'bool', + 'static_text': 'bool', + 'token_component': 'bool' } attribute_map = { - "product_name": "productName", - "product_description": "productDescription", - "is_section_open": "isSectionOpen", - "static_text": "staticText", - "token_component": "tokenComponent", + 'product_name': 'productName', + 'product_description': 'productDescription', + 'is_section_open': 'isSectionOpen', + 'static_text': 'staticText', + 'token_component': 'tokenComponent' } - def __init__( - self, - product_name=None, - product_description=None, - is_section_open=None, - static_text=None, - token_component=None, - _configuration=None, - ): # noqa: E501 - """ProductDescription - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, product_name=None, product_description=None, is_section_open=None, static_text=None, token_component=None, local_vars_configuration=None): # noqa: E501 + """ProductDescription - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._product_name = None self._product_description = None @@ -98,7 +94,7 @@ def product_name(self, product_name): The product name. # noqa: E501 :param product_name: The product_name of this ProductDescription. # noqa: E501 - :type: str + :type product_name: str """ self._product_name = product_name @@ -121,7 +117,7 @@ def product_description(self, product_description): The product description. # noqa: E501 :param product_description: The product_description of this ProductDescription. # noqa: E501 - :type: str + :type product_description: str """ self._product_description = product_description @@ -144,7 +140,7 @@ def is_section_open(self, is_section_open): is Section open. # noqa: E501 :param is_section_open: The is_section_open of this ProductDescription. # noqa: E501 - :type: bool + :type is_section_open: bool """ self._is_section_open = is_section_open @@ -167,7 +163,7 @@ def static_text(self, static_text): is static text section. # noqa: E501 :param static_text: The static_text of this ProductDescription. # noqa: E501 - :type: bool + :type static_text: bool """ self._static_text = static_text @@ -190,37 +186,40 @@ def token_component(self, token_component): is token component added. # noqa: E501 :param token_component: The token_component of this ProductDescription. # noqa: E501 - :type: bool + :type token_component: bool """ self._token_component = token_component - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ProductDescription, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/product_sections.py b/src/clients/ctm_api_client/models/product_sections.py index a39bd1e..8861b36 100644 --- a/src/clients/ctm_api_client/models/product_sections.py +++ b/src/clients/ctm_api_client/models/product_sections.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ProductSections(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "sections": "list[ProductDescription]", - "product_description_url": "str", + openapi_types = { + 'sections': 'list[ProductDescription]', + 'product_description_url': 'str' } attribute_map = { - "sections": "sections", - "product_description_url": "productDescriptionUrl", + 'sections': 'sections', + 'product_description_url': 'productDescriptionUrl' } - def __init__( - self, sections=None, product_description_url=None, _configuration=None - ): # noqa: E501 - """ProductSections - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, sections=None, product_description_url=None, local_vars_configuration=None): # noqa: E501 + """ProductSections - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._sections = None self._product_description_url = None @@ -75,7 +77,7 @@ def sections(self, sections): :param sections: The sections of this ProductSections. # noqa: E501 - :type: list[ProductDescription] + :type sections: list[ProductDescription] """ self._sections = sections @@ -98,37 +100,40 @@ def product_description_url(self, product_description_url): The product description. HIDDEN # noqa: E501 :param product_description_url: The product_description_url of this ProductSections. # noqa: E501 - :type: str + :type product_description_url: str """ self._product_description_url = product_description_url - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ProductSections, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/provision_advance_parameters.py b/src/clients/ctm_api_client/models/provision_advance_parameters.py index fa21153..0de6ef3 100644 --- a/src/clients/ctm_api_client/models/provision_advance_parameters.py +++ b/src/clients/ctm_api_client/models/provision_advance_parameters.py @@ -5,66 +5,71 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ProvisionAdvanceParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "connection_initiator": "str", - "tag": "str", - "server_host_name": "str", - "server_port": "int", + openapi_types = { + 'java_home': 'str', + 'connection_initiator': 'str', + 'tag': 'str', + 'server_host_name': 'str', + 'server_port': 'int', + 'secondary_server_host_name': 'str' } attribute_map = { - "connection_initiator": "connectionInitiator", - "tag": "tag", - "server_host_name": "serverHostName", - "server_port": "serverPort", + 'java_home': 'javaHome', + 'connection_initiator': 'connectionInitiator', + 'tag': 'tag', + 'server_host_name': 'serverHostName', + 'server_port': 'serverPort', + 'secondary_server_host_name': 'secondaryServerHostName' } - def __init__( - self, - connection_initiator=None, - tag=None, - server_host_name=None, - server_port=None, - _configuration=None, - ): # noqa: E501 - """ProvisionAdvanceParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, java_home=None, connection_initiator=None, tag=None, server_host_name=None, server_port=None, secondary_server_host_name=None, local_vars_configuration=None): # noqa: E501 + """ProvisionAdvanceParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self._java_home = None self._connection_initiator = None self._tag = None self._server_host_name = None self._server_port = None + self._secondary_server_host_name = None self.discriminator = None + if java_home is not None: + self.java_home = java_home if connection_initiator is not None: self.connection_initiator = connection_initiator if tag is not None: @@ -73,6 +78,31 @@ def __init__( self.server_host_name = server_host_name if server_port is not None: self.server_port = server_port + if secondary_server_host_name is not None: + self.secondary_server_host_name = secondary_server_host_name + + @property + def java_home(self): + """Gets the java_home of this ProvisionAdvanceParameters. # noqa: E501 + + The JRE that will be used to install and run the agent # noqa: E501 + + :return: The java_home of this ProvisionAdvanceParameters. # noqa: E501 + :rtype: str + """ + return self._java_home + + @java_home.setter + def java_home(self, java_home): + """Sets the java_home of this ProvisionAdvanceParameters. + + The JRE that will be used to install and run the agent # noqa: E501 + + :param java_home: The java_home of this ProvisionAdvanceParameters. # noqa: E501 + :type java_home: str + """ + + self._java_home = java_home @property def connection_initiator(self): @@ -92,7 +122,7 @@ def connection_initiator(self, connection_initiator): Which component is allowed to initiate the connection [ServerToAgent | AgentToServer | BothAllowed]. Parameters start with capital letter. HIDDEN. # noqa: E501 :param connection_initiator: The connection_initiator of this ProvisionAdvanceParameters. # noqa: E501 - :type: str + :type connection_initiator: str """ self._connection_initiator = connection_initiator @@ -115,7 +145,7 @@ def tag(self, tag): Logical name that is used to label specific Control-M/Agents into a group with a specific authorization level. HIDDEN. # noqa: E501 :param tag: The tag of this ProvisionAdvanceParameters. # noqa: E501 - :type: str + :type tag: str """ self._tag = tag @@ -138,7 +168,7 @@ def server_host_name(self, server_host_name): Control-M/Server name (in case it has an alias or multiple network interfaces). HIDDEN. # noqa: E501 :param server_host_name: The server_host_name of this ProvisionAdvanceParameters. # noqa: E501 - :type: str + :type server_host_name: str """ self._server_host_name = server_host_name @@ -161,37 +191,63 @@ def server_port(self, server_port): Control-M/Server port to communicate with the agent. HIDDEN. # noqa: E501 :param server_port: The server_port of this ProvisionAdvanceParameters. # noqa: E501 - :type: int + :type server_port: int """ self._server_port = server_port - def to_dict(self): + @property + def secondary_server_host_name(self): + """Gets the secondary_server_host_name of this ProvisionAdvanceParameters. # noqa: E501 + + The secondary Control-M/Server host used in High Availability (HA) configurations. HIDDEN. # noqa: E501 + + :return: The secondary_server_host_name of this ProvisionAdvanceParameters. # noqa: E501 + :rtype: str + """ + return self._secondary_server_host_name + + @secondary_server_host_name.setter + def secondary_server_host_name(self, secondary_server_host_name): + """Sets the secondary_server_host_name of this ProvisionAdvanceParameters. + + The secondary Control-M/Server host used in High Availability (HA) configurations. HIDDEN. # noqa: E501 + + :param secondary_server_host_name: The secondary_server_host_name of this ProvisionAdvanceParameters. # noqa: E501 + :type secondary_server_host_name: str + """ + + self._secondary_server_host_name = secondary_server_host_name + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ProvisionAdvanceParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/query.py b/src/clients/ctm_api_client/models/query.py index afe12a3..d2d4a13 100644 --- a/src/clients/ctm_api_client/models/query.py +++ b/src/clients/ctm_api_client/models/query.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Query(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"method": "str", "uri": "str", "body": "str"} - - attribute_map = {"method": "method", "uri": "uri", "body": "body"} - - def __init__( - self, method=None, uri=None, body=None, _configuration=None - ): # noqa: E501 - """Query - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'method': 'str', + 'uri': 'str', + 'body': 'str' + } + + attribute_map = { + 'method': 'method', + 'uri': 'uri', + 'body': 'body' + } + + def __init__(self, method=None, uri=None, body=None, local_vars_configuration=None): # noqa: E501 + """Query - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._method = None self._uri = None @@ -72,7 +82,7 @@ def method(self, method): :param method: The method of this Query. # noqa: E501 - :type: str + :type method: str """ self._method = method @@ -93,7 +103,7 @@ def uri(self, uri): :param uri: The uri of this Query. # noqa: E501 - :type: str + :type uri: str """ self._uri = uri @@ -114,37 +124,40 @@ def body(self, body): :param body: The body of this Query. # noqa: E501 - :type: str + :type body: str """ self._body = body - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Query, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/raw_cms_xml_request.py b/src/clients/ctm_api_client/models/raw_cms_xml_request.py index f738c9a..9486184 100644 --- a/src/clients/ctm_api_client/models/raw_cms_xml_request.py +++ b/src/clients/ctm_api_client/models/raw_cms_xml_request.py @@ -5,59 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RawCmsXmlRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "raw_xml_request": "str", - "encryption_metadata": "EncryptionMetadata", + openapi_types = { + 'raw_xml_request': 'str', + 'encryption_metadata': 'EncryptionMetadata', + 'replace_special_chars': 'bool' } attribute_map = { - "raw_xml_request": "rawXmlRequest", - "encryption_metadata": "encryptionMetadata", + 'raw_xml_request': 'rawXmlRequest', + 'encryption_metadata': 'encryptionMetadata', + 'replace_special_chars': 'replaceSpecialChars' } - def __init__( - self, raw_xml_request=None, encryption_metadata=None, _configuration=None - ): # noqa: E501 - """RawCmsXmlRequest - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, raw_xml_request=None, encryption_metadata=None, replace_special_chars=None, local_vars_configuration=None): # noqa: E501 + """RawCmsXmlRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._raw_xml_request = None self._encryption_metadata = None + self._replace_special_chars = None self.discriminator = None if raw_xml_request is not None: self.raw_xml_request = raw_xml_request if encryption_metadata is not None: self.encryption_metadata = encryption_metadata + if replace_special_chars is not None: + self.replace_special_chars = replace_special_chars @property def raw_xml_request(self): @@ -77,7 +84,7 @@ def raw_xml_request(self, raw_xml_request): The raw XML request string # noqa: E501 :param raw_xml_request: The raw_xml_request of this RawCmsXmlRequest. # noqa: E501 - :type: str + :type raw_xml_request: str """ self._raw_xml_request = raw_xml_request @@ -98,37 +105,63 @@ def encryption_metadata(self, encryption_metadata): :param encryption_metadata: The encryption_metadata of this RawCmsXmlRequest. # noqa: E501 - :type: EncryptionMetadata + :type encryption_metadata: EncryptionMetadata """ self._encryption_metadata = encryption_metadata - def to_dict(self): + @property + def replace_special_chars(self): + """Gets the replace_special_chars of this RawCmsXmlRequest. # noqa: E501 + + Replace Ampersand, Greater Than and Lower Than special characters with their XML equivalent value # noqa: E501 + + :return: The replace_special_chars of this RawCmsXmlRequest. # noqa: E501 + :rtype: bool + """ + return self._replace_special_chars + + @replace_special_chars.setter + def replace_special_chars(self, replace_special_chars): + """Sets the replace_special_chars of this RawCmsXmlRequest. + + Replace Ampersand, Greater Than and Lower Than special characters with their XML equivalent value # noqa: E501 + + :param replace_special_chars: The replace_special_chars of this RawCmsXmlRequest. # noqa: E501 + :type replace_special_chars: bool + """ + + self._replace_special_chars = replace_special_chars + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RawCmsXmlRequest, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/read_only_status.py b/src/clients/ctm_api_client/models/read_only_status.py index 8d0a1cb..735cabd 100644 --- a/src/clients/ctm_api_client/models/read_only_status.py +++ b/src/clients/ctm_api_client/models/read_only_status.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ReadOnlyStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"mode": "bool"} + openapi_types = { + 'mode': 'bool' + } - attribute_map = {"mode": "mode"} + attribute_map = { + 'mode': 'mode' + } - def __init__(self, mode=None, _configuration=None): # noqa: E501 - """ReadOnlyStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, mode=None, local_vars_configuration=None): # noqa: E501 + """ReadOnlyStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._mode = None self.discriminator = None @@ -66,37 +74,40 @@ def mode(self, mode): The status of readOnly # noqa: E501 :param mode: The mode of this ReadOnlyStatus. # noqa: E501 - :type: bool + :type mode: bool """ self._mode = mode - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ReadOnlyStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/report_date_time_settings.py b/src/clients/ctm_api_client/models/report_date_time_settings.py index 43cb611..828fa02 100644 --- a/src/clients/ctm_api_client/models/report_date_time_settings.py +++ b/src/clients/ctm_api_client/models/report_date_time_settings.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ReportDateTimeSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "date_format": "str", - "time_format": "str", - "date_time_format": "str", + openapi_types = { + 'date_format': 'str', + 'time_format': 'str', + 'date_time_format': 'str' } attribute_map = { - "date_format": "dateFormat", - "time_format": "timeFormat", - "date_time_format": "dateTimeFormat", + 'date_format': 'dateFormat', + 'time_format': 'timeFormat', + 'date_time_format': 'dateTimeFormat' } - def __init__( - self, - date_format=None, - time_format=None, - date_time_format=None, - _configuration=None, - ): # noqa: E501 - """ReportDateTimeSettings - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, date_format=None, time_format=None, date_time_format=None, local_vars_configuration=None): # noqa: E501 + """ReportDateTimeSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._date_format = None self._time_format = None @@ -84,7 +82,7 @@ def date_format(self, date_format): :param date_format: The date_format of this ReportDateTimeSettings. # noqa: E501 - :type: str + :type date_format: str """ self._date_format = date_format @@ -105,7 +103,7 @@ def time_format(self, time_format): :param time_format: The time_format of this ReportDateTimeSettings. # noqa: E501 - :type: str + :type time_format: str """ self._time_format = time_format @@ -126,37 +124,40 @@ def date_time_format(self, date_time_format): :param date_time_format: The date_time_format of this ReportDateTimeSettings. # noqa: E501 - :type: str + :type date_time_format: str """ self._date_time_format = date_time_format - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ReportDateTimeSettings, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/report_filter.py b/src/clients/ctm_api_client/models/report_filter.py index b7009a0..f7d4d88 100644 --- a/src/clients/ctm_api_client/models/report_filter.py +++ b/src/clients/ctm_api_client/models/report_filter.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ReportFilter(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str"} - - attribute_map = {"name": "name", "value": "value"} - - def __init__(self, name=None, value=None, _configuration=None): # noqa: E501 - """ReportFilter - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """ReportFilter - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -65,12 +75,10 @@ def name(self, name): :param name: The name of this ReportFilter. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -90,41 +98,42 @@ def value(self, value): :param value: The value of this ReportFilter. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ReportFilter, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/report_filters.py b/src/clients/ctm_api_client/models/report_filters.py deleted file mode 100644 index c0072a9..0000000 --- a/src/clients/ctm_api_client/models/report_filters.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class ReportFilters(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """ReportFilters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(ReportFilters, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ReportFilters): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ReportFilters): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/report_result.py b/src/clients/ctm_api_client/models/report_result.py index f68c16e..5e3dd3c 100644 --- a/src/clients/ctm_api_client/models/report_result.py +++ b/src/clients/ctm_api_client/models/report_result.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ReportResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"report_url": "str"} + openapi_types = { + 'report_url': 'str' + } - attribute_map = {"report_url": "reportURL"} + attribute_map = { + 'report_url': 'reportURL' + } - def __init__(self, report_url=None, _configuration=None): # noqa: E501 - """ReportResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, report_url=None, local_vars_configuration=None): # noqa: E501 + """ReportResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._report_url = None self.discriminator = None @@ -65,41 +73,42 @@ def report_url(self, report_url): A URL to the report. # noqa: E501 :param report_url: The report_url of this ReportResult. # noqa: E501 - :type: str + :type report_url: str """ - if self._configuration.client_side_validation and report_url is None: - raise ValueError( - "Invalid value for `report_url`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and report_url is None: # noqa: E501 + raise ValueError("Invalid value for `report_url`, must not be `None`") # noqa: E501 self._report_url = report_url - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ReportResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_log_job_parameters.py b/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_log_job_parameters.py index 97accaa..5dca580 100644 --- a/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_log_job_parameters.py +++ b/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_log_job_parameters.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RequestParametersWrapperEMDefaultRequestParametersLogJobParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm_parameters": "LogJobParameters", - "em_parameters": "EMDefaultRequestParameters", + openapi_types = { + 'ctm_parameters': 'LogJobParameters', + 'em_parameters': 'EMDefaultRequestParameters' } attribute_map = { - "ctm_parameters": "ctm_parameters", - "em_parameters": "em_parameters", + 'ctm_parameters': 'ctm_parameters', + 'em_parameters': 'em_parameters' } - def __init__( - self, ctm_parameters=None, em_parameters=None, _configuration=None - ): # noqa: E501 - """RequestParametersWrapperEMDefaultRequestParametersLogJobParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm_parameters=None, em_parameters=None, local_vars_configuration=None): # noqa: E501 + """RequestParametersWrapperEMDefaultRequestParametersLogJobParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm_parameters = None self._em_parameters = None @@ -75,7 +77,7 @@ def ctm_parameters(self, ctm_parameters): :param ctm_parameters: The ctm_parameters of this RequestParametersWrapperEMDefaultRequestParametersLogJobParameters. # noqa: E501 - :type: LogJobParameters + :type ctm_parameters: LogJobParameters """ self._ctm_parameters = ctm_parameters @@ -96,39 +98,40 @@ def em_parameters(self, em_parameters): :param em_parameters: The em_parameters of this RequestParametersWrapperEMDefaultRequestParametersLogJobParameters. # noqa: E501 - :type: EMDefaultRequestParameters + :type em_parameters: EMDefaultRequestParameters """ self._em_parameters = em_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass( - RequestParametersWrapperEMDefaultRequestParametersLogJobParameters, dict - ): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result @@ -142,18 +145,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance( - other, RequestParametersWrapperEMDefaultRequestParametersLogJobParameters - ): + if not isinstance(other, RequestParametersWrapperEMDefaultRequestParametersLogJobParameters): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance( - other, RequestParametersWrapperEMDefaultRequestParametersLogJobParameters - ): + if not isinstance(other, RequestParametersWrapperEMDefaultRequestParametersLogJobParameters): return True return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py b/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py index 8f8f502..a486da8 100644 --- a/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py +++ b/src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py @@ -5,50 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm_parameters": "WhyJobParameters", - "em_parameters": "EMDefaultRequestParameters", + openapi_types = { + 'ctm_parameters': 'WhyJobParameters', + 'em_parameters': 'EMDefaultRequestParameters' } attribute_map = { - "ctm_parameters": "ctm_parameters", - "em_parameters": "em_parameters", + 'ctm_parameters': 'ctm_parameters', + 'em_parameters': 'em_parameters' } - def __init__( - self, ctm_parameters=None, em_parameters=None, _configuration=None - ): # noqa: E501 - """RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm_parameters=None, em_parameters=None, local_vars_configuration=None): # noqa: E501 + """RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm_parameters = None self._em_parameters = None @@ -75,7 +77,7 @@ def ctm_parameters(self, ctm_parameters): :param ctm_parameters: The ctm_parameters of this RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter. # noqa: E501 - :type: WhyJobParameters + :type ctm_parameters: WhyJobParameters """ self._ctm_parameters = ctm_parameters @@ -96,39 +98,40 @@ def em_parameters(self, em_parameters): :param em_parameters: The em_parameters of this RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter. # noqa: E501 - :type: EMDefaultRequestParameters + :type em_parameters: EMDefaultRequestParameters """ self._em_parameters = em_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass( - RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter, dict - ): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result @@ -142,18 +145,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance( - other, RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter - ): + if not isinstance(other, RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance( - other, RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter - ): + if not isinstance(other, RequestParametersWrapperEMDefaultRequestParametersWhyJobParameter): return True return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/rerun_parameters.py b/src/clients/ctm_api_client/models/rerun_parameters.py index d62de83..7cb1191 100644 --- a/src/clients/ctm_api_client/models/rerun_parameters.py +++ b/src/clients/ctm_api_client/models/rerun_parameters.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RerunParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"zos_parameters": "RerunZosParameters"} + openapi_types = { + 'zos_parameters': 'RerunZosParameters' + } - attribute_map = {"zos_parameters": "zosParameters"} + attribute_map = { + 'zos_parameters': 'zosParameters' + } - def __init__(self, zos_parameters=None, _configuration=None): # noqa: E501 - """RerunParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, zos_parameters=None, local_vars_configuration=None): # noqa: E501 + """RerunParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._zos_parameters = None self.discriminator = None @@ -52,7 +60,6 @@ def __init__(self, zos_parameters=None, _configuration=None): # noqa: E501 def zos_parameters(self): """Gets the zos_parameters of this RerunParameters. # noqa: E501 - Z/os restart parameters. HIDDEN. # noqa: E501 :return: The zos_parameters of this RerunParameters. # noqa: E501 :rtype: RerunZosParameters @@ -63,40 +70,42 @@ def zos_parameters(self): def zos_parameters(self, zos_parameters): """Sets the zos_parameters of this RerunParameters. - Z/os restart parameters. HIDDEN. # noqa: E501 :param zos_parameters: The zos_parameters of this RerunParameters. # noqa: E501 - :type: RerunZosParameters + :type zos_parameters: RerunZosParameters """ self._zos_parameters = zos_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RerunParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/rerun_zos_parameters.py b/src/clients/ctm_api_client/models/rerun_zos_parameters.py index e4962cc..dc1f684 100644 --- a/src/clients/ctm_api_client/models/rerun_zos_parameters.py +++ b/src/clients/ctm_api_client/models/rerun_zos_parameters.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RerunZosParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "_from": "RestartStep", - "to": "RestartStep", - "cleanup": "bool", - "recapture_abend": "str", - "recapture_condition_code": "str", - "step_adjustment": "bool", - "restart_parm_member_name": "str", + openapi_types = { + '_from': 'RestartStep', + 'to': 'RestartStep', + 'cleanup': 'bool', + 'recapture_abend': 'str', + 'recapture_condition_code': 'str', + 'step_adjustment': 'bool', + 'restart_parm_member_name': 'str' } attribute_map = { - "_from": "from", - "to": "to", - "cleanup": "cleanup", - "recapture_abend": "recaptureAbend", - "recapture_condition_code": "recaptureConditionCode", - "step_adjustment": "stepAdjustment", - "restart_parm_member_name": "restartParmMemberName", + '_from': 'from', + 'to': 'to', + 'cleanup': 'cleanup', + 'recapture_abend': 'recaptureAbend', + 'recapture_condition_code': 'recaptureConditionCode', + 'step_adjustment': 'stepAdjustment', + 'restart_parm_member_name': 'restartParmMemberName' } - def __init__( - self, - _from=None, - to=None, - cleanup=None, - recapture_abend=None, - recapture_condition_code=None, - step_adjustment=None, - restart_parm_member_name=None, - _configuration=None, - ): # noqa: E501 - """RerunZosParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, _from=None, to=None, cleanup=None, recapture_abend=None, recapture_condition_code=None, step_adjustment=None, restart_parm_member_name=None, local_vars_configuration=None): # noqa: E501 + """RerunZosParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self.__from = None self._to = None @@ -96,7 +90,6 @@ def __init__( def _from(self): """Gets the _from of this RerunZosParameters. # noqa: E501 - start from specific step. HIDDEN. # noqa: E501 :return: The _from of this RerunZosParameters. # noqa: E501 :rtype: RestartStep @@ -107,10 +100,9 @@ def _from(self): def _from(self, _from): """Sets the _from of this RerunZosParameters. - start from specific step. HIDDEN. # noqa: E501 :param _from: The _from of this RerunZosParameters. # noqa: E501 - :type: RestartStep + :type _from: RestartStep """ self.__from = _from @@ -119,7 +111,6 @@ def _from(self, _from): def to(self): """Gets the to of this RerunZosParameters. # noqa: E501 - end at specific step. HIDDEN. # noqa: E501 :return: The to of this RerunZosParameters. # noqa: E501 :rtype: RestartStep @@ -130,10 +121,9 @@ def to(self): def to(self, to): """Sets the to of this RerunZosParameters. - end at specific step. HIDDEN. # noqa: E501 :param to: The to of this RerunZosParameters. # noqa: E501 - :type: RestartStep + :type to: RestartStep """ self._to = to @@ -156,7 +146,7 @@ def cleanup(self, cleanup): cleanup instead of running specific steps. HIDDEN. # noqa: E501 :param cleanup: The cleanup of this RerunZosParameters. # noqa: E501 - :type: bool + :type cleanup: bool """ self._cleanup = cleanup @@ -179,7 +169,7 @@ def recapture_abend(self, recapture_abend): TO BE ADDED. HIDDEN. # noqa: E501 :param recapture_abend: The recapture_abend of this RerunZosParameters. # noqa: E501 - :type: str + :type recapture_abend: str """ self._recapture_abend = recapture_abend @@ -202,7 +192,7 @@ def recapture_condition_code(self, recapture_condition_code): TO BE ADDED. HIDDEN. # noqa: E501 :param recapture_condition_code: The recapture_condition_code of this RerunZosParameters. # noqa: E501 - :type: str + :type recapture_condition_code: str """ self._recapture_condition_code = recapture_condition_code @@ -225,7 +215,7 @@ def step_adjustment(self, step_adjustment): TO BE ADDED. HIDDEN. # noqa: E501 :param step_adjustment: The step_adjustment of this RerunZosParameters. # noqa: E501 - :type: bool + :type step_adjustment: bool """ self._step_adjustment = step_adjustment @@ -248,37 +238,40 @@ def restart_parm_member_name(self, restart_parm_member_name): TO BE ADDED. HIDDEN. # noqa: E501 :param restart_parm_member_name: The restart_parm_member_name of this RerunZosParameters. # noqa: E501 - :type: str + :type restart_parm_member_name: str """ self._restart_parm_member_name = restart_parm_member_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RerunZosParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/resource_max.py b/src/clients/ctm_api_client/models/resource_max.py index fd71a19..8fd2ece 100644 --- a/src/clients/ctm_api_client/models/resource_max.py +++ b/src/clients/ctm_api_client/models/resource_max.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ResourceMax(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"max": "int"} + openapi_types = { + 'max': 'int' + } - attribute_map = {"max": "max"} + attribute_map = { + 'max': 'max' + } - def __init__(self, max=None, _configuration=None): # noqa: E501 - """ResourceMax - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, max=None, local_vars_configuration=None): # noqa: E501 + """ResourceMax - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._max = None self.discriminator = None @@ -63,41 +71,42 @@ def max(self, max): :param max: The max of this ResourceMax. # noqa: E501 - :type: int + :type max: int """ - if self._configuration.client_side_validation and max is None: - raise ValueError( - "Invalid value for `max`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and max is None: # noqa: E501 + raise ValueError("Invalid value for `max`, must not be `None`") # noqa: E501 self._max = max - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ResourceMax, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/resource_obj.py b/src/clients/ctm_api_client/models/resource_obj.py index 7e9321c..f12e380 100644 --- a/src/clients/ctm_api_client/models/resource_obj.py +++ b/src/clients/ctm_api_client/models/resource_obj.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ResourceObj(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "ctm": "str", - "available": "str", - "max": "int", - "workload_policy": "str", + openapi_types = { + 'name': 'str', + 'ctm': 'str', + 'available': 'str', + 'max': 'int', + 'workload_policy': 'str' } attribute_map = { - "name": "name", - "ctm": "ctm", - "available": "available", - "max": "max", - "workload_policy": "workloadPolicy", + 'name': 'name', + 'ctm': 'ctm', + 'available': 'available', + 'max': 'max', + 'workload_policy': 'workloadPolicy' } - def __init__( - self, - name=None, - ctm=None, - available=None, - max=None, - workload_policy=None, - _configuration=None, - ): # noqa: E501 - """ResourceObj - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, ctm=None, available=None, max=None, workload_policy=None, local_vars_configuration=None): # noqa: E501 + """ResourceObj - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._ctm = None @@ -98,7 +94,7 @@ def name(self, name): Resource name # noqa: E501 :param name: The name of this ResourceObj. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -121,7 +117,7 @@ def ctm(self, ctm): Control-M Server hosting the resource # noqa: E501 :param ctm: The ctm of this ResourceObj. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -144,7 +140,7 @@ def available(self, available): The resource q current quantity. # noqa: E501 :param available: The available of this ResourceObj. # noqa: E501 - :type: str + :type available: str """ self._available = available @@ -167,7 +163,7 @@ def max(self, max): The resource q max usage value. # noqa: E501 :param max: The max of this ResourceObj. # noqa: E501 - :type: int + :type max: int """ self._max = max @@ -190,37 +186,40 @@ def workload_policy(self, workload_policy): Workload Policy. # noqa: E501 :param workload_policy: The workload_policy of this ResourceObj. # noqa: E501 - :type: str + :type workload_policy: str """ self._workload_policy = workload_policy - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ResourceObj, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/resource_param.py b/src/clients/ctm_api_client/models/resource_param.py index 7c32a7f..87dfd6b 100644 --- a/src/clients/ctm_api_client/models/resource_param.py +++ b/src/clients/ctm_api_client/models/resource_param.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ResourceParam(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "max": "str"} - - attribute_map = {"name": "name", "max": "max"} - - def __init__(self, name=None, max=None, _configuration=None): # noqa: E501 - """ResourceParam - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'max': 'str' + } + + attribute_map = { + 'name': 'name', + 'max': 'max' + } + + def __init__(self, name=None, max=None, local_vars_configuration=None): # noqa: E501 + """ResourceParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._max = None @@ -65,12 +75,10 @@ def name(self, name): :param name: The name of this ResourceParam. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -90,41 +98,42 @@ def max(self, max): :param max: The max of this ResourceParam. # noqa: E501 - :type: str + :type max: str """ - if self._configuration.client_side_validation and max is None: - raise ValueError( - "Invalid value for `max`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and max is None: # noqa: E501 + raise ValueError("Invalid value for `max`, must not be `None`") # noqa: E501 self._max = max - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ResourceParam, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/resource_set.py b/src/clients/ctm_api_client/models/resource_set.py deleted file mode 100644 index 6be484e..0000000 --- a/src/clients/ctm_api_client/models/resource_set.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class ResourceSet(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """ResourceSet - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(ResourceSet, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResourceSet): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ResourceSet): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/restart_step.py b/src/clients/ctm_api_client/models/restart_step.py index 2a0f4dd..1cddd83 100644 --- a/src/clients/ctm_api_client/models/restart_step.py +++ b/src/clients/ctm_api_client/models/restart_step.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RestartStep(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"pgm": "str", "proc": "str"} - - attribute_map = {"pgm": "pgm", "proc": "proc"} - - def __init__(self, pgm=None, proc=None, _configuration=None): # noqa: E501 - """RestartStep - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'pgm': 'str', + 'proc': 'str' + } + + attribute_map = { + 'pgm': 'pgm', + 'proc': 'proc' + } + + def __init__(self, pgm=None, proc=None, local_vars_configuration=None): # noqa: E501 + """RestartStep - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._pgm = None self._proc = None @@ -69,7 +79,7 @@ def pgm(self, pgm): program step # noqa: E501 :param pgm: The pgm of this RestartStep. # noqa: E501 - :type: str + :type pgm: str """ self._pgm = pgm @@ -92,37 +102,40 @@ def proc(self, proc): proc step # noqa: E501 :param proc: The proc of this RestartStep. # noqa: E501 - :type: str + :type proc: str """ self._proc = proc - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RestartStep, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/results_status.py b/src/clients/ctm_api_client/models/results_status.py index 4767ef2..fa25a3c 100644 --- a/src/clients/ctm_api_client/models/results_status.py +++ b/src/clients/ctm_api_client/models/results_status.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ResultsStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "display_usage": "bool", - "message": "str", - "messages": "list[str]", - "return_code": "int", + openapi_types = { + 'display_usage': 'bool', + 'message': 'str', + 'messages': 'list[str]', + 'return_code': 'int' } attribute_map = { - "display_usage": "display_usage", - "message": "message", - "messages": "messages", - "return_code": "return_code", + 'display_usage': 'display_usage', + 'message': 'message', + 'messages': 'messages', + 'return_code': 'return_code' } - def __init__( - self, - display_usage=None, - message=None, - messages=None, - return_code=None, - _configuration=None, - ): # noqa: E501 - """ResultsStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, display_usage=None, message=None, messages=None, return_code=None, local_vars_configuration=None): # noqa: E501 + """ResultsStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._display_usage = None self._message = None @@ -90,7 +87,7 @@ def display_usage(self, display_usage): :param display_usage: The display_usage of this ResultsStatus. # noqa: E501 - :type: bool + :type display_usage: bool """ self._display_usage = display_usage @@ -111,7 +108,7 @@ def message(self, message): :param message: The message of this ResultsStatus. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -132,7 +129,7 @@ def messages(self, messages): :param messages: The messages of this ResultsStatus. # noqa: E501 - :type: list[str] + :type messages: list[str] """ self._messages = messages @@ -153,37 +150,40 @@ def return_code(self, return_code): :param return_code: The return_code of this ResultsStatus. # noqa: E501 - :type: int + :type return_code: int """ self._return_code = return_code - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ResultsStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/role_data.py b/src/clients/ctm_api_client/models/role_data.py index 3ad2c4e..b5a65cd 100644 --- a/src/clients/ctm_api_client/models/role_data.py +++ b/src/clients/ctm_api_client/models/role_data.py @@ -5,122 +5,102 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RoleData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "description": "str", - "organization_groups": "list[str]", - "organization_users": "list[str]", - "allowed_jobs": "AllowedJobs", - "allowed_job_actions": "AllowedJobActions", - "privileges": "Privileges", - "folders": "list[FolderAuth]", - "calendars": "list[PrivilegeNameControlm]", - "runas_users": "list[RunasUserAuth]", - "workload_policies": "list[PrivilegeName]", - "site_standard": "list[PrivilegeName]", - "site_customization": "list[PrivilegeName]", - "services": "list[ServiceAuth]", - "events": "list[PrivilegeNameControlm]", - "mutexes": "list[PrivilegeNameControlm]", - "locks": "list[PrivilegeNameControlm]", - "semaphores": "list[PrivilegeNameControlm]", - "pools": "list[PrivilegeNameControlm]", - "variables": "list[PrivilegeNameControlm]", - "global_events": "list[PrivilegeName]", - "agent_management": "list[AgentMngAuth]", - "plugin_management": "list[PluginMngAuth]", - "connection_profile_management": "list[CPMngAuth]", - "runas_definition_management": "list[RunasDefinitionAuth]", + openapi_types = { + 'name': 'str', + 'description': 'str', + 'organization_groups': 'list[str]', + 'organization_users': 'list[str]', + 'allowed_jobs': 'AllowedJobs', + 'allowed_job_actions': 'AllowedJobActions', + 'privileges': 'Privileges', + 'folders': 'list[FolderAuth]', + 'calendars': 'list[PrivilegeNameControlm]', + 'runas_users': 'list[RunasUserAuth]', + 'workload_policies': 'list[PrivilegeName]', + 'site_standard': 'list[PrivilegeName]', + 'secrets': 'list[PrivilegeName]', + 'site_customization': 'list[PrivilegeName]', + 'services': 'list[ServiceAuth]', + 'events': 'list[PrivilegeNameControlm]', + 'mutexes': 'list[PrivilegeNameControlm]', + 'locks': 'list[PrivilegeNameControlm]', + 'semaphores': 'list[PrivilegeNameControlm]', + 'pools': 'list[PrivilegeNameControlm]', + 'variables': 'list[PrivilegeNameControlm]', + 'global_events': 'list[PrivilegeName]', + 'agent_management': 'list[AgentMngAuth]', + 'plugin_management': 'list[PluginMngAuth]', + 'connection_profile_management': 'list[CPMngAuth]', + 'runas_definition_management': 'list[PrivilegeControlm]', + 'managed_file_transfer_enterprise': 'list[PrivilegeControlm]' } attribute_map = { - "name": "Name", - "description": "Description", - "organization_groups": "OrganizationGroups", - "organization_users": "OrganizationUsers", - "allowed_jobs": "AllowedJobs", - "allowed_job_actions": "AllowedJobActions", - "privileges": "Privileges", - "folders": "Folders", - "calendars": "Calendars", - "runas_users": "RunasUsers", - "workload_policies": "WorkloadPolicies", - "site_standard": "SiteStandard", - "site_customization": "SiteCustomization", - "services": "Services", - "events": "Events", - "mutexes": "Mutexes", - "locks": "Locks", - "semaphores": "Semaphores", - "pools": "Pools", - "variables": "Variables", - "global_events": "GlobalEvents", - "agent_management": "AgentManagement", - "plugin_management": "PluginManagement", - "connection_profile_management": "ConnectionProfileManagement", - "runas_definition_management": "RunasDefinitionManagement", + 'name': 'Name', + 'description': 'Description', + 'organization_groups': 'OrganizationGroups', + 'organization_users': 'OrganizationUsers', + 'allowed_jobs': 'AllowedJobs', + 'allowed_job_actions': 'AllowedJobActions', + 'privileges': 'Privileges', + 'folders': 'Folders', + 'calendars': 'Calendars', + 'runas_users': 'RunasUsers', + 'workload_policies': 'WorkloadPolicies', + 'site_standard': 'SiteStandard', + 'secrets': 'Secrets', + 'site_customization': 'SiteCustomization', + 'services': 'Services', + 'events': 'Events', + 'mutexes': 'Mutexes', + 'locks': 'Locks', + 'semaphores': 'Semaphores', + 'pools': 'Pools', + 'variables': 'Variables', + 'global_events': 'GlobalEvents', + 'agent_management': 'AgentManagement', + 'plugin_management': 'PluginManagement', + 'connection_profile_management': 'ConnectionProfileManagement', + 'runas_definition_management': 'RunasDefinitionManagement', + 'managed_file_transfer_enterprise': 'ManagedFileTransferEnterprise' } - def __init__( - self, - name=None, - description=None, - organization_groups=None, - organization_users=None, - allowed_jobs=None, - allowed_job_actions=None, - privileges=None, - folders=None, - calendars=None, - runas_users=None, - workload_policies=None, - site_standard=None, - site_customization=None, - services=None, - events=None, - mutexes=None, - locks=None, - semaphores=None, - pools=None, - variables=None, - global_events=None, - agent_management=None, - plugin_management=None, - connection_profile_management=None, - runas_definition_management=None, - _configuration=None, - ): # noqa: E501 - """RoleData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, description=None, organization_groups=None, organization_users=None, allowed_jobs=None, allowed_job_actions=None, privileges=None, folders=None, calendars=None, runas_users=None, workload_policies=None, site_standard=None, secrets=None, site_customization=None, services=None, events=None, mutexes=None, locks=None, semaphores=None, pools=None, variables=None, global_events=None, agent_management=None, plugin_management=None, connection_profile_management=None, runas_definition_management=None, managed_file_transfer_enterprise=None, local_vars_configuration=None): # noqa: E501 + """RoleData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._description = None @@ -134,6 +114,7 @@ def __init__( self._runas_users = None self._workload_policies = None self._site_standard = None + self._secrets = None self._site_customization = None self._services = None self._events = None @@ -147,6 +128,7 @@ def __init__( self._plugin_management = None self._connection_profile_management = None self._runas_definition_management = None + self._managed_file_transfer_enterprise = None self.discriminator = None if name is not None: @@ -173,6 +155,8 @@ def __init__( self.workload_policies = workload_policies if site_standard is not None: self.site_standard = site_standard + if secrets is not None: + self.secrets = secrets if site_customization is not None: self.site_customization = site_customization if services is not None: @@ -199,6 +183,8 @@ def __init__( self.connection_profile_management = connection_profile_management if runas_definition_management is not None: self.runas_definition_management = runas_definition_management + if managed_file_transfer_enterprise is not None: + self.managed_file_transfer_enterprise = managed_file_transfer_enterprise @property def name(self): @@ -218,7 +204,7 @@ def name(self, name): role name # noqa: E501 :param name: The name of this RoleData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -241,7 +227,7 @@ def description(self, description): role description # noqa: E501 :param description: The description of this RoleData. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -264,7 +250,7 @@ def organization_groups(self, organization_groups): organization groups # noqa: E501 :param organization_groups: The organization_groups of this RoleData. # noqa: E501 - :type: list[str] + :type organization_groups: list[str] """ self._organization_groups = organization_groups @@ -287,7 +273,7 @@ def organization_users(self, organization_users): organization usrs # noqa: E501 :param organization_users: The organization_users of this RoleData. # noqa: E501 - :type: list[str] + :type organization_users: list[str] """ self._organization_users = organization_users @@ -308,7 +294,7 @@ def allowed_jobs(self, allowed_jobs): :param allowed_jobs: The allowed_jobs of this RoleData. # noqa: E501 - :type: AllowedJobs + :type allowed_jobs: AllowedJobs """ self._allowed_jobs = allowed_jobs @@ -329,7 +315,7 @@ def allowed_job_actions(self, allowed_job_actions): :param allowed_job_actions: The allowed_job_actions of this RoleData. # noqa: E501 - :type: AllowedJobActions + :type allowed_job_actions: AllowedJobActions """ self._allowed_job_actions = allowed_job_actions @@ -350,7 +336,7 @@ def privileges(self, privileges): :param privileges: The privileges of this RoleData. # noqa: E501 - :type: Privileges + :type privileges: Privileges """ self._privileges = privileges @@ -371,7 +357,7 @@ def folders(self, folders): :param folders: The folders of this RoleData. # noqa: E501 - :type: list[FolderAuth] + :type folders: list[FolderAuth] """ self._folders = folders @@ -392,7 +378,7 @@ def calendars(self, calendars): :param calendars: The calendars of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type calendars: list[PrivilegeNameControlm] """ self._calendars = calendars @@ -413,7 +399,7 @@ def runas_users(self, runas_users): :param runas_users: The runas_users of this RoleData. # noqa: E501 - :type: list[RunasUserAuth] + :type runas_users: list[RunasUserAuth] """ self._runas_users = runas_users @@ -434,7 +420,7 @@ def workload_policies(self, workload_policies): :param workload_policies: The workload_policies of this RoleData. # noqa: E501 - :type: list[PrivilegeName] + :type workload_policies: list[PrivilegeName] """ self._workload_policies = workload_policies @@ -455,11 +441,32 @@ def site_standard(self, site_standard): :param site_standard: The site_standard of this RoleData. # noqa: E501 - :type: list[PrivilegeName] + :type site_standard: list[PrivilegeName] """ self._site_standard = site_standard + @property + def secrets(self): + """Gets the secrets of this RoleData. # noqa: E501 + + + :return: The secrets of this RoleData. # noqa: E501 + :rtype: list[PrivilegeName] + """ + return self._secrets + + @secrets.setter + def secrets(self, secrets): + """Sets the secrets of this RoleData. + + + :param secrets: The secrets of this RoleData. # noqa: E501 + :type secrets: list[PrivilegeName] + """ + + self._secrets = secrets + @property def site_customization(self): """Gets the site_customization of this RoleData. # noqa: E501 @@ -476,7 +483,7 @@ def site_customization(self, site_customization): :param site_customization: The site_customization of this RoleData. # noqa: E501 - :type: list[PrivilegeName] + :type site_customization: list[PrivilegeName] """ self._site_customization = site_customization @@ -497,7 +504,7 @@ def services(self, services): :param services: The services of this RoleData. # noqa: E501 - :type: list[ServiceAuth] + :type services: list[ServiceAuth] """ self._services = services @@ -518,7 +525,7 @@ def events(self, events): :param events: The events of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type events: list[PrivilegeNameControlm] """ self._events = events @@ -539,7 +546,7 @@ def mutexes(self, mutexes): :param mutexes: The mutexes of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type mutexes: list[PrivilegeNameControlm] """ self._mutexes = mutexes @@ -560,7 +567,7 @@ def locks(self, locks): :param locks: The locks of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type locks: list[PrivilegeNameControlm] """ self._locks = locks @@ -581,7 +588,7 @@ def semaphores(self, semaphores): :param semaphores: The semaphores of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type semaphores: list[PrivilegeNameControlm] """ self._semaphores = semaphores @@ -602,7 +609,7 @@ def pools(self, pools): :param pools: The pools of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type pools: list[PrivilegeNameControlm] """ self._pools = pools @@ -623,7 +630,7 @@ def variables(self, variables): :param variables: The variables of this RoleData. # noqa: E501 - :type: list[PrivilegeNameControlm] + :type variables: list[PrivilegeNameControlm] """ self._variables = variables @@ -644,7 +651,7 @@ def global_events(self, global_events): :param global_events: The global_events of this RoleData. # noqa: E501 - :type: list[PrivilegeName] + :type global_events: list[PrivilegeName] """ self._global_events = global_events @@ -665,7 +672,7 @@ def agent_management(self, agent_management): :param agent_management: The agent_management of this RoleData. # noqa: E501 - :type: list[AgentMngAuth] + :type agent_management: list[AgentMngAuth] """ self._agent_management = agent_management @@ -686,7 +693,7 @@ def plugin_management(self, plugin_management): :param plugin_management: The plugin_management of this RoleData. # noqa: E501 - :type: list[PluginMngAuth] + :type plugin_management: list[PluginMngAuth] """ self._plugin_management = plugin_management @@ -707,7 +714,7 @@ def connection_profile_management(self, connection_profile_management): :param connection_profile_management: The connection_profile_management of this RoleData. # noqa: E501 - :type: list[CPMngAuth] + :type connection_profile_management: list[CPMngAuth] """ self._connection_profile_management = connection_profile_management @@ -718,7 +725,7 @@ def runas_definition_management(self): :return: The runas_definition_management of this RoleData. # noqa: E501 - :rtype: list[RunasDefinitionAuth] + :rtype: list[PrivilegeControlm] """ return self._runas_definition_management @@ -728,37 +735,63 @@ def runas_definition_management(self, runas_definition_management): :param runas_definition_management: The runas_definition_management of this RoleData. # noqa: E501 - :type: list[RunasDefinitionAuth] + :type runas_definition_management: list[PrivilegeControlm] """ self._runas_definition_management = runas_definition_management - def to_dict(self): + @property + def managed_file_transfer_enterprise(self): + """Gets the managed_file_transfer_enterprise of this RoleData. # noqa: E501 + + Supported from version 9.0.22.000 # noqa: E501 + + :return: The managed_file_transfer_enterprise of this RoleData. # noqa: E501 + :rtype: list[PrivilegeControlm] + """ + return self._managed_file_transfer_enterprise + + @managed_file_transfer_enterprise.setter + def managed_file_transfer_enterprise(self, managed_file_transfer_enterprise): + """Sets the managed_file_transfer_enterprise of this RoleData. + + Supported from version 9.0.22.000 # noqa: E501 + + :param managed_file_transfer_enterprise: The managed_file_transfer_enterprise of this RoleData. # noqa: E501 + :type managed_file_transfer_enterprise: list[PrivilegeControlm] + """ + + self._managed_file_transfer_enterprise = managed_file_transfer_enterprise + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RoleData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/role_data_full.py b/src/clients/ctm_api_client/models/role_data_full.py index 904dfc5..170ade8 100644 --- a/src/clients/ctm_api_client/models/role_data_full.py +++ b/src/clients/ctm_api_client/models/role_data_full.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RoleDataFull(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "overwrite": "bool", - "organization_groups": "list[str]", - "role_data": "RoleData", + openapi_types = { + 'overwrite': 'bool', + 'organization_groups': 'list[str]', + 'role_data': 'RoleData' } attribute_map = { - "overwrite": "Overwrite", - "organization_groups": "OrganizationGroups", - "role_data": "RoleData", + 'overwrite': 'Overwrite', + 'organization_groups': 'OrganizationGroups', + 'role_data': 'RoleData' } - def __init__( - self, - overwrite=None, - organization_groups=None, - role_data=None, - _configuration=None, - ): # noqa: E501 - """RoleDataFull - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, overwrite=None, organization_groups=None, role_data=None, local_vars_configuration=None): # noqa: E501 + """RoleDataFull - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._overwrite = None self._organization_groups = None @@ -86,7 +84,7 @@ def overwrite(self, overwrite): can overwrtie existing role # noqa: E501 :param overwrite: The overwrite of this RoleDataFull. # noqa: E501 - :type: bool + :type overwrite: bool """ self._overwrite = overwrite @@ -109,7 +107,7 @@ def organization_groups(self, organization_groups): organization groups # noqa: E501 :param organization_groups: The organization_groups of this RoleDataFull. # noqa: E501 - :type: list[str] + :type organization_groups: list[str] """ self._organization_groups = organization_groups @@ -118,7 +116,6 @@ def organization_groups(self, organization_groups): def role_data(self): """Gets the role_data of this RoleDataFull. # noqa: E501 - authorization role # noqa: E501 :return: The role_data of this RoleDataFull. # noqa: E501 :rtype: RoleData @@ -129,40 +126,42 @@ def role_data(self): def role_data(self, role_data): """Sets the role_data of this RoleDataFull. - authorization role # noqa: E501 :param role_data: The role_data of this RoleDataFull. # noqa: E501 - :type: RoleData + :type role_data: RoleData """ self._role_data = role_data - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RoleDataFull, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/role_header.py b/src/clients/ctm_api_client/models/role_header.py index a38d701..1faf7fb 100644 --- a/src/clients/ctm_api_client/models/role_header.py +++ b/src/clients/ctm_api_client/models/role_header.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RoleHeader(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "description": "str"} - - attribute_map = {"name": "name", "description": "description"} - - def __init__(self, name=None, description=None, _configuration=None): # noqa: E501 - """RoleHeader - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'description': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description' + } + + def __init__(self, name=None, description=None, local_vars_configuration=None): # noqa: E501 + """RoleHeader - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._description = None @@ -69,7 +79,7 @@ def name(self, name): role name # noqa: E501 :param name: The name of this RoleHeader. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -92,37 +102,40 @@ def description(self, description): role description # noqa: E501 :param description: The description of this RoleHeader. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RoleHeader, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/role_header_list.py b/src/clients/ctm_api_client/models/role_header_list.py deleted file mode 100644 index ddcd701..0000000 --- a/src/clients/ctm_api_client/models/role_header_list.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class RoleHeaderList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """RoleHeaderList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(RoleHeaderList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RoleHeaderList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RoleHeaderList): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/role_properties.py b/src/clients/ctm_api_client/models/role_properties.py index f0515e8..d91545c 100644 --- a/src/clients/ctm_api_client/models/role_properties.py +++ b/src/clients/ctm_api_client/models/role_properties.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RoleProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"new_role_name": "str"} + openapi_types = { + 'new_role_name': 'str' + } - attribute_map = {"new_role_name": "newRoleName"} + attribute_map = { + 'new_role_name': 'newRoleName' + } - def __init__(self, new_role_name=None, _configuration=None): # noqa: E501 - """RoleProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, new_role_name=None, local_vars_configuration=None): # noqa: E501 + """RoleProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._new_role_name = None self.discriminator = None @@ -66,37 +74,40 @@ def new_role_name(self, new_role_name): A new authorization role name REQUIRED # noqa: E501 :param new_role_name: The new_role_name of this RoleProperties. # noqa: E501 - :type: str + :type new_role_name: str """ self._new_role_name = new_role_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RoleProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/rule_criteria.py b/src/clients/ctm_api_client/models/rule_criteria.py index aa7ec96..18d1a57 100644 --- a/src/clients/ctm_api_client/models/rule_criteria.py +++ b/src/clients/ctm_api_client/models/rule_criteria.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RuleCriteria(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"field": "str", "criteria": "str", "exceptions": "list[str]"} + openapi_types = { + 'field': 'str', + 'criteria': 'str', + 'exceptions': 'list[str]' + } attribute_map = { - "field": "field", - "criteria": "criteria", - "exceptions": "exceptions", + 'field': 'field', + 'criteria': 'criteria', + 'exceptions': 'exceptions' } - def __init__( - self, field=None, criteria=None, exceptions=None, _configuration=None - ): # noqa: E501 - """RuleCriteria - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, field=None, criteria=None, exceptions=None, local_vars_configuration=None): # noqa: E501 + """RuleCriteria - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._field = None self._criteria = None @@ -78,7 +84,7 @@ def field(self, field): Rule parameters fields can be one of the options - ctm, type, jobName, jobType, application, subApplication, jobStatus, folder and library. HIDDEN. # noqa: E501 :param field: The field of this RuleCriteria. # noqa: E501 - :type: str + :type field: str """ self._field = field @@ -99,7 +105,7 @@ def criteria(self, criteria): :param criteria: The criteria of this RuleCriteria. # noqa: E501 - :type: str + :type criteria: str """ self._criteria = criteria @@ -120,37 +126,40 @@ def exceptions(self, exceptions): :param exceptions: The exceptions of this RuleCriteria. # noqa: E501 - :type: list[str] + :type exceptions: list[str] """ self._exceptions = exceptions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RuleCriteria, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/rule_projection.py b/src/clients/ctm_api_client/models/rule_projection.py index 4637b09..a74a185 100644 --- a/src/clients/ctm_api_client/models/rule_projection.py +++ b/src/clients/ctm_api_client/models/rule_projection.py @@ -5,65 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RuleProjection(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "description": "str", - "last_updated_timestamp": "int", - "name": "str", - "priority": "int", - "search_tags": "list[SearchTagTuple]", - "status": "str", + openapi_types = { + 'description': 'str', + 'last_updated_timestamp': 'int', + 'name': 'str', + 'priority': 'int', + 'search_tags': 'list[SearchTagTuple]', + 'status': 'str', + 'trigger_type': 'str' } attribute_map = { - "description": "description", - "last_updated_timestamp": "lastUpdatedTimestamp", - "name": "name", - "priority": "priority", - "search_tags": "searchTags", - "status": "status", + 'description': 'description', + 'last_updated_timestamp': 'lastUpdatedTimestamp', + 'name': 'name', + 'priority': 'priority', + 'search_tags': 'searchTags', + 'status': 'status', + 'trigger_type': 'triggerType' } - def __init__( - self, - description=None, - last_updated_timestamp=None, - name=None, - priority=None, - search_tags=None, - status=None, - _configuration=None, - ): # noqa: E501 - """RuleProjection - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, description=None, last_updated_timestamp=None, name=None, priority=None, search_tags=None, status=None, trigger_type=None, local_vars_configuration=None): # noqa: E501 + """RuleProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._description = None self._last_updated_timestamp = None @@ -71,6 +68,7 @@ def __init__( self._priority = None self._search_tags = None self._status = None + self._trigger_type = None self.discriminator = None if description is not None: @@ -85,6 +83,8 @@ def __init__( self.search_tags = search_tags if status is not None: self.status = status + if trigger_type is not None: + self.trigger_type = trigger_type @property def description(self): @@ -102,7 +102,7 @@ def description(self, description): :param description: The description of this RuleProjection. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -123,7 +123,7 @@ def last_updated_timestamp(self, last_updated_timestamp): :param last_updated_timestamp: The last_updated_timestamp of this RuleProjection. # noqa: E501 - :type: int + :type last_updated_timestamp: int """ self._last_updated_timestamp = last_updated_timestamp @@ -144,7 +144,7 @@ def name(self, name): :param name: The name of this RuleProjection. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -165,7 +165,7 @@ def priority(self, priority): :param priority: The priority of this RuleProjection. # noqa: E501 - :type: int + :type priority: int """ self._priority = priority @@ -186,7 +186,7 @@ def search_tags(self, search_tags): :param search_tags: The search_tags of this RuleProjection. # noqa: E501 - :type: list[SearchTagTuple] + :type search_tags: list[SearchTagTuple] """ self._search_tags = search_tags @@ -207,37 +207,61 @@ def status(self, status): :param status: The status of this RuleProjection. # noqa: E501 - :type: str + :type status: str """ self._status = status - def to_dict(self): + @property + def trigger_type(self): + """Gets the trigger_type of this RuleProjection. # noqa: E501 + + + :return: The trigger_type of this RuleProjection. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this RuleProjection. + + + :param trigger_type: The trigger_type of this RuleProjection. # noqa: E501 + :type trigger_type: str + """ + + self._trigger_type = trigger_type + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RuleProjection, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/rule_statistics.py b/src/clients/ctm_api_client/models/rule_statistics.py index 1ca0ab5..db534f2 100644 --- a/src/clients/ctm_api_client/models/rule_statistics.py +++ b/src/clients/ctm_api_client/models/rule_statistics.py @@ -5,68 +5,62 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RuleStatistics(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "rule_name": "str", - "retention": "int", - "retention_type": "str", - "oldest_item": "str", - "newest_item": "str", - "total_jobs": "int", - "data_size": "str", + openapi_types = { + 'rule_name': 'str', + 'retention': 'int', + 'retention_type': 'str', + 'oldest_item': 'str', + 'newest_item': 'str', + 'total_jobs': 'int', + 'data_size': 'str' } attribute_map = { - "rule_name": "ruleName", - "retention": "retention", - "retention_type": "retentionType", - "oldest_item": "oldestItem", - "newest_item": "newestItem", - "total_jobs": "totalJobs", - "data_size": "dataSize", + 'rule_name': 'ruleName', + 'retention': 'retention', + 'retention_type': 'retentionType', + 'oldest_item': 'oldestItem', + 'newest_item': 'newestItem', + 'total_jobs': 'totalJobs', + 'data_size': 'dataSize' } - def __init__( - self, - rule_name=None, - retention=None, - retention_type=None, - oldest_item=None, - newest_item=None, - total_jobs=None, - data_size=None, - _configuration=None, - ): # noqa: E501 - """RuleStatistics - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, rule_name=None, retention=None, retention_type=None, oldest_item=None, newest_item=None, total_jobs=None, data_size=None, local_vars_configuration=None): # noqa: E501 + """RuleStatistics - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._rule_name = None self._retention = None @@ -108,7 +102,7 @@ def rule_name(self, rule_name): :param rule_name: The rule_name of this RuleStatistics. # noqa: E501 - :type: str + :type rule_name: str """ self._rule_name = rule_name @@ -129,7 +123,7 @@ def retention(self, retention): :param retention: The retention of this RuleStatistics. # noqa: E501 - :type: int + :type retention: int """ self._retention = retention @@ -150,17 +144,13 @@ def retention_type(self, retention_type): :param retention_type: The retention_type of this RuleStatistics. # noqa: E501 - :type: str + :type retention_type: str """ allowed_values = ["Years", "Months", "Days"] # noqa: E501 - if ( - self._configuration.client_side_validation - and retention_type not in allowed_values - ): + if self.local_vars_configuration.client_side_validation and retention_type not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `retention_type` ({0}), must be one of {1}".format( # noqa: E501 - retention_type, allowed_values - ) + "Invalid value for `retention_type` ({0}), must be one of {1}" # noqa: E501 + .format(retention_type, allowed_values) ) self._retention_type = retention_type @@ -181,7 +171,7 @@ def oldest_item(self, oldest_item): :param oldest_item: The oldest_item of this RuleStatistics. # noqa: E501 - :type: str + :type oldest_item: str """ self._oldest_item = oldest_item @@ -202,7 +192,7 @@ def newest_item(self, newest_item): :param newest_item: The newest_item of this RuleStatistics. # noqa: E501 - :type: str + :type newest_item: str """ self._newest_item = newest_item @@ -223,7 +213,7 @@ def total_jobs(self, total_jobs): :param total_jobs: The total_jobs of this RuleStatistics. # noqa: E501 - :type: int + :type total_jobs: int """ self._total_jobs = total_jobs @@ -244,37 +234,40 @@ def data_size(self, data_size): :param data_size: The data_size of this RuleStatistics. # noqa: E501 - :type: str + :type data_size: str """ self._data_size = data_size - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RuleStatistics, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/rules_statistic_list.py b/src/clients/ctm_api_client/models/rules_statistic_list.py index 46fc9c2..db54593 100644 --- a/src/clients/ctm_api_client/models/rules_statistic_list.py +++ b/src/clients/ctm_api_client/models/rules_statistic_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RulesStatisticList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"rule_statistics": "list[RuleStatistics]"} + openapi_types = { + 'rule_statistics': 'list[RuleStatistics]' + } - attribute_map = {"rule_statistics": "ruleStatistics"} + attribute_map = { + 'rule_statistics': 'ruleStatistics' + } - def __init__(self, rule_statistics=None, _configuration=None): # noqa: E501 - """RulesStatisticList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, rule_statistics=None, local_vars_configuration=None): # noqa: E501 + """RulesStatisticList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._rule_statistics = None self.discriminator = None @@ -64,37 +72,40 @@ def rule_statistics(self, rule_statistics): :param rule_statistics: The rule_statistics of this RulesStatisticList. # noqa: E501 - :type: list[RuleStatistics] + :type rule_statistics: list[RuleStatistics] """ self._rule_statistics = rule_statistics - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RulesStatisticList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/rules_statistic_list_summary.py b/src/clients/ctm_api_client/models/rules_statistic_list_summary.py index 78a4ff1..54e2119 100644 --- a/src/clients/ctm_api_client/models/rules_statistic_list_summary.py +++ b/src/clients/ctm_api_client/models/rules_statistic_list_summary.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RulesStatisticListSummary(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"rules_statistic_list": "RulesStatisticList", "summary": "Summary"} - - attribute_map = {"rules_statistic_list": "rulesStatisticList", "summary": "summary"} - - def __init__( - self, rules_statistic_list=None, summary=None, _configuration=None - ): # noqa: E501 - """RulesStatisticListSummary - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'rules_statistic_list': 'RulesStatisticList', + 'summary': 'Summary' + } + + attribute_map = { + 'rules_statistic_list': 'rulesStatisticList', + 'summary': 'summary' + } + + def __init__(self, rules_statistic_list=None, summary=None, local_vars_configuration=None): # noqa: E501 + """RulesStatisticListSummary - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._rules_statistic_list = None self._summary = None @@ -69,7 +77,7 @@ def rules_statistic_list(self, rules_statistic_list): :param rules_statistic_list: The rules_statistic_list of this RulesStatisticListSummary. # noqa: E501 - :type: RulesStatisticList + :type rules_statistic_list: RulesStatisticList """ self._rules_statistic_list = rules_statistic_list @@ -90,37 +98,40 @@ def summary(self, summary): :param summary: The summary of this RulesStatisticListSummary. # noqa: E501 - :type: Summary + :type summary: Summary """ self._summary = summary - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RulesStatisticListSummary, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/run_as_user_data.py b/src/clients/ctm_api_client/models/run_as_user_data.py index cc441bf..a26c748 100644 --- a/src/clients/ctm_api_client/models/run_as_user_data.py +++ b/src/clients/ctm_api_client/models/run_as_user_data.py @@ -5,54 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunAsUserData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "agent": "str", - "user": "str", - "password": "str", - "key": "RunAsUserKeyData", + openapi_types = { + 'agent': 'str', + 'user': 'str', + 'password': 'str', + 'key': 'RunAsUserKeyData' } attribute_map = { - "agent": "agent", - "user": "user", - "password": "password", - "key": "key", + 'agent': 'agent', + 'user': 'user', + 'password': 'password', + 'key': 'key' } - def __init__( - self, agent=None, user=None, password=None, key=None, _configuration=None - ): # noqa: E501 - """RunAsUserData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, agent=None, user=None, password=None, key=None, local_vars_configuration=None): # noqa: E501 + """RunAsUserData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._agent = None self._user = None @@ -87,7 +89,7 @@ def agent(self, agent): agent name, can ended by wildcard REQUIRED # noqa: E501 :param agent: The agent of this RunAsUserData. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -110,7 +112,7 @@ def user(self, user): user name REQUIRED # noqa: E501 :param user: The user of this RunAsUserData. # noqa: E501 - :type: str + :type user: str """ self._user = user @@ -133,7 +135,7 @@ def password(self, password): Password # noqa: E501 :param password: The password of this RunAsUserData. # noqa: E501 - :type: str + :type password: str """ self._password = password @@ -142,7 +144,6 @@ def password(self, password): def key(self): """Gets the key of this RunAsUserData. # noqa: E501 - HIDDEN # noqa: E501 :return: The key of this RunAsUserData. # noqa: E501 :rtype: RunAsUserKeyData @@ -153,40 +154,42 @@ def key(self): def key(self, key): """Sets the key of this RunAsUserData. - HIDDEN # noqa: E501 :param key: The key of this RunAsUserData. # noqa: E501 - :type: RunAsUserKeyData + :type key: RunAsUserKeyData """ self._key = key - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunAsUserData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/run_as_user_details_data.py b/src/clients/ctm_api_client/models/run_as_user_details_data.py index 619a39f..88e1b6d 100644 --- a/src/clients/ctm_api_client/models/run_as_user_details_data.py +++ b/src/clients/ctm_api_client/models/run_as_user_details_data.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunAsUserDetailsData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"password": "str", "key": "RunAsUserKeyData"} - - attribute_map = {"password": "password", "key": "key"} - - def __init__(self, password=None, key=None, _configuration=None): # noqa: E501 - """RunAsUserDetailsData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'password': 'str', + 'key': 'RunAsUserKeyData' + } + + attribute_map = { + 'password': 'password', + 'key': 'key' + } + + def __init__(self, password=None, key=None, local_vars_configuration=None): # noqa: E501 + """RunAsUserDetailsData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._password = None self._key = None @@ -69,7 +79,7 @@ def password(self, password): Password # noqa: E501 :param password: The password of this RunAsUserDetailsData. # noqa: E501 - :type: str + :type password: str """ self._password = password @@ -78,7 +88,6 @@ def password(self, password): def key(self): """Gets the key of this RunAsUserDetailsData. # noqa: E501 - HIDDEN # noqa: E501 :return: The key of this RunAsUserDetailsData. # noqa: E501 :rtype: RunAsUserKeyData @@ -89,40 +98,42 @@ def key(self): def key(self, key): """Sets the key of this RunAsUserDetailsData. - HIDDEN # noqa: E501 :param key: The key of this RunAsUserDetailsData. # noqa: E501 - :type: RunAsUserKeyData + :type key: RunAsUserKeyData """ self._key = key - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunAsUserDetailsData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/run_as_user_key_data.py b/src/clients/ctm_api_client/models/run_as_user_key_data.py index 7e1dbe3..74db7d9 100644 --- a/src/clients/ctm_api_client/models/run_as_user_key_data.py +++ b/src/clients/ctm_api_client/models/run_as_user_key_data.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunAsUserKeyData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"keyname": "str", "passphrase": "str"} - - attribute_map = {"keyname": "keyname", "passphrase": "passphrase"} - - def __init__( - self, keyname=None, passphrase=None, _configuration=None - ): # noqa: E501 - """RunAsUserKeyData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'keyname': 'str', + 'passphrase': 'str' + } + + attribute_map = { + 'keyname': 'keyname', + 'passphrase': 'passphrase' + } + + def __init__(self, keyname=None, passphrase=None, local_vars_configuration=None): # noqa: E501 + """RunAsUserKeyData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._keyname = None self._passphrase = None @@ -71,7 +79,7 @@ def keyname(self, keyname): ssh key # noqa: E501 :param keyname: The keyname of this RunAsUserKeyData. # noqa: E501 - :type: str + :type keyname: str """ self._keyname = keyname @@ -94,37 +102,40 @@ def passphrase(self, passphrase): SSH key passphrase # noqa: E501 :param passphrase: The passphrase of this RunAsUserKeyData. # noqa: E501 - :type: str + :type passphrase: str """ self._passphrase = passphrase - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunAsUserKeyData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/run_as_users_list.py b/src/clients/ctm_api_client/models/run_as_users_list.py deleted file mode 100644 index 37c1d70..0000000 --- a/src/clients/ctm_api_client/models/run_as_users_list.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class RunAsUsersList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """RunAsUsersList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(RunAsUsersList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RunAsUsersList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RunAsUsersList): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/run_report.py b/src/clients/ctm_api_client/models/run_report.py index 2e8699f..32a93f1 100644 --- a/src/clients/ctm_api_client/models/run_report.py +++ b/src/clients/ctm_api_client/models/run_report.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunReport(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "format": "str", - "filters": "ReportFilters", - "date_time_settings": "ReportDateTimeSettings", + openapi_types = { + 'name': 'str', + 'format': 'str', + 'filters': 'list[ReportFilter]', + 'date_time_settings': 'ReportDateTimeSettings' } attribute_map = { - "name": "name", - "format": "format", - "filters": "filters", - "date_time_settings": "dateTimeSettings", + 'name': 'name', + 'format': 'format', + 'filters': 'filters', + 'date_time_settings': 'dateTimeSettings' } - def __init__( - self, - name=None, - format=None, - filters=None, - date_time_settings=None, - _configuration=None, - ): # noqa: E501 - """RunReport - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, format=None, filters=None, date_time_settings=None, local_vars_configuration=None): # noqa: E501 + """RunReport - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._format = None @@ -89,12 +86,10 @@ def name(self, name): :param name: The name of this RunReport. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -114,7 +109,7 @@ def format(self, format): :param format: The format of this RunReport. # noqa: E501 - :type: str + :type format: str """ self._format = format @@ -123,10 +118,9 @@ def format(self, format): def filters(self): """Gets the filters of this RunReport. # noqa: E501 - HIDDEN. # noqa: E501 :return: The filters of this RunReport. # noqa: E501 - :rtype: ReportFilters + :rtype: list[ReportFilter] """ return self._filters @@ -134,10 +128,9 @@ def filters(self): def filters(self, filters): """Sets the filters of this RunReport. - HIDDEN. # noqa: E501 :param filters: The filters of this RunReport. # noqa: E501 - :type: ReportFilters + :type filters: list[ReportFilter] """ self._filters = filters @@ -146,7 +139,6 @@ def filters(self, filters): def date_time_settings(self): """Gets the date_time_settings of this RunReport. # noqa: E501 - HIDDEN. # noqa: E501 :return: The date_time_settings of this RunReport. # noqa: E501 :rtype: ReportDateTimeSettings @@ -157,40 +149,42 @@ def date_time_settings(self): def date_time_settings(self, date_time_settings): """Sets the date_time_settings of this RunReport. - HIDDEN. # noqa: E501 :param date_time_settings: The date_time_settings of this RunReport. # noqa: E501 - :type: ReportDateTimeSettings + :type date_time_settings: ReportDateTimeSettings """ self._date_time_settings = date_time_settings - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunReport, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/run_report_info.py b/src/clients/ctm_api_client/models/run_report_info.py index 2c5f093..460d730 100644 --- a/src/clients/ctm_api_client/models/run_report_info.py +++ b/src/clients/ctm_api_client/models/run_report_info.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunReportInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "report_id": "str", - "name": "str", - "format": "str", - "status": "str", - "url": "str", - "web_url": "str", + openapi_types = { + 'report_id': 'str', + 'name': 'str', + 'format': 'str', + 'status': 'str', + 'url': 'str', + 'web_url': 'str' } attribute_map = { - "report_id": "reportId", - "name": "name", - "format": "format", - "status": "status", - "url": "url", - "web_url": "webUrl", + 'report_id': 'reportId', + 'name': 'name', + 'format': 'format', + 'status': 'status', + 'url': 'url', + 'web_url': 'webUrl' } - def __init__( - self, - report_id=None, - name=None, - format=None, - status=None, - url=None, - web_url=None, - _configuration=None, - ): # noqa: E501 - """RunReportInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, report_id=None, name=None, format=None, status=None, url=None, web_url=None, local_vars_configuration=None): # noqa: E501 + """RunReportInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._report_id = None self._name = None @@ -73,18 +68,12 @@ def __init__( self._web_url = None self.discriminator = None - if report_id is not None: - self.report_id = report_id - if name is not None: - self.name = name - if format is not None: - self.format = format - if status is not None: - self.status = status - if url is not None: - self.url = url - if web_url is not None: - self.web_url = web_url + self.report_id = report_id + self.name = name + self.format = format + self.status = status + self.url = url + self.web_url = web_url @property def report_id(self): @@ -102,7 +91,7 @@ def report_id(self, report_id): :param report_id: The report_id of this RunReportInfo. # noqa: E501 - :type: str + :type report_id: str """ self._report_id = report_id @@ -123,7 +112,7 @@ def name(self, name): :param name: The name of this RunReportInfo. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -144,7 +133,7 @@ def format(self, format): :param format: The format of this RunReportInfo. # noqa: E501 - :type: str + :type format: str """ self._format = format @@ -165,7 +154,7 @@ def status(self, status): :param status: The status of this RunReportInfo. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -186,7 +175,7 @@ def url(self, url): :param url: The url of this RunReportInfo. # noqa: E501 - :type: str + :type url: str """ self._url = url @@ -207,37 +196,40 @@ def web_url(self, web_url): :param web_url: The web_url of this RunReportInfo. # noqa: E501 - :type: str + :type web_url: str """ self._web_url = web_url - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunReportInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/run_result.py b/src/clients/ctm_api_client/models/run_result.py index 10ec302..78dc0a8 100644 --- a/src/clients/ctm_api_client/models/run_result.py +++ b/src/clients/ctm_api_client/models/run_result.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunResult(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"run_id": "str", "status_uri": "str", "monitor_page_uri": "str"} + openapi_types = { + 'run_id': 'str', + 'status_uri': 'str', + 'monitor_page_uri': 'str' + } attribute_map = { - "run_id": "runId", - "status_uri": "statusURI", - "monitor_page_uri": "monitorPageURI", + 'run_id': 'runId', + 'status_uri': 'statusURI', + 'monitor_page_uri': 'monitorPageURI' } - def __init__( - self, run_id=None, status_uri=None, monitor_page_uri=None, _configuration=None - ): # noqa: E501 - """RunResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, run_id=None, status_uri=None, monitor_page_uri=None, local_vars_configuration=None): # noqa: E501 + """RunResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._run_id = None self._status_uri = None @@ -77,12 +83,10 @@ def run_id(self, run_id): An ID that identifies running jobs and can be used to track their status. # noqa: E501 :param run_id: The run_id of this RunResult. # noqa: E501 - :type: str + :type run_id: str """ - if self._configuration.client_side_validation and run_id is None: - raise ValueError( - "Invalid value for `run_id`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and run_id is None: # noqa: E501 + raise ValueError("Invalid value for `run_id`, must not be `None`") # noqa: E501 self._run_id = run_id @@ -104,7 +108,7 @@ def status_uri(self, status_uri): A URI that can be used to get the status of the run jobs. # noqa: E501 :param status_uri: The status_uri of this RunResult. # noqa: E501 - :type: str + :type status_uri: str """ self._status_uri = status_uri @@ -127,37 +131,40 @@ def monitor_page_uri(self, monitor_page_uri): A URI to a page displaying the workflow run live. # noqa: E501 :param monitor_page_uri: The monitor_page_uri of this RunResult. # noqa: E501 - :type: str + :type monitor_page_uri: str """ self._monitor_page_uri = monitor_page_uri - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunResult, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/runas_definition_auth.py b/src/clients/ctm_api_client/models/runas_definition_auth.py index 63974c1..c024e02 100644 --- a/src/clients/ctm_api_client/models/runas_definition_auth.py +++ b/src/clients/ctm_api_client/models/runas_definition_auth.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunasDefinitionAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"controlm_server": "str", "privilege": "str"} - - attribute_map = {"controlm_server": "ControlmServer", "privilege": "Privilege"} - - def __init__( - self, controlm_server=None, privilege=None, _configuration=None - ): # noqa: E501 - """RunasDefinitionAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'controlm_server': 'str', + 'privilege': 'str' + } + + attribute_map = { + 'controlm_server': 'ControlmServer', + 'privilege': 'Privilege' + } + + def __init__(self, controlm_server=None, privilege=None, local_vars_configuration=None): # noqa: E501 + """RunasDefinitionAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._controlm_server = None self._privilege = None @@ -71,7 +79,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this RunasDefinitionAuth. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -94,37 +102,40 @@ def privilege(self, privilege): access level (full, update, browse) # noqa: E501 :param privilege: The privilege of this RunasDefinitionAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunasDefinitionAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/runas_user_auth.py b/src/clients/ctm_api_client/models/runas_user_auth.py index ed1e087..5151548 100644 --- a/src/clients/ctm_api_client/models/runas_user_auth.py +++ b/src/clients/ctm_api_client/models/runas_user_auth.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class RunasUserAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"controlm_server": "str", "runas_user": "str", "host": "str"} + openapi_types = { + 'controlm_server': 'str', + 'runas_user': 'str', + 'host': 'str' + } attribute_map = { - "controlm_server": "ControlmServer", - "runas_user": "RunasUser", - "host": "Host", + 'controlm_server': 'ControlmServer', + 'runas_user': 'RunasUser', + 'host': 'Host' } - def __init__( - self, controlm_server=None, runas_user=None, host=None, _configuration=None - ): # noqa: E501 - """RunasUserAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, controlm_server=None, runas_user=None, host=None, local_vars_configuration=None): # noqa: E501 + """RunasUserAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._controlm_server = None self._runas_user = None @@ -78,7 +84,7 @@ def controlm_server(self, controlm_server): control-M server name # noqa: E501 :param controlm_server: The controlm_server of this RunasUserAuth. # noqa: E501 - :type: str + :type controlm_server: str """ self._controlm_server = controlm_server @@ -101,7 +107,7 @@ def runas_user(self, runas_user): runas user # noqa: E501 :param runas_user: The runas_user of this RunasUserAuth. # noqa: E501 - :type: str + :type runas_user: str """ self._runas_user = runas_user @@ -124,37 +130,40 @@ def host(self, host): HOst or host group value # noqa: E501 :param host: The host of this RunasUserAuth. # noqa: E501 - :type: str + :type host: str """ self._host = host - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(RunasUserAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/saml2_identity_provider.py b/src/clients/ctm_api_client/models/saml2_identity_provider.py index 6b69dfa..22836a1 100644 --- a/src/clients/ctm_api_client/models/saml2_identity_provider.py +++ b/src/clients/ctm_api_client/models/saml2_identity_provider.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Saml2IdentityProvider(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "metadata_url": "str", - "enabled": "bool", - "service_provider_information": "ServiceProviderInformation", - "force_authentication": "bool", + openapi_types = { + 'metadata_url': 'str', + 'enabled': 'bool', + 'service_provider_information': 'ServiceProviderInformation', + 'force_authentication': 'bool' } attribute_map = { - "metadata_url": "metadataUrl", - "enabled": "enabled", - "service_provider_information": "serviceProviderInformation", - "force_authentication": "forceAuthentication", + 'metadata_url': 'metadataUrl', + 'enabled': 'enabled', + 'service_provider_information': 'serviceProviderInformation', + 'force_authentication': 'forceAuthentication' } - def __init__( - self, - metadata_url=None, - enabled=None, - service_provider_information=None, - force_authentication=None, - _configuration=None, - ): # noqa: E501 - """Saml2IdentityProvider - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, metadata_url=None, enabled=None, service_provider_information=None, force_authentication=None, local_vars_configuration=None): # noqa: E501 + """Saml2IdentityProvider - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._metadata_url = None self._enabled = None @@ -88,12 +85,10 @@ def metadata_url(self, metadata_url): :param metadata_url: The metadata_url of this Saml2IdentityProvider. # noqa: E501 - :type: str + :type metadata_url: str """ - if self._configuration.client_side_validation and metadata_url is None: - raise ValueError( - "Invalid value for `metadata_url`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and metadata_url is None: # noqa: E501 + raise ValueError("Invalid value for `metadata_url`, must not be `None`") # noqa: E501 self._metadata_url = metadata_url @@ -113,12 +108,10 @@ def enabled(self, enabled): :param enabled: The enabled of this Saml2IdentityProvider. # noqa: E501 - :type: bool + :type enabled: bool """ - if self._configuration.client_side_validation and enabled is None: - raise ValueError( - "Invalid value for `enabled`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501 + raise ValueError("Invalid value for `enabled`, must not be `None`") # noqa: E501 self._enabled = enabled @@ -138,7 +131,7 @@ def service_provider_information(self, service_provider_information): :param service_provider_information: The service_provider_information of this Saml2IdentityProvider. # noqa: E501 - :type: ServiceProviderInformation + :type service_provider_information: ServiceProviderInformation """ self._service_provider_information = service_provider_information @@ -159,37 +152,40 @@ def force_authentication(self, force_authentication): :param force_authentication: The force_authentication of this Saml2IdentityProvider. # noqa: E501 - :type: bool + :type force_authentication: bool """ self._force_authentication = force_authentication - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Saml2IdentityProvider, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/saml_status.py b/src/clients/ctm_api_client/models/saml_status.py index 80b422c..a95a92f 100644 --- a/src/clients/ctm_api_client/models/saml_status.py +++ b/src/clients/ctm_api_client/models/saml_status.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SamlStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"enabled": "bool"} + openapi_types = { + 'enabled': 'bool' + } - attribute_map = {"enabled": "enabled"} + attribute_map = { + 'enabled': 'enabled' + } - def __init__(self, enabled=None, _configuration=None): # noqa: E501 - """SamlStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501 + """SamlStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._enabled = None self.discriminator = None @@ -66,37 +74,40 @@ def enabled(self, enabled): The value of saml mode # noqa: E501 :param enabled: The enabled of this SamlStatus. # noqa: E501 - :type: bool + :type enabled: bool """ self._enabled = enabled - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SamlStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/sample.py b/src/clients/ctm_api_client/models/sample.py index 510e883..e04e7cd 100644 --- a/src/clients/ctm_api_client/models/sample.py +++ b/src/clients/ctm_api_client/models/sample.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Sample(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"id": "int", "title": "str", "description": "str"} - - attribute_map = {"id": "id", "title": "title", "description": "description"} - - def __init__( - self, id=None, title=None, description=None, _configuration=None - ): # noqa: E501 - """Sample - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'id': 'int', + 'title': 'str', + 'description': 'str' + } + + attribute_map = { + 'id': 'id', + 'title': 'title', + 'description': 'description' + } + + def __init__(self, id=None, title=None, description=None, local_vars_configuration=None): # noqa: E501 + """Sample - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._id = None self._title = None @@ -70,9 +80,9 @@ def id(self, id): :param id: The id of this Sample. # noqa: E501 - :type: int + :type id: int """ - if self._configuration.client_side_validation and id is None: + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @@ -93,12 +103,10 @@ def title(self, title): :param title: The title of this Sample. # noqa: E501 - :type: str + :type title: str """ - if self._configuration.client_side_validation and title is None: - raise ValueError( - "Invalid value for `title`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -118,37 +126,40 @@ def description(self, description): :param description: The description of this Sample. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Sample, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/search_params.py b/src/clients/ctm_api_client/models/search_params.py index a26a0e6..e382982 100644 --- a/src/clients/ctm_api_client/models/search_params.py +++ b/src/clients/ctm_api_client/models/search_params.py @@ -5,107 +5,88 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SearchParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm": "str", - "job_name": "str", - "app": "str", - "sub_app": "str", - "folder": "str", - "status": "str", - "lib": "str", - "limit": "int", - "log_contains": "str", - "output_contains": "str", - "mem_lib": "str", - "mem_name": "str", - "node_group": "str", - "node_id": "str", - "from_order_date": "str", - "to_order_date": "str", - "order_id": "str", - "run_as": "str", - "start_date": "str", - "end_date": "str", + openapi_types = { + 'ctm': 'str', + 'job_name': 'str', + 'app': 'str', + 'sub_app': 'str', + 'folder': 'str', + 'status': 'str', + 'lib': 'str', + 'limit': 'int', + 'log_contains': 'str', + 'output_contains': 'str', + 'mem_lib': 'str', + 'mem_name': 'str', + 'node_group': 'str', + 'node_id': 'str', + 'from_order_date': 'str', + 'to_order_date': 'str', + 'order_id': 'str', + 'run_as': 'str', + 'start_date': 'str', + 'end_date': 'str' } attribute_map = { - "ctm": "ctm", - "job_name": "jobName", - "app": "app", - "sub_app": "subApp", - "folder": "folder", - "status": "status", - "lib": "lib", - "limit": "limit", - "log_contains": "logContains", - "output_contains": "outputContains", - "mem_lib": "memLib", - "mem_name": "memName", - "node_group": "nodeGroup", - "node_id": "nodeId", - "from_order_date": "fromOrderDate", - "to_order_date": "toOrderDate", - "order_id": "orderId", - "run_as": "runAs", - "start_date": "startDate", - "end_date": "endDate", + 'ctm': 'ctm', + 'job_name': 'jobName', + 'app': 'app', + 'sub_app': 'subApp', + 'folder': 'folder', + 'status': 'status', + 'lib': 'lib', + 'limit': 'limit', + 'log_contains': 'logContains', + 'output_contains': 'outputContains', + 'mem_lib': 'memLib', + 'mem_name': 'memName', + 'node_group': 'nodeGroup', + 'node_id': 'nodeId', + 'from_order_date': 'fromOrderDate', + 'to_order_date': 'toOrderDate', + 'order_id': 'orderId', + 'run_as': 'runAs', + 'start_date': 'startDate', + 'end_date': 'endDate' } - def __init__( - self, - ctm=None, - job_name=None, - app=None, - sub_app=None, - folder=None, - status=None, - lib=None, - limit=None, - log_contains=None, - output_contains=None, - mem_lib=None, - mem_name=None, - node_group=None, - node_id=None, - from_order_date=None, - to_order_date=None, - order_id=None, - run_as=None, - start_date=None, - end_date=None, - _configuration=None, - ): # noqa: E501 - """SearchParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm=None, job_name=None, app=None, sub_app=None, folder=None, status=None, lib=None, limit=None, log_contains=None, output_contains=None, mem_lib=None, mem_name=None, node_group=None, node_id=None, from_order_date=None, to_order_date=None, order_id=None, run_as=None, start_date=None, end_date=None, local_vars_configuration=None): # noqa: E501 + """SearchParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm = None self._job_name = None @@ -188,7 +169,7 @@ def ctm(self, ctm): The name of sthe Control-M server in which the job was ordered from. HIDDEN. # noqa: E501 :param ctm: The ctm of this SearchParams. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -211,7 +192,7 @@ def job_name(self, job_name): The name of the job. HIDDEN. # noqa: E501 :param job_name: The job_name of this SearchParams. # noqa: E501 - :type: str + :type job_name: str """ self._job_name = job_name @@ -234,7 +215,7 @@ def app(self, app): The name of the application the jobs belong to. HIDDEN. # noqa: E501 :param app: The app of this SearchParams. # noqa: E501 - :type: str + :type app: str """ self._app = app @@ -257,7 +238,7 @@ def sub_app(self, sub_app): The name of the sub-application the jobs belong to. HIDDEN. # noqa: E501 :param sub_app: The sub_app of this SearchParams. # noqa: E501 - :type: str + :type sub_app: str """ self._sub_app = sub_app @@ -280,7 +261,7 @@ def folder(self, folder): The name of the parent folder. HIDDEN. # noqa: E501 :param folder: The folder of this SearchParams. # noqa: E501 - :type: str + :type folder: str """ self._folder = folder @@ -303,14 +284,13 @@ def status(self, status): The job's end status. HIDDEN. # noqa: E501 :param status: The status of this SearchParams. # noqa: E501 - :type: str + :type status: str """ allowed_values = ["OK", "NOTOK", "ALL"] # noqa: E501 - if self._configuration.client_side_validation and status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}".format( # noqa: E501 - status, allowed_values - ) + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) ) self._status = status @@ -333,7 +313,7 @@ def lib(self, lib): The job's library name. HIDDEN. # noqa: E501 :param lib: The lib of this SearchParams. # noqa: E501 - :type: str + :type lib: str """ self._lib = lib @@ -356,7 +336,7 @@ def limit(self, limit): Maximum archived Jobs to display. HIDDEN. # noqa: E501 :param limit: The limit of this SearchParams. # noqa: E501 - :type: int + :type limit: int """ self._limit = limit @@ -379,7 +359,7 @@ def log_contains(self, log_contains): Job log must contain the given phrase. HIDDEN. # noqa: E501 :param log_contains: The log_contains of this SearchParams. # noqa: E501 - :type: str + :type log_contains: str """ self._log_contains = log_contains @@ -402,7 +382,7 @@ def output_contains(self, output_contains): Job output must contain the given phrase. HIDDEN. # noqa: E501 :param output_contains: The output_contains of this SearchParams. # noqa: E501 - :type: str + :type output_contains: str """ self._output_contains = output_contains @@ -425,7 +405,7 @@ def mem_lib(self, mem_lib): Member's library. HIDDEN. # noqa: E501 :param mem_lib: The mem_lib of this SearchParams. # noqa: E501 - :type: str + :type mem_lib: str """ self._mem_lib = mem_lib @@ -448,7 +428,7 @@ def mem_name(self, mem_name): Member name. HIDDEN. # noqa: E501 :param mem_name: The mem_name of this SearchParams. # noqa: E501 - :type: str + :type mem_name: str """ self._mem_name = mem_name @@ -471,7 +451,7 @@ def node_group(self, node_group): Job's node group. HIDDEN. # noqa: E501 :param node_group: The node_group of this SearchParams. # noqa: E501 - :type: str + :type node_group: str """ self._node_group = node_group @@ -494,7 +474,7 @@ def node_id(self, node_id): Job's node id (agent). HIDDEN. # noqa: E501 :param node_id: The node_id of this SearchParams. # noqa: E501 - :type: str + :type node_id: str """ self._node_id = node_id @@ -517,7 +497,7 @@ def from_order_date(self, from_order_date): Indicating a date by which will look for jobs that their order date started afterwards. Date format - YYYY-MM-DD. HIDDEN. # noqa: E501 :param from_order_date: The from_order_date of this SearchParams. # noqa: E501 - :type: str + :type from_order_date: str """ self._from_order_date = from_order_date @@ -540,7 +520,7 @@ def to_order_date(self, to_order_date): Indicating a date by which will look for jobs that their order date ended before. Date format - YYYY-MM-DD. HIDDEN. # noqa: E501 :param to_order_date: The to_order_date of this SearchParams. # noqa: E501 - :type: str + :type to_order_date: str """ self._to_order_date = to_order_date @@ -563,7 +543,7 @@ def order_id(self, order_id): Job's order id. HIDDEN. # noqa: E501 :param order_id: The order_id of this SearchParams. # noqa: E501 - :type: str + :type order_id: str """ self._order_id = order_id @@ -586,7 +566,7 @@ def run_as(self, run_as): Runs as (username on agent machine). HIDDEN. # noqa: E501 :param run_as: The run_as of this SearchParams. # noqa: E501 - :type: str + :type run_as: str """ self._run_as = run_as @@ -609,7 +589,7 @@ def start_date(self, start_date): Job execution start date. Date format - YYYY-MM-DD. HIDDEN. # noqa: E501 :param start_date: The start_date of this SearchParams. # noqa: E501 - :type: str + :type start_date: str """ self._start_date = start_date @@ -632,37 +612,40 @@ def end_date(self, end_date): Job execution end date. Date format - YYYY-MM-DD. HIDDEN. # noqa: E501 :param end_date: The end_date of this SearchParams. # noqa: E501 - :type: str + :type end_date: str """ self._end_date = end_date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SearchParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/search_tag_tuple.py b/src/clients/ctm_api_client/models/search_tag_tuple.py index fbe0d5b..172f322 100644 --- a/src/clients/ctm_api_client/models/search_tag_tuple.py +++ b/src/clients/ctm_api_client/models/search_tag_tuple.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SearchTagTuple(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"key": "str", "values": "list[str]"} - - attribute_map = {"key": "key", "values": "values"} - - def __init__(self, key=None, values=None, _configuration=None): # noqa: E501 - """SearchTagTuple - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'key': 'str', + 'values': 'list[str]' + } + + attribute_map = { + 'key': 'key', + 'values': 'values' + } + + def __init__(self, key=None, values=None, local_vars_configuration=None): # noqa: E501 + """SearchTagTuple - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._key = None self._values = None @@ -67,7 +77,7 @@ def key(self, key): :param key: The key of this SearchTagTuple. # noqa: E501 - :type: str + :type key: str """ self._key = key @@ -88,37 +98,40 @@ def values(self, values): :param values: The values of this SearchTagTuple. # noqa: E501 - :type: list[str] + :type values: list[str] """ self._values = values - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SearchTagTuple, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/secret_key_value.py b/src/clients/ctm_api_client/models/secret_key_value.py index 42fa7a8..03703b1 100644 --- a/src/clients/ctm_api_client/models/secret_key_value.py +++ b/src/clients/ctm_api_client/models/secret_key_value.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SecretKeyValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str"} - - attribute_map = {"name": "name", "value": "value"} - - def __init__(self, name=None, value=None, _configuration=None): # noqa: E501 - """SecretKeyValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """SecretKeyValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -68,12 +78,10 @@ def name(self, name): Unique key # noqa: E501 :param name: The name of this SecretKeyValue. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -95,37 +103,40 @@ def value(self, value): Any value in string form. # noqa: E501 :param value: The value of this SecretKeyValue. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SecretKeyValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/secret_value.py b/src/clients/ctm_api_client/models/secret_value.py index 0dcde24..eb8e247 100644 --- a/src/clients/ctm_api_client/models/secret_value.py +++ b/src/clients/ctm_api_client/models/secret_value.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SecretValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value": "str"} + openapi_types = { + 'value': 'str' + } - attribute_map = {"value": "value"} + attribute_map = { + 'value': 'value' + } - def __init__(self, value=None, _configuration=None): # noqa: E501 - """SecretValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """SecretValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value = None self.discriminator = None @@ -66,37 +74,40 @@ def value(self, value): The parameter value # noqa: E501 :param value: The value of this SecretValue. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SecretValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/section_metadata_properties.py b/src/clients/ctm_api_client/models/section_metadata_properties.py index d085858..5f27ddf 100644 --- a/src/clients/ctm_api_client/models/section_metadata_properties.py +++ b/src/clients/ctm_api_client/models/section_metadata_properties.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SectionMetadataProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "display_name": "str", - "display_name1": "str", - "display_name_id": "str", - "fields": "list[FieldMetadataProperties]", - "name": "str", + openapi_types = { + 'display_name': 'str', + 'display_name1': 'str', + 'display_name_id': 'str', + 'fields': 'list[FieldMetadataProperties]', + 'name': 'str' } attribute_map = { - "display_name": "displayName", - "display_name1": "displayName1", - "display_name_id": "displayNameID", - "fields": "fields", - "name": "name", + 'display_name': 'displayName', + 'display_name1': 'displayName1', + 'display_name_id': 'displayNameID', + 'fields': 'fields', + 'name': 'name' } - def __init__( - self, - display_name=None, - display_name1=None, - display_name_id=None, - fields=None, - name=None, - _configuration=None, - ): # noqa: E501 - """SectionMetadataProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, display_name=None, display_name1=None, display_name_id=None, fields=None, name=None, local_vars_configuration=None): # noqa: E501 + """SectionMetadataProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._display_name = None self._display_name1 = None @@ -96,7 +92,7 @@ def display_name(self, display_name): :param display_name: The display_name of this SectionMetadataProperties. # noqa: E501 - :type: str + :type display_name: str """ self._display_name = display_name @@ -117,7 +113,7 @@ def display_name1(self, display_name1): :param display_name1: The display_name1 of this SectionMetadataProperties. # noqa: E501 - :type: str + :type display_name1: str """ self._display_name1 = display_name1 @@ -138,7 +134,7 @@ def display_name_id(self, display_name_id): :param display_name_id: The display_name_id of this SectionMetadataProperties. # noqa: E501 - :type: str + :type display_name_id: str """ self._display_name_id = display_name_id @@ -159,7 +155,7 @@ def fields(self, fields): :param fields: The fields of this SectionMetadataProperties. # noqa: E501 - :type: list[FieldMetadataProperties] + :type fields: list[FieldMetadataProperties] """ self._fields = fields @@ -180,37 +176,40 @@ def name(self, name): :param name: The name of this SectionMetadataProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SectionMetadataProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/service_auth.py b/src/clients/ctm_api_client/models/service_auth.py index 317243f..d95c18f 100644 --- a/src/clients/ctm_api_client/models/service_auth.py +++ b/src/clients/ctm_api_client/models/service_auth.py @@ -5,52 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ServiceAuth(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "privilege": "str", - "name": "str", - "allowed_actions": "ServiceAuthAction", + openapi_types = { + 'privilege': 'str', + 'name': 'str', + 'allowed_actions': 'ServiceAuthAction' } attribute_map = { - "privilege": "Privilege", - "name": "Name", - "allowed_actions": "AllowedActions", + 'privilege': 'Privilege', + 'name': 'Name', + 'allowed_actions': 'AllowedActions' } - def __init__( - self, privilege=None, name=None, allowed_actions=None, _configuration=None - ): # noqa: E501 - """ServiceAuth - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, privilege=None, name=None, allowed_actions=None, local_vars_configuration=None): # noqa: E501 + """ServiceAuth - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._privilege = None self._name = None @@ -82,7 +84,7 @@ def privilege(self, privilege): access level (Full, Update, Browse, None) # noqa: E501 :param privilege: The privilege of this ServiceAuth. # noqa: E501 - :type: str + :type privilege: str """ self._privilege = privilege @@ -105,7 +107,7 @@ def name(self, name): service name # noqa: E501 :param name: The name of this ServiceAuth. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -114,7 +116,6 @@ def name(self, name): def allowed_actions(self): """Gets the allowed_actions of this ServiceAuth. # noqa: E501 - active list # noqa: E501 :return: The allowed_actions of this ServiceAuth. # noqa: E501 :rtype: ServiceAuthAction @@ -125,40 +126,42 @@ def allowed_actions(self): def allowed_actions(self, allowed_actions): """Sets the allowed_actions of this ServiceAuth. - active list # noqa: E501 :param allowed_actions: The allowed_actions of this ServiceAuth. # noqa: E501 - :type: ServiceAuthAction + :type allowed_actions: ServiceAuthAction """ self._allowed_actions = allowed_actions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ServiceAuth, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/service_auth_action.py b/src/clients/ctm_api_client/models/service_auth_action.py index de06976..9904d52 100644 --- a/src/clients/ctm_api_client/models/service_auth_action.py +++ b/src/clients/ctm_api_client/models/service_auth_action.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ServiceAuthAction(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "drill_down": "bool", - "run": "bool", - "hold": "bool", - "resume": "bool", - "view_orderable_service": "bool", + openapi_types = { + 'drill_down': 'bool', + 'run': 'bool', + 'hold': 'bool', + 'resume': 'bool', + 'view_orderable_service': 'bool' } attribute_map = { - "drill_down": "DrillDown", - "run": "Run", - "hold": "Hold", - "resume": "Resume", - "view_orderable_service": "ViewOrderableService", + 'drill_down': 'DrillDown', + 'run': 'Run', + 'hold': 'Hold', + 'resume': 'Resume', + 'view_orderable_service': 'ViewOrderableService' } - def __init__( - self, - drill_down=None, - run=None, - hold=None, - resume=None, - view_orderable_service=None, - _configuration=None, - ): # noqa: E501 - """ServiceAuthAction - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, drill_down=None, run=None, hold=None, resume=None, view_orderable_service=None, local_vars_configuration=None): # noqa: E501 + """ServiceAuthAction - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._drill_down = None self._run = None @@ -98,7 +94,7 @@ def drill_down(self, drill_down): Is DrillDown allowed in service # noqa: E501 :param drill_down: The drill_down of this ServiceAuthAction. # noqa: E501 - :type: bool + :type drill_down: bool """ self._drill_down = drill_down @@ -121,7 +117,7 @@ def run(self, run): Is Run allowed in service # noqa: E501 :param run: The run of this ServiceAuthAction. # noqa: E501 - :type: bool + :type run: bool """ self._run = run @@ -144,7 +140,7 @@ def hold(self, hold): Is Hold allowed in service # noqa: E501 :param hold: The hold of this ServiceAuthAction. # noqa: E501 - :type: bool + :type hold: bool """ self._hold = hold @@ -167,7 +163,7 @@ def resume(self, resume): Is Resume allowed in service # noqa: E501 :param resume: The resume of this ServiceAuthAction. # noqa: E501 - :type: bool + :type resume: bool """ self._resume = resume @@ -190,37 +186,40 @@ def view_orderable_service(self, view_orderable_service): Is View Orderable Service allowed in service # noqa: E501 :param view_orderable_service: The view_orderable_service of this ServiceAuthAction. # noqa: E501 - :type: bool + :type view_orderable_service: bool """ self._view_orderable_service = view_orderable_service - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ServiceAuthAction, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/service_provider_information.py b/src/clients/ctm_api_client/models/service_provider_information.py index 69ef62a..1538de4 100644 --- a/src/clients/ctm_api_client/models/service_provider_information.py +++ b/src/clients/ctm_api_client/models/service_provider_information.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ServiceProviderInformation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "single_sign_on_url": "str", - "entity_id": "str", - "signing_certificate": "str", - "sso_urls": "list[str]", + openapi_types = { + 'single_sign_on_url': 'str', + 'entity_id': 'str', + 'signing_certificate': 'str', + 'sso_urls': 'list[str]' } attribute_map = { - "single_sign_on_url": "singleSignOnUrl", - "entity_id": "entityID", - "signing_certificate": "signingCertificate", - "sso_urls": "ssoUrls", + 'single_sign_on_url': 'singleSignOnUrl', + 'entity_id': 'entityID', + 'signing_certificate': 'signingCertificate', + 'sso_urls': 'ssoUrls' } - def __init__( - self, - single_sign_on_url=None, - entity_id=None, - signing_certificate=None, - sso_urls=None, - _configuration=None, - ): # noqa: E501 - """ServiceProviderInformation - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, single_sign_on_url=None, entity_id=None, signing_certificate=None, sso_urls=None, local_vars_configuration=None): # noqa: E501 + """ServiceProviderInformation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._single_sign_on_url = None self._entity_id = None @@ -90,7 +87,7 @@ def single_sign_on_url(self, single_sign_on_url): :param single_sign_on_url: The single_sign_on_url of this ServiceProviderInformation. # noqa: E501 - :type: str + :type single_sign_on_url: str """ self._single_sign_on_url = single_sign_on_url @@ -111,7 +108,7 @@ def entity_id(self, entity_id): :param entity_id: The entity_id of this ServiceProviderInformation. # noqa: E501 - :type: str + :type entity_id: str """ self._entity_id = entity_id @@ -132,7 +129,7 @@ def signing_certificate(self, signing_certificate): :param signing_certificate: The signing_certificate of this ServiceProviderInformation. # noqa: E501 - :type: str + :type signing_certificate: str """ self._signing_certificate = signing_certificate @@ -153,37 +150,40 @@ def sso_urls(self, sso_urls): :param sso_urls: The sso_urls of this ServiceProviderInformation. # noqa: E501 - :type: list[str] + :type sso_urls: list[str] """ self._sso_urls = sso_urls - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ServiceProviderInformation, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/set_agent_params.py b/src/clients/ctm_api_client/models/set_agent_params.py index 51030e1..b00f8a6 100644 --- a/src/clients/ctm_api_client/models/set_agent_params.py +++ b/src/clients/ctm_api_client/models/set_agent_params.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SetAgentParams(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str", "type": "str"} - - attribute_map = {"name": "name", "value": "value", "type": "type"} - - def __init__( - self, name=None, value=None, type=None, _configuration=None - ): # noqa: E501 - """SetAgentParams - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str', + 'type': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value', + 'type': 'type' + } + + def __init__(self, name=None, value=None, type=None, local_vars_configuration=None): # noqa: E501 + """SetAgentParams - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -74,7 +84,7 @@ def name(self, name): parameter name # noqa: E501 :param name: The name of this SetAgentParams. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -97,7 +107,7 @@ def value(self, value): parameter value # noqa: E501 :param value: The value of this SetAgentParams. # noqa: E501 - :type: str + :type value: str """ self._value = value @@ -120,37 +130,40 @@ def type(self, type): parameter type # noqa: E501 :param type: The type of this SetAgentParams. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SetAgentParams, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/set_agent_params_list.py b/src/clients/ctm_api_client/models/set_agent_params_list.py index 532409e..69938e4 100644 --- a/src/clients/ctm_api_client/models/set_agent_params_list.py +++ b/src/clients/ctm_api_client/models/set_agent_params_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SetAgentParamsList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"parameters": "list[SetAgentParams]"} + openapi_types = { + 'parameters': 'list[SetAgentParams]' + } - attribute_map = {"parameters": "parameters"} + attribute_map = { + 'parameters': 'parameters' + } - def __init__(self, parameters=None, _configuration=None): # noqa: E501 - """SetAgentParamsList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, parameters=None, local_vars_configuration=None): # noqa: E501 + """SetAgentParamsList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._parameters = None self.discriminator = None @@ -64,37 +72,40 @@ def parameters(self, parameters): :param parameters: The parameters of this SetAgentParamsList. # noqa: E501 - :type: list[SetAgentParams] + :type parameters: list[SetAgentParams] """ self._parameters = parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SetAgentParamsList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/setting_key_properties.py b/src/clients/ctm_api_client/models/setting_key_properties.py index 65fcc26..0b21ab7 100644 --- a/src/clients/ctm_api_client/models/setting_key_properties.py +++ b/src/clients/ctm_api_client/models/setting_key_properties.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SettingKeyProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"setting_category": "str", "setting_name": "str"} + openapi_types = { + 'setting_category': 'str', + 'setting_name': 'str' + } attribute_map = { - "setting_category": "settingCategory", - "setting_name": "settingName", + 'setting_category': 'settingCategory', + 'setting_name': 'settingName' } - def __init__( - self, setting_category=None, setting_name=None, _configuration=None - ): # noqa: E501 - """SettingKeyProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, setting_category=None, setting_name=None, local_vars_configuration=None): # noqa: E501 + """SettingKeyProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._setting_category = None self._setting_name = None @@ -72,7 +77,7 @@ def setting_category(self, setting_category): :param setting_category: The setting_category of this SettingKeyProperties. # noqa: E501 - :type: str + :type setting_category: str """ self._setting_category = setting_category @@ -93,37 +98,40 @@ def setting_name(self, setting_name): :param setting_name: The setting_name of this SettingKeyProperties. # noqa: E501 - :type: str + :type setting_name: str """ self._setting_name = setting_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SettingKeyProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/setting_properties.py b/src/clients/ctm_api_client/models/setting_properties.py index 0995b06..8cd46c0 100644 --- a/src/clients/ctm_api_client/models/setting_properties.py +++ b/src/clients/ctm_api_client/models/setting_properties.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SettingProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"category": "str", "name": "str", "value": "str"} - - attribute_map = {"category": "category", "name": "name", "value": "value"} - - def __init__( - self, category=None, name=None, value=None, _configuration=None - ): # noqa: E501 - """SettingProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'category': 'str', + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'category': 'category', + 'name': 'name', + 'value': 'value' + } + + def __init__(self, category=None, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """SettingProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._category = None self._name = None @@ -74,7 +84,7 @@ def category(self, category): setting category property HIDDEN # noqa: E501 :param category: The category of this SettingProperties. # noqa: E501 - :type: str + :type category: str """ self._category = category @@ -97,7 +107,7 @@ def name(self, name): setting name property HIDDEN # noqa: E501 :param name: The name of this SettingProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -120,37 +130,40 @@ def value(self, value): setting value property HIDDEN # noqa: E501 :param value: The value of this SettingProperties. # noqa: E501 - :type: str + :type value: str """ self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SettingProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/setting_properties_object.py b/src/clients/ctm_api_client/models/setting_properties_object.py index 0d7bd84..d276dea 100644 --- a/src/clients/ctm_api_client/models/setting_properties_object.py +++ b/src/clients/ctm_api_client/models/setting_properties_object.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SettingPropertiesObject(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"settings": "list[SettingProperties]"} + openapi_types = { + 'settings': 'list[SettingProperties]' + } - attribute_map = {"settings": "settings"} + attribute_map = { + 'settings': 'settings' + } - def __init__(self, settings=None, _configuration=None): # noqa: E501 - """SettingPropertiesObject - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, settings=None, local_vars_configuration=None): # noqa: E501 + """SettingPropertiesObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._settings = None self.discriminator = None @@ -64,37 +72,40 @@ def settings(self, settings): :param settings: The settings of this SettingPropertiesObject. # noqa: E501 - :type: list[SettingProperties] + :type settings: list[SettingProperties] """ self._settings = settings - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SettingPropertiesObject, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/settings_metadata_properties.py b/src/clients/ctm_api_client/models/settings_metadata_properties.py index 564baed..b615538 100644 --- a/src/clients/ctm_api_client/models/settings_metadata_properties.py +++ b/src/clients/ctm_api_client/models/settings_metadata_properties.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SettingsMetadataProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "components": "list[ComponentMetaDataProperties]", - "error": "str", - "selected_component_after_activation": "str", - "selected_component_before_activation": "str", + openapi_types = { + 'components': 'list[ComponentMetaDataProperties]', + 'error': 'str', + 'selected_component_after_activation': 'str', + 'selected_component_before_activation': 'str' } attribute_map = { - "components": "components", - "error": "error", - "selected_component_after_activation": "selectedComponentAfterActivation", - "selected_component_before_activation": "selectedComponentBeforeActivation", + 'components': 'components', + 'error': 'error', + 'selected_component_after_activation': 'selectedComponentAfterActivation', + 'selected_component_before_activation': 'selectedComponentBeforeActivation' } - def __init__( - self, - components=None, - error=None, - selected_component_after_activation=None, - selected_component_before_activation=None, - _configuration=None, - ): # noqa: E501 - """SettingsMetadataProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, components=None, error=None, selected_component_after_activation=None, selected_component_before_activation=None, local_vars_configuration=None): # noqa: E501 + """SettingsMetadataProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._components = None self._error = None @@ -70,13 +67,9 @@ def __init__( if error is not None: self.error = error if selected_component_after_activation is not None: - self.selected_component_after_activation = ( - selected_component_after_activation - ) + self.selected_component_after_activation = selected_component_after_activation if selected_component_before_activation is not None: - self.selected_component_before_activation = ( - selected_component_before_activation - ) + self.selected_component_before_activation = selected_component_before_activation @property def components(self): @@ -94,7 +87,7 @@ def components(self, components): :param components: The components of this SettingsMetadataProperties. # noqa: E501 - :type: list[ComponentMetaDataProperties] + :type components: list[ComponentMetaDataProperties] """ self._components = components @@ -115,7 +108,7 @@ def error(self, error): :param error: The error of this SettingsMetadataProperties. # noqa: E501 - :type: str + :type error: str """ self._error = error @@ -136,7 +129,7 @@ def selected_component_after_activation(self, selected_component_after_activatio :param selected_component_after_activation: The selected_component_after_activation of this SettingsMetadataProperties. # noqa: E501 - :type: str + :type selected_component_after_activation: str """ self._selected_component_after_activation = selected_component_after_activation @@ -152,46 +145,45 @@ def selected_component_before_activation(self): return self._selected_component_before_activation @selected_component_before_activation.setter - def selected_component_before_activation( - self, selected_component_before_activation - ): + def selected_component_before_activation(self, selected_component_before_activation): """Sets the selected_component_before_activation of this SettingsMetadataProperties. :param selected_component_before_activation: The selected_component_before_activation of this SettingsMetadataProperties. # noqa: E501 - :type: str + :type selected_component_before_activation: str """ - self._selected_component_before_activation = ( - selected_component_before_activation - ) + self._selected_component_before_activation = selected_component_before_activation - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SettingsMetadataProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/settings_update_object.py b/src/clients/ctm_api_client/models/settings_update_object.py index 1335de2..0e80854 100644 --- a/src/clients/ctm_api_client/models/settings_update_object.py +++ b/src/clients/ctm_api_client/models/settings_update_object.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SettingsUpdateObject(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "settings_obj": "SettingPropertiesObject", - "comp_key_type": "ComponentMftKeyType", + openapi_types = { + 'settings_obj': 'SettingPropertiesObject', + 'comp_key_type': 'ComponentMftKeyType' } - attribute_map = {"settings_obj": "SettingsObj", "comp_key_type": "CompKeyType"} + attribute_map = { + 'settings_obj': 'SettingsObj', + 'comp_key_type': 'CompKeyType' + } - def __init__( - self, settings_obj=None, comp_key_type=None, _configuration=None - ): # noqa: E501 - """SettingsUpdateObject - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, settings_obj=None, comp_key_type=None, local_vars_configuration=None): # noqa: E501 + """SettingsUpdateObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._settings_obj = None self._comp_key_type = None @@ -60,7 +65,6 @@ def __init__( def settings_obj(self): """Gets the settings_obj of this SettingsUpdateObject. # noqa: E501 - Settings Properties Object # noqa: E501 :return: The settings_obj of this SettingsUpdateObject. # noqa: E501 :rtype: SettingPropertiesObject @@ -71,10 +75,9 @@ def settings_obj(self): def settings_obj(self, settings_obj): """Sets the settings_obj of this SettingsUpdateObject. - Settings Properties Object # noqa: E501 :param settings_obj: The settings_obj of this SettingsUpdateObject. # noqa: E501 - :type: SettingPropertiesObject + :type settings_obj: SettingPropertiesObject """ self._settings_obj = settings_obj @@ -83,7 +86,6 @@ def settings_obj(self, settings_obj): def comp_key_type(self): """Gets the comp_key_type of this SettingsUpdateObject. # noqa: E501 - Component Mft key type # noqa: E501 :return: The comp_key_type of this SettingsUpdateObject. # noqa: E501 :rtype: ComponentMftKeyType @@ -94,40 +96,42 @@ def comp_key_type(self): def comp_key_type(self, comp_key_type): """Sets the comp_key_type of this SettingsUpdateObject. - Component Mft key type # noqa: E501 :param comp_key_type: The comp_key_type of this SettingsUpdateObject. # noqa: E501 - :type: ComponentMftKeyType + :type comp_key_type: ComponentMftKeyType """ self._comp_key_type = comp_key_type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SettingsUpdateObject, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/sla_service.py b/src/clients/ctm_api_client/models/sla_service.py index b97aeba..22e8a20 100644 --- a/src/clients/ctm_api_client/models/sla_service.py +++ b/src/clients/ctm_api_client/models/sla_service.py @@ -5,109 +5,93 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SLAService(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "service_name": "str", - "status": "str", - "status_reason": "str", - "start_time": "str", - "end_time": "str", - "due_time": "str", - "slack_time": "str", - "service_order_date_time": "str", - "scheduled_order_date": "str", - "service_job": "str", - "service_control_m": "str", - "priority": "str", - "note": "str", - "total_jobs": "str", - "jobs_completed": "str", - "jobs_without_statistics": "str", - "completion_percentage": "str", - "average_completion_time": "str", - "errors": "str", - "status_by_jobs": "SLAServiceStatusByJobs", + openapi_types = { + 'service_name': 'str', + 'service_key': 'str', + 'status': 'str', + 'status_reason': 'str', + 'start_time': 'str', + 'end_time': 'str', + 'due_time': 'str', + 'slack_time': 'str', + 'service_order_date_time': 'str', + 'scheduled_order_date': 'str', + 'service_job': 'str', + 'service_control_m': 'str', + 'priority': 'str', + 'note': 'str', + 'total_jobs': 'str', + 'jobs_completed': 'str', + 'jobs_without_statistics': 'str', + 'completion_percentage': 'str', + 'average_completion_time': 'str', + 'errors': 'str', + 'status_by_jobs': 'SLAServiceStatusByJobs' } attribute_map = { - "service_name": "serviceName", - "status": "status", - "status_reason": "statusReason", - "start_time": "startTime", - "end_time": "endTime", - "due_time": "dueTime", - "slack_time": "slackTime", - "service_order_date_time": "serviceOrderDateTime", - "scheduled_order_date": "scheduledOrderDate", - "service_job": "serviceJob", - "service_control_m": "serviceControlM", - "priority": "priority", - "note": "note", - "total_jobs": "totalJobs", - "jobs_completed": "jobsCompleted", - "jobs_without_statistics": "jobsWithoutStatistics", - "completion_percentage": "completionPercentage", - "average_completion_time": "averageCompletionTime", - "errors": "errors", - "status_by_jobs": "statusByJobs", + 'service_name': 'serviceName', + 'service_key': 'serviceKey', + 'status': 'status', + 'status_reason': 'statusReason', + 'start_time': 'startTime', + 'end_time': 'endTime', + 'due_time': 'dueTime', + 'slack_time': 'slackTime', + 'service_order_date_time': 'serviceOrderDateTime', + 'scheduled_order_date': 'scheduledOrderDate', + 'service_job': 'serviceJob', + 'service_control_m': 'serviceControlM', + 'priority': 'priority', + 'note': 'note', + 'total_jobs': 'totalJobs', + 'jobs_completed': 'jobsCompleted', + 'jobs_without_statistics': 'jobsWithoutStatistics', + 'completion_percentage': 'completionPercentage', + 'average_completion_time': 'averageCompletionTime', + 'errors': 'errors', + 'status_by_jobs': 'statusByJobs' } - def __init__( - self, - service_name=None, - status=None, - status_reason=None, - start_time=None, - end_time=None, - due_time=None, - slack_time=None, - service_order_date_time=None, - scheduled_order_date=None, - service_job=None, - service_control_m=None, - priority=None, - note=None, - total_jobs=None, - jobs_completed=None, - jobs_without_statistics=None, - completion_percentage=None, - average_completion_time=None, - errors=None, - status_by_jobs=None, - _configuration=None, - ): # noqa: E501 - """SLAService - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, service_name=None, service_key=None, status=None, status_reason=None, start_time=None, end_time=None, due_time=None, slack_time=None, service_order_date_time=None, scheduled_order_date=None, service_job=None, service_control_m=None, priority=None, note=None, total_jobs=None, jobs_completed=None, jobs_without_statistics=None, completion_percentage=None, average_completion_time=None, errors=None, status_by_jobs=None, local_vars_configuration=None): # noqa: E501 + """SLAService - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._service_name = None + self._service_key = None self._status = None self._status_reason = None self._start_time = None @@ -131,6 +115,8 @@ def __init__( if service_name is not None: self.service_name = service_name + if service_key is not None: + self.service_key = service_key if status is not None: self.status = status if status_reason is not None: @@ -188,11 +174,34 @@ def service_name(self, service_name): Service Name # noqa: E501 :param service_name: The service_name of this SLAService. # noqa: E501 - :type: str + :type service_name: str """ self._service_name = service_name + @property + def service_key(self): + """Gets the service_key of this SLAService. # noqa: E501 + + Service Key # noqa: E501 + + :return: The service_key of this SLAService. # noqa: E501 + :rtype: str + """ + return self._service_key + + @service_key.setter + def service_key(self, service_key): + """Sets the service_key of this SLAService. + + Service Key # noqa: E501 + + :param service_key: The service_key of this SLAService. # noqa: E501 + :type service_key: str + """ + + self._service_key = service_key + @property def status(self): """Gets the status of this SLAService. # noqa: E501 @@ -211,7 +220,7 @@ def status(self, status): Status Code # noqa: E501 :param status: The status of this SLAService. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -234,7 +243,7 @@ def status_reason(self, status_reason): Status Reason # noqa: E501 :param status_reason: The status_reason of this SLAService. # noqa: E501 - :type: str + :type status_reason: str """ self._status_reason = status_reason @@ -257,7 +266,7 @@ def start_time(self, start_time): Start Time # noqa: E501 :param start_time: The start_time of this SLAService. # noqa: E501 - :type: str + :type start_time: str """ self._start_time = start_time @@ -280,7 +289,7 @@ def end_time(self, end_time): End Time # noqa: E501 :param end_time: The end_time of this SLAService. # noqa: E501 - :type: str + :type end_time: str """ self._end_time = end_time @@ -303,7 +312,7 @@ def due_time(self, due_time): Due Time # noqa: E501 :param due_time: The due_time of this SLAService. # noqa: E501 - :type: str + :type due_time: str """ self._due_time = due_time @@ -326,7 +335,7 @@ def slack_time(self, slack_time): Slack Time # noqa: E501 :param slack_time: The slack_time of this SLAService. # noqa: E501 - :type: str + :type slack_time: str """ self._slack_time = slack_time @@ -349,7 +358,7 @@ def service_order_date_time(self, service_order_date_time): Service Order DateTime # noqa: E501 :param service_order_date_time: The service_order_date_time of this SLAService. # noqa: E501 - :type: str + :type service_order_date_time: str """ self._service_order_date_time = service_order_date_time @@ -372,7 +381,7 @@ def scheduled_order_date(self, scheduled_order_date): Control-M Order Date # noqa: E501 :param scheduled_order_date: The scheduled_order_date of this SLAService. # noqa: E501 - :type: str + :type scheduled_order_date: str """ self._scheduled_order_date = scheduled_order_date @@ -395,7 +404,7 @@ def service_job(self, service_job): Service Key # noqa: E501 :param service_job: The service_job of this SLAService. # noqa: E501 - :type: str + :type service_job: str """ self._service_job = service_job @@ -418,7 +427,7 @@ def service_control_m(self, service_control_m): Service Control-M # noqa: E501 :param service_control_m: The service_control_m of this SLAService. # noqa: E501 - :type: str + :type service_control_m: str """ self._service_control_m = service_control_m @@ -441,7 +450,7 @@ def priority(self, priority): Priority # noqa: E501 :param priority: The priority of this SLAService. # noqa: E501 - :type: str + :type priority: str """ self._priority = priority @@ -464,7 +473,7 @@ def note(self, note): User note # noqa: E501 :param note: The note of this SLAService. # noqa: E501 - :type: str + :type note: str """ self._note = note @@ -487,7 +496,7 @@ def total_jobs(self, total_jobs): Number of Jobs # noqa: E501 :param total_jobs: The total_jobs of this SLAService. # noqa: E501 - :type: str + :type total_jobs: str """ self._total_jobs = total_jobs @@ -510,7 +519,7 @@ def jobs_completed(self, jobs_completed): Jobs Completed # noqa: E501 :param jobs_completed: The jobs_completed of this SLAService. # noqa: E501 - :type: str + :type jobs_completed: str """ self._jobs_completed = jobs_completed @@ -533,7 +542,7 @@ def jobs_without_statistics(self, jobs_without_statistics): Jobs without statistics # noqa: E501 :param jobs_without_statistics: The jobs_without_statistics of this SLAService. # noqa: E501 - :type: str + :type jobs_without_statistics: str """ self._jobs_without_statistics = jobs_without_statistics @@ -556,7 +565,7 @@ def completion_percentage(self, completion_percentage): Completion Percentage # noqa: E501 :param completion_percentage: The completion_percentage of this SLAService. # noqa: E501 - :type: str + :type completion_percentage: str """ self._completion_percentage = completion_percentage @@ -579,7 +588,7 @@ def average_completion_time(self, average_completion_time): Average Completion Time # noqa: E501 :param average_completion_time: The average_completion_time of this SLAService. # noqa: E501 - :type: str + :type average_completion_time: str """ self._average_completion_time = average_completion_time @@ -602,7 +611,7 @@ def errors(self, errors): Error details # noqa: E501 :param errors: The errors of this SLAService. # noqa: E501 - :type: str + :type errors: str """ self._errors = errors @@ -611,7 +620,6 @@ def errors(self, errors): def status_by_jobs(self): """Gets the status_by_jobs of this SLAService. # noqa: E501 - Status By Jobs # noqa: E501 :return: The status_by_jobs of this SLAService. # noqa: E501 :rtype: SLAServiceStatusByJobs @@ -622,40 +630,42 @@ def status_by_jobs(self): def status_by_jobs(self, status_by_jobs): """Sets the status_by_jobs of this SLAService. - Status By Jobs # noqa: E501 :param status_by_jobs: The status_by_jobs of this SLAService. # noqa: E501 - :type: SLAServiceStatusByJobs + :type status_by_jobs: SLAServiceStatusByJobs """ self._status_by_jobs = status_by_jobs - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SLAService, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/sla_service_status_by_jobs.py b/src/clients/ctm_api_client/models/sla_service_status_by_jobs.py index cffb5b6..c0bfdee 100644 --- a/src/clients/ctm_api_client/models/sla_service_status_by_jobs.py +++ b/src/clients/ctm_api_client/models/sla_service_status_by_jobs.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SLAServiceStatusByJobs(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "executed": "str", - "wait_condition": "str", - "wait_resource": "str", - "wait_user": "str", - "wait_host": "str", - "wait_workload": "str", - "completed": "str", - "error": "str", - "unknown": "str", + openapi_types = { + 'executed': 'str', + 'wait_condition': 'str', + 'wait_resource': 'str', + 'wait_user': 'str', + 'wait_host': 'str', + 'wait_workload': 'str', + 'completed': 'str', + 'error': 'str', + 'unknown': 'str' } attribute_map = { - "executed": "executed", - "wait_condition": "waitCondition", - "wait_resource": "waitResource", - "wait_user": "waitUser", - "wait_host": "waitHost", - "wait_workload": "waitWorkload", - "completed": "completed", - "error": "error", - "unknown": "unknown", + 'executed': 'executed', + 'wait_condition': 'waitCondition', + 'wait_resource': 'waitResource', + 'wait_user': 'waitUser', + 'wait_host': 'waitHost', + 'wait_workload': 'waitWorkload', + 'completed': 'completed', + 'error': 'error', + 'unknown': 'unknown' } - def __init__( - self, - executed=None, - wait_condition=None, - wait_resource=None, - wait_user=None, - wait_host=None, - wait_workload=None, - completed=None, - error=None, - unknown=None, - _configuration=None, - ): # noqa: E501 - """SLAServiceStatusByJobs - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, executed=None, wait_condition=None, wait_resource=None, wait_user=None, wait_host=None, wait_workload=None, completed=None, error=None, unknown=None, local_vars_configuration=None): # noqa: E501 + """SLAServiceStatusByJobs - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._executed = None self._wait_condition = None @@ -122,7 +114,7 @@ def executed(self, executed): Executed # noqa: E501 :param executed: The executed of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type executed: str """ self._executed = executed @@ -145,7 +137,7 @@ def wait_condition(self, wait_condition): Wait Condition # noqa: E501 :param wait_condition: The wait_condition of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type wait_condition: str """ self._wait_condition = wait_condition @@ -168,7 +160,7 @@ def wait_resource(self, wait_resource): Wait Resource # noqa: E501 :param wait_resource: The wait_resource of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type wait_resource: str """ self._wait_resource = wait_resource @@ -191,7 +183,7 @@ def wait_user(self, wait_user): Wait User # noqa: E501 :param wait_user: The wait_user of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type wait_user: str """ self._wait_user = wait_user @@ -214,7 +206,7 @@ def wait_host(self, wait_host): Wait Host # noqa: E501 :param wait_host: The wait_host of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type wait_host: str """ self._wait_host = wait_host @@ -237,7 +229,7 @@ def wait_workload(self, wait_workload): Wait Workload # noqa: E501 :param wait_workload: The wait_workload of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type wait_workload: str """ self._wait_workload = wait_workload @@ -260,7 +252,7 @@ def completed(self, completed): Completed # noqa: E501 :param completed: The completed of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type completed: str """ self._completed = completed @@ -283,7 +275,7 @@ def error(self, error): Error # noqa: E501 :param error: The error of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type error: str """ self._error = error @@ -306,37 +298,40 @@ def unknown(self, unknown): Unkwown # noqa: E501 :param unknown: The unknown of this SLAServiceStatusByJobs. # noqa: E501 - :type: str + :type unknown: str """ self._unknown = unknown - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SLAServiceStatusByJobs, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/ssh_key_properties.py b/src/clients/ctm_api_client/models/ssh_key_properties.py index 7b25351..5695d6b 100644 --- a/src/clients/ctm_api_client/models/ssh_key_properties.py +++ b/src/clients/ctm_api_client/models/ssh_key_properties.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SshKeyProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"key_name": "str", "key_passphrase": "str", "key_size": "int"} + openapi_types = { + 'key_name': 'str', + 'key_passphrase': 'str', + 'key_size': 'int' + } attribute_map = { - "key_name": "keyName", - "key_passphrase": "keyPassphrase", - "key_size": "keySize", + 'key_name': 'keyName', + 'key_passphrase': 'keyPassphrase', + 'key_size': 'keySize' } - def __init__( - self, key_name=None, key_passphrase=None, key_size=2048, _configuration=None - ): # noqa: E501 - """SshKeyProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, key_name=None, key_passphrase=None, key_size=2048, local_vars_configuration=None): # noqa: E501 + """SshKeyProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._key_name = None self._key_passphrase = None @@ -78,7 +84,7 @@ def key_name(self, key_name): External user data REQUIRED # noqa: E501 :param key_name: The key_name of this SshKeyProperties. # noqa: E501 - :type: str + :type key_name: str """ self._key_name = key_name @@ -101,7 +107,7 @@ def key_passphrase(self, key_passphrase): SSH Key passphrase REQUIRED # noqa: E501 :param key_passphrase: The key_passphrase of this SshKeyProperties. # noqa: E501 - :type: str + :type key_passphrase: str """ self._key_passphrase = key_passphrase @@ -124,37 +130,40 @@ def key_size(self, key_size): SSH Key size (default 2048) # noqa: E501 :param key_size: The key_size of this SshKeyProperties. # noqa: E501 - :type: int + :type key_size: int """ self._key_size = key_size - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SshKeyProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/statistics.py b/src/clients/ctm_api_client/models/statistics.py index 774d633..48e882b 100644 --- a/src/clients/ctm_api_client/models/statistics.py +++ b/src/clients/ctm_api_client/models/statistics.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Statistics(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "current_period": "str", - "calendar_controlm": "str", - "calendar_name": "str", - "periods": "list[StatisticsPeriod]", + openapi_types = { + 'current_period': 'str', + 'calendar_controlm': 'str', + 'calendar_name': 'str', + 'periods': 'list[StatisticsPeriod]' } attribute_map = { - "current_period": "currentPeriod", - "calendar_controlm": "calendarControlm", - "calendar_name": "calendarName", - "periods": "periods", + 'current_period': 'currentPeriod', + 'calendar_controlm': 'calendarControlm', + 'calendar_name': 'calendarName', + 'periods': 'periods' } - def __init__( - self, - current_period=None, - calendar_controlm=None, - calendar_name=None, - periods=None, - _configuration=None, - ): # noqa: E501 - """Statistics - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, current_period=None, calendar_controlm=None, calendar_name=None, periods=None, local_vars_configuration=None): # noqa: E501 + """Statistics - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._current_period = None self._calendar_controlm = None @@ -92,7 +89,7 @@ def current_period(self, current_period): Statistics calendar period # noqa: E501 :param current_period: The current_period of this Statistics. # noqa: E501 - :type: str + :type current_period: str """ self._current_period = current_period @@ -115,7 +112,7 @@ def calendar_controlm(self, calendar_controlm): Statistics calendar Control-M # noqa: E501 :param calendar_controlm: The calendar_controlm of this Statistics. # noqa: E501 - :type: str + :type calendar_controlm: str """ self._calendar_controlm = calendar_controlm @@ -138,7 +135,7 @@ def calendar_name(self, calendar_name): Statistics calendar name # noqa: E501 :param calendar_name: The calendar_name of this Statistics. # noqa: E501 - :type: str + :type calendar_name: str """ self._calendar_name = calendar_name @@ -159,37 +156,40 @@ def periods(self, periods): :param periods: The periods of this Statistics. # noqa: E501 - :type: list[StatisticsPeriod] + :type periods: list[StatisticsPeriod] """ self._periods = periods - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Statistics, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/statistics_average_info.py b/src/clients/ctm_api_client/models/statistics_average_info.py index b11c12e..1dd6e96 100644 --- a/src/clients/ctm_api_client/models/statistics_average_info.py +++ b/src/clients/ctm_api_client/models/statistics_average_info.py @@ -5,48 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class StatisticsAverageInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"start_time": "str", "cpu_time": "str", "run_time": "str"} + openapi_types = { + 'start_time': 'str', + 'cpu_time': 'str', + 'run_time': 'str' + } attribute_map = { - "start_time": "startTime", - "cpu_time": "cpuTime", - "run_time": "runTime", + 'start_time': 'startTime', + 'cpu_time': 'cpuTime', + 'run_time': 'runTime' } - def __init__( - self, start_time=None, cpu_time=None, run_time=None, _configuration=None - ): # noqa: E501 - """StatisticsAverageInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, start_time=None, cpu_time=None, run_time=None, local_vars_configuration=None): # noqa: E501 + """StatisticsAverageInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._start_time = None self._cpu_time = None @@ -78,7 +84,7 @@ def start_time(self, start_time): Average start time # noqa: E501 :param start_time: The start_time of this StatisticsAverageInfo. # noqa: E501 - :type: str + :type start_time: str """ self._start_time = start_time @@ -101,7 +107,7 @@ def cpu_time(self, cpu_time): Average CPU time # noqa: E501 :param cpu_time: The cpu_time of this StatisticsAverageInfo. # noqa: E501 - :type: str + :type cpu_time: str """ self._cpu_time = cpu_time @@ -124,37 +130,40 @@ def run_time(self, run_time): Average time # noqa: E501 :param run_time: The run_time of this StatisticsAverageInfo. # noqa: E501 - :type: str + :type run_time: str """ self._run_time = run_time - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(StatisticsAverageInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/statistics_period.py b/src/clients/ctm_api_client/models/statistics_period.py index 78e70b3..630f218 100644 --- a/src/clients/ctm_api_client/models/statistics_period.py +++ b/src/clients/ctm_api_client/models/statistics_period.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class StatisticsPeriod(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"period_tag": "str", "run_info": "StatisticsRunInfo"} - - attribute_map = {"period_tag": "periodTag", "run_info": "runInfo"} - - def __init__( - self, period_tag=None, run_info=None, _configuration=None - ): # noqa: E501 - """StatisticsPeriod - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'period_tag': 'str', + 'run_info': 'StatisticsRunInfo' + } + + attribute_map = { + 'period_tag': 'periodTag', + 'run_info': 'runInfo' + } + + def __init__(self, period_tag=None, run_info=None, local_vars_configuration=None): # noqa: E501 + """StatisticsPeriod - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._period_tag = None self._run_info = None @@ -71,7 +79,7 @@ def period_tag(self, period_tag): Period tag # noqa: E501 :param period_tag: The period_tag of this StatisticsPeriod. # noqa: E501 - :type: str + :type period_tag: str """ self._period_tag = period_tag @@ -80,7 +88,6 @@ def period_tag(self, period_tag): def run_info(self): """Gets the run_info of this StatisticsPeriod. # noqa: E501 - Statistics run information # noqa: E501 :return: The run_info of this StatisticsPeriod. # noqa: E501 :rtype: StatisticsRunInfo @@ -91,40 +98,42 @@ def run_info(self): def run_info(self, run_info): """Sets the run_info of this StatisticsPeriod. - Statistics run information # noqa: E501 :param run_info: The run_info of this StatisticsPeriod. # noqa: E501 - :type: StatisticsRunInfo + :type run_info: StatisticsRunInfo """ self._run_info = run_info - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(StatisticsPeriod, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/statistics_run_info.py b/src/clients/ctm_api_client/models/statistics_run_info.py index c890298..242a9e9 100644 --- a/src/clients/ctm_api_client/models/statistics_run_info.py +++ b/src/clients/ctm_api_client/models/statistics_run_info.py @@ -5,45 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class StatisticsRunInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "average_info": "StatisticsAverageInfo", - "runs": "list[StatisticsSingleRun]", + openapi_types = { + 'average_info': 'StatisticsAverageInfo', + 'runs': 'list[StatisticsSingleRun]' } - attribute_map = {"average_info": "averageInfo", "runs": "runs"} + attribute_map = { + 'average_info': 'averageInfo', + 'runs': 'runs' + } - def __init__(self, average_info=None, runs=None, _configuration=None): # noqa: E501 - """StatisticsRunInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, average_info=None, runs=None, local_vars_configuration=None): # noqa: E501 + """StatisticsRunInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._average_info = None self._runs = None @@ -58,7 +65,6 @@ def __init__(self, average_info=None, runs=None, _configuration=None): # noqa: def average_info(self): """Gets the average_info of this StatisticsRunInfo. # noqa: E501 - Statistics average information # noqa: E501 :return: The average_info of this StatisticsRunInfo. # noqa: E501 :rtype: StatisticsAverageInfo @@ -69,10 +75,9 @@ def average_info(self): def average_info(self, average_info): """Sets the average_info of this StatisticsRunInfo. - Statistics average information # noqa: E501 :param average_info: The average_info of this StatisticsRunInfo. # noqa: E501 - :type: StatisticsAverageInfo + :type average_info: StatisticsAverageInfo """ self._average_info = average_info @@ -93,37 +98,40 @@ def runs(self, runs): :param runs: The runs of this StatisticsRunInfo. # noqa: E501 - :type: list[StatisticsSingleRun] + :type runs: list[StatisticsSingleRun] """ self._runs = runs - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(StatisticsRunInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/statistics_single_run.py b/src/clients/ctm_api_client/models/statistics_single_run.py index 7c580c3..7ec9c8a 100644 --- a/src/clients/ctm_api_client/models/statistics_single_run.py +++ b/src/clients/ctm_api_client/models/statistics_single_run.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class StatisticsSingleRun(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "start_time": "str", - "end_time": "str", - "cpu_time": "str", - "run_time": "str", - "job_id": "str", - "order_date": "str", + openapi_types = { + 'start_time': 'str', + 'end_time': 'str', + 'cpu_time': 'str', + 'run_time': 'str', + 'job_id': 'str', + 'order_date': 'str' } attribute_map = { - "start_time": "startTime", - "end_time": "endTime", - "cpu_time": "cpuTime", - "run_time": "runTime", - "job_id": "jobId", - "order_date": "orderDate", + 'start_time': 'startTime', + 'end_time': 'endTime', + 'cpu_time': 'cpuTime', + 'run_time': 'runTime', + 'job_id': 'jobId', + 'order_date': 'orderDate' } - def __init__( - self, - start_time=None, - end_time=None, - cpu_time=None, - run_time=None, - job_id=None, - order_date=None, - _configuration=None, - ): # noqa: E501 - """StatisticsSingleRun - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, start_time=None, end_time=None, cpu_time=None, run_time=None, job_id=None, order_date=None, local_vars_configuration=None): # noqa: E501 + """StatisticsSingleRun - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._start_time = None self._end_time = None @@ -104,7 +99,7 @@ def start_time(self, start_time): job run start time # noqa: E501 :param start_time: The start_time of this StatisticsSingleRun. # noqa: E501 - :type: str + :type start_time: str """ self._start_time = start_time @@ -127,7 +122,7 @@ def end_time(self, end_time): job run end time # noqa: E501 :param end_time: The end_time of this StatisticsSingleRun. # noqa: E501 - :type: str + :type end_time: str """ self._end_time = end_time @@ -150,7 +145,7 @@ def cpu_time(self, cpu_time): job run CPU time # noqa: E501 :param cpu_time: The cpu_time of this StatisticsSingleRun. # noqa: E501 - :type: str + :type cpu_time: str """ self._cpu_time = cpu_time @@ -173,7 +168,7 @@ def run_time(self, run_time): jobs run time # noqa: E501 :param run_time: The run_time of this StatisticsSingleRun. # noqa: E501 - :type: str + :type run_time: str """ self._run_time = run_time @@ -196,7 +191,7 @@ def job_id(self, job_id): run job id # noqa: E501 :param job_id: The job_id of this StatisticsSingleRun. # noqa: E501 - :type: str + :type job_id: str """ self._job_id = job_id @@ -219,37 +214,40 @@ def order_date(self, order_date): job order date # noqa: E501 :param order_date: The order_date of this StatisticsSingleRun. # noqa: E501 - :type: str + :type order_date: str """ self._order_date = order_date - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(StatisticsSingleRun, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/string_list_result.py b/src/clients/ctm_api_client/models/string_list_result.py deleted file mode 100644 index 00424da..0000000 --- a/src/clients/ctm_api_client/models/string_list_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class StringListResult(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """StringListResult - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(StringListResult, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StringListResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, StringListResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/success_data.py b/src/clients/ctm_api_client/models/success_data.py index 688f232..e4d36d4 100644 --- a/src/clients/ctm_api_client/models/success_data.py +++ b/src/clients/ctm_api_client/models/success_data.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SuccessData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str"} + openapi_types = { + 'message': 'str' + } - attribute_map = {"message": "message"} + attribute_map = { + 'message': 'message' + } - def __init__(self, message=None, _configuration=None): # noqa: E501 - """SuccessData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, message=None, local_vars_configuration=None): # noqa: E501 + """SuccessData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self.discriminator = None @@ -66,37 +74,40 @@ def message(self, message): The success message that describes the performed action. # noqa: E501 :param message: The message of this SuccessData. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SuccessData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/summary.py b/src/clients/ctm_api_client/models/summary.py index 6f2fd9d..7e99eec 100644 --- a/src/clients/ctm_api_client/models/summary.py +++ b/src/clients/ctm_api_client/models/summary.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Summary(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "total_number_of_jobs": "int", - "total_data_size": "str", - "actual_db_size": "str", - "disk_usage": "str", + openapi_types = { + 'total_number_of_jobs': 'int', + 'total_data_size': 'str', + 'actual_db_size': 'str', + 'disk_usage': 'str' } attribute_map = { - "total_number_of_jobs": "totalNumberOfJobs", - "total_data_size": "totalDataSize", - "actual_db_size": "actualDbSize", - "disk_usage": "diskUsage", + 'total_number_of_jobs': 'totalNumberOfJobs', + 'total_data_size': 'totalDataSize', + 'actual_db_size': 'actualDbSize', + 'disk_usage': 'diskUsage' } - def __init__( - self, - total_number_of_jobs=None, - total_data_size=None, - actual_db_size=None, - disk_usage=None, - _configuration=None, - ): # noqa: E501 - """Summary - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, total_number_of_jobs=None, total_data_size=None, actual_db_size=None, disk_usage=None, local_vars_configuration=None): # noqa: E501 + """Summary - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._total_number_of_jobs = None self._total_data_size = None @@ -90,7 +87,7 @@ def total_number_of_jobs(self, total_number_of_jobs): :param total_number_of_jobs: The total_number_of_jobs of this Summary. # noqa: E501 - :type: int + :type total_number_of_jobs: int """ self._total_number_of_jobs = total_number_of_jobs @@ -111,7 +108,7 @@ def total_data_size(self, total_data_size): :param total_data_size: The total_data_size of this Summary. # noqa: E501 - :type: str + :type total_data_size: str """ self._total_data_size = total_data_size @@ -132,7 +129,7 @@ def actual_db_size(self, actual_db_size): :param actual_db_size: The actual_db_size of this Summary. # noqa: E501 - :type: str + :type actual_db_size: str """ self._actual_db_size = actual_db_size @@ -153,37 +150,40 @@ def disk_usage(self, disk_usage): :param disk_usage: The disk_usage of this Summary. # noqa: E501 - :type: str + :type disk_usage: str """ self._disk_usage = disk_usage - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Summary, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/system_parameter.py b/src/clients/ctm_api_client/models/system_parameter.py index 5ea57e7..d6afe5e 100644 --- a/src/clients/ctm_api_client/models/system_parameter.py +++ b/src/clients/ctm_api_client/models/system_parameter.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SystemParameter(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str", "type": "str"} - - attribute_map = {"name": "name", "value": "value", "type": "type"} - - def __init__( - self, name=None, value=None, type=None, _configuration=None - ): # noqa: E501 - """SystemParameter - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str', + 'type': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value', + 'type': 'type' + } + + def __init__(self, name=None, value=None, type=None, local_vars_configuration=None): # noqa: E501 + """SystemParameter - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -74,7 +84,7 @@ def name(self, name): System parameter name # noqa: E501 :param name: The name of this SystemParameter. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -97,7 +107,7 @@ def value(self, value): System parameter value # noqa: E501 :param value: The value of this SystemParameter. # noqa: E501 - :type: str + :type value: str """ self._value = value @@ -120,37 +130,40 @@ def type(self, type): System parameter type # noqa: E501 :param type: The type of this SystemParameter. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SystemParameter, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/system_setting.py b/src/clients/ctm_api_client/models/system_setting.py index b4b6d7a..ca986b1 100644 --- a/src/clients/ctm_api_client/models/system_setting.py +++ b/src/clients/ctm_api_client/models/system_setting.py @@ -5,95 +5,108 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SystemSetting(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "saml2_identity_provider": "Saml2IdentityProvider", - "ldap_settings": "SystemSettingLdap", - "new_day_time": "SystemSettingProperty", - "first_day_of_the_week": "SystemSettingProperty", - "environment_banner_color": "SystemSettingProperty", - "environment_title": "SystemSettingProperty", - "environment_description": "SystemSettingProperty", - "enforce_site_standards": "SystemSettingProperty", - "strictnesslevel": "SystemSettingProperty", - "history_retention_days": "SystemSettingProperty", - "annotations": "SystemSettingAnnotationProperty", - "errors": "list[ErrorData]", + openapi_types = { + 'saml2_identity_provider': 'Saml2IdentityProvider', + 'ldap_settings': 'SystemSettingLdap', + 'new_day_time': 'SystemSettingProperty', + 'first_day_of_the_week': 'SystemSettingProperty', + 'site_interface_language': 'SystemSettingProperty', + 'environment_banner_color': 'SystemSettingProperty', + 'enabled_vault_providers': 'SystemSettingProperty', + 'environment_title': 'SystemSettingProperty', + 'environment_description': 'SystemSettingProperty', + 'enforce_site_standards': 'SystemSettingProperty', + 'strictnesslevel': 'SystemSettingProperty', + 'history_retention_days': 'SystemSettingProperty', + 'privacy_notice_url': 'SystemSettingProperty', + 'allow_duplicate_job_names': 'SystemSettingProperty', + 'enable_external_alerts': 'SystemSettingProperty', + 'cms_comm_mode': 'SystemSettingProperty', + 'user_audit_annotation': 'SystemSettingProperty', + 'annotations': 'list[str]', + 'additional_parameters': 'list[KeyValue]', + 'errors': 'list[ErrorData]' } attribute_map = { - "saml2_identity_provider": "saml2IdentityProvider", - "ldap_settings": "ldapSettings", - "new_day_time": "newDayTime", - "first_day_of_the_week": "firstDayOfTheWeek", - "environment_banner_color": "environmentBannerColor", - "environment_title": "environmentTitle", - "environment_description": "environmentDescription", - "enforce_site_standards": "enforceSiteStandards", - "strictnesslevel": "strictnesslevel", - "history_retention_days": "historyRetentionDays", - "annotations": "annotations", - "errors": "errors", + 'saml2_identity_provider': 'saml2IdentityProvider', + 'ldap_settings': 'ldapSettings', + 'new_day_time': 'newDayTime', + 'first_day_of_the_week': 'firstDayOfTheWeek', + 'site_interface_language': 'siteInterfaceLanguage', + 'environment_banner_color': 'environmentBannerColor', + 'enabled_vault_providers': 'enabledVaultProviders', + 'environment_title': 'environmentTitle', + 'environment_description': 'environmentDescription', + 'enforce_site_standards': 'enforceSiteStandards', + 'strictnesslevel': 'strictnesslevel', + 'history_retention_days': 'historyRetentionDays', + 'privacy_notice_url': 'privacyNoticeURL', + 'allow_duplicate_job_names': 'allowDuplicateJobNames', + 'enable_external_alerts': 'enableExternalAlerts', + 'cms_comm_mode': 'cmsCommMode', + 'user_audit_annotation': 'userAuditAnnotation', + 'annotations': 'annotations', + 'additional_parameters': 'additionalParameters', + 'errors': 'errors' } - def __init__( - self, - saml2_identity_provider=None, - ldap_settings=None, - new_day_time=None, - first_day_of_the_week=None, - environment_banner_color=None, - environment_title=None, - environment_description=None, - enforce_site_standards=None, - strictnesslevel=None, - history_retention_days=None, - annotations=None, - errors=None, - _configuration=None, - ): # noqa: E501 - """SystemSetting - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, saml2_identity_provider=None, ldap_settings=None, new_day_time=None, first_day_of_the_week=None, site_interface_language=None, environment_banner_color=None, enabled_vault_providers=None, environment_title=None, environment_description=None, enforce_site_standards=None, strictnesslevel=None, history_retention_days=None, privacy_notice_url=None, allow_duplicate_job_names=None, enable_external_alerts=None, cms_comm_mode=None, user_audit_annotation=None, annotations=None, additional_parameters=None, errors=None, local_vars_configuration=None): # noqa: E501 + """SystemSetting - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._saml2_identity_provider = None self._ldap_settings = None self._new_day_time = None self._first_day_of_the_week = None + self._site_interface_language = None self._environment_banner_color = None + self._enabled_vault_providers = None self._environment_title = None self._environment_description = None self._enforce_site_standards = None self._strictnesslevel = None self._history_retention_days = None + self._privacy_notice_url = None + self._allow_duplicate_job_names = None + self._enable_external_alerts = None + self._cms_comm_mode = None + self._user_audit_annotation = None self._annotations = None + self._additional_parameters = None self._errors = None self.discriminator = None @@ -105,8 +118,12 @@ def __init__( self.new_day_time = new_day_time if first_day_of_the_week is not None: self.first_day_of_the_week = first_day_of_the_week + if site_interface_language is not None: + self.site_interface_language = site_interface_language if environment_banner_color is not None: self.environment_banner_color = environment_banner_color + if enabled_vault_providers is not None: + self.enabled_vault_providers = enabled_vault_providers if environment_title is not None: self.environment_title = environment_title if environment_description is not None: @@ -117,8 +134,20 @@ def __init__( self.strictnesslevel = strictnesslevel if history_retention_days is not None: self.history_retention_days = history_retention_days + if privacy_notice_url is not None: + self.privacy_notice_url = privacy_notice_url + if allow_duplicate_job_names is not None: + self.allow_duplicate_job_names = allow_duplicate_job_names + if enable_external_alerts is not None: + self.enable_external_alerts = enable_external_alerts + if cms_comm_mode is not None: + self.cms_comm_mode = cms_comm_mode + if user_audit_annotation is not None: + self.user_audit_annotation = user_audit_annotation if annotations is not None: self.annotations = annotations + if additional_parameters is not None: + self.additional_parameters = additional_parameters if errors is not None: self.errors = errors @@ -138,7 +167,7 @@ def saml2_identity_provider(self, saml2_identity_provider): :param saml2_identity_provider: The saml2_identity_provider of this SystemSetting. # noqa: E501 - :type: Saml2IdentityProvider + :type saml2_identity_provider: Saml2IdentityProvider """ self._saml2_identity_provider = saml2_identity_provider @@ -159,7 +188,7 @@ def ldap_settings(self, ldap_settings): :param ldap_settings: The ldap_settings of this SystemSetting. # noqa: E501 - :type: SystemSettingLdap + :type ldap_settings: SystemSettingLdap """ self._ldap_settings = ldap_settings @@ -180,7 +209,7 @@ def new_day_time(self, new_day_time): :param new_day_time: The new_day_time of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type new_day_time: SystemSettingProperty """ self._new_day_time = new_day_time @@ -201,11 +230,32 @@ def first_day_of_the_week(self, first_day_of_the_week): :param first_day_of_the_week: The first_day_of_the_week of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type first_day_of_the_week: SystemSettingProperty """ self._first_day_of_the_week = first_day_of_the_week + @property + def site_interface_language(self): + """Gets the site_interface_language of this SystemSetting. # noqa: E501 + + + :return: The site_interface_language of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._site_interface_language + + @site_interface_language.setter + def site_interface_language(self, site_interface_language): + """Sets the site_interface_language of this SystemSetting. + + + :param site_interface_language: The site_interface_language of this SystemSetting. # noqa: E501 + :type site_interface_language: SystemSettingProperty + """ + + self._site_interface_language = site_interface_language + @property def environment_banner_color(self): """Gets the environment_banner_color of this SystemSetting. # noqa: E501 @@ -222,11 +272,32 @@ def environment_banner_color(self, environment_banner_color): :param environment_banner_color: The environment_banner_color of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type environment_banner_color: SystemSettingProperty """ self._environment_banner_color = environment_banner_color + @property + def enabled_vault_providers(self): + """Gets the enabled_vault_providers of this SystemSetting. # noqa: E501 + + + :return: The enabled_vault_providers of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._enabled_vault_providers + + @enabled_vault_providers.setter + def enabled_vault_providers(self, enabled_vault_providers): + """Sets the enabled_vault_providers of this SystemSetting. + + + :param enabled_vault_providers: The enabled_vault_providers of this SystemSetting. # noqa: E501 + :type enabled_vault_providers: SystemSettingProperty + """ + + self._enabled_vault_providers = enabled_vault_providers + @property def environment_title(self): """Gets the environment_title of this SystemSetting. # noqa: E501 @@ -243,7 +314,7 @@ def environment_title(self, environment_title): :param environment_title: The environment_title of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type environment_title: SystemSettingProperty """ self._environment_title = environment_title @@ -264,7 +335,7 @@ def environment_description(self, environment_description): :param environment_description: The environment_description of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type environment_description: SystemSettingProperty """ self._environment_description = environment_description @@ -285,7 +356,7 @@ def enforce_site_standards(self, enforce_site_standards): :param enforce_site_standards: The enforce_site_standards of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type enforce_site_standards: SystemSettingProperty """ self._enforce_site_standards = enforce_site_standards @@ -306,7 +377,7 @@ def strictnesslevel(self, strictnesslevel): :param strictnesslevel: The strictnesslevel of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type strictnesslevel: SystemSettingProperty """ self._strictnesslevel = strictnesslevel @@ -327,18 +398,123 @@ def history_retention_days(self, history_retention_days): :param history_retention_days: The history_retention_days of this SystemSetting. # noqa: E501 - :type: SystemSettingProperty + :type history_retention_days: SystemSettingProperty """ self._history_retention_days = history_retention_days + @property + def privacy_notice_url(self): + """Gets the privacy_notice_url of this SystemSetting. # noqa: E501 + + + :return: The privacy_notice_url of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._privacy_notice_url + + @privacy_notice_url.setter + def privacy_notice_url(self, privacy_notice_url): + """Sets the privacy_notice_url of this SystemSetting. + + + :param privacy_notice_url: The privacy_notice_url of this SystemSetting. # noqa: E501 + :type privacy_notice_url: SystemSettingProperty + """ + + self._privacy_notice_url = privacy_notice_url + + @property + def allow_duplicate_job_names(self): + """Gets the allow_duplicate_job_names of this SystemSetting. # noqa: E501 + + + :return: The allow_duplicate_job_names of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._allow_duplicate_job_names + + @allow_duplicate_job_names.setter + def allow_duplicate_job_names(self, allow_duplicate_job_names): + """Sets the allow_duplicate_job_names of this SystemSetting. + + + :param allow_duplicate_job_names: The allow_duplicate_job_names of this SystemSetting. # noqa: E501 + :type allow_duplicate_job_names: SystemSettingProperty + """ + + self._allow_duplicate_job_names = allow_duplicate_job_names + + @property + def enable_external_alerts(self): + """Gets the enable_external_alerts of this SystemSetting. # noqa: E501 + + + :return: The enable_external_alerts of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._enable_external_alerts + + @enable_external_alerts.setter + def enable_external_alerts(self, enable_external_alerts): + """Sets the enable_external_alerts of this SystemSetting. + + + :param enable_external_alerts: The enable_external_alerts of this SystemSetting. # noqa: E501 + :type enable_external_alerts: SystemSettingProperty + """ + + self._enable_external_alerts = enable_external_alerts + + @property + def cms_comm_mode(self): + """Gets the cms_comm_mode of this SystemSetting. # noqa: E501 + + + :return: The cms_comm_mode of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._cms_comm_mode + + @cms_comm_mode.setter + def cms_comm_mode(self, cms_comm_mode): + """Sets the cms_comm_mode of this SystemSetting. + + + :param cms_comm_mode: The cms_comm_mode of this SystemSetting. # noqa: E501 + :type cms_comm_mode: SystemSettingProperty + """ + + self._cms_comm_mode = cms_comm_mode + + @property + def user_audit_annotation(self): + """Gets the user_audit_annotation of this SystemSetting. # noqa: E501 + + + :return: The user_audit_annotation of this SystemSetting. # noqa: E501 + :rtype: SystemSettingProperty + """ + return self._user_audit_annotation + + @user_audit_annotation.setter + def user_audit_annotation(self, user_audit_annotation): + """Sets the user_audit_annotation of this SystemSetting. + + + :param user_audit_annotation: The user_audit_annotation of this SystemSetting. # noqa: E501 + :type user_audit_annotation: SystemSettingProperty + """ + + self._user_audit_annotation = user_audit_annotation + @property def annotations(self): """Gets the annotations of this SystemSetting. # noqa: E501 :return: The annotations of this SystemSetting. # noqa: E501 - :rtype: SystemSettingAnnotationProperty + :rtype: list[str] """ return self._annotations @@ -348,11 +524,32 @@ def annotations(self, annotations): :param annotations: The annotations of this SystemSetting. # noqa: E501 - :type: SystemSettingAnnotationProperty + :type annotations: list[str] """ self._annotations = annotations + @property + def additional_parameters(self): + """Gets the additional_parameters of this SystemSetting. # noqa: E501 + + + :return: The additional_parameters of this SystemSetting. # noqa: E501 + :rtype: list[KeyValue] + """ + return self._additional_parameters + + @additional_parameters.setter + def additional_parameters(self, additional_parameters): + """Sets the additional_parameters of this SystemSetting. + + + :param additional_parameters: The additional_parameters of this SystemSetting. # noqa: E501 + :type additional_parameters: list[KeyValue] + """ + + self._additional_parameters = additional_parameters + @property def errors(self): """Gets the errors of this SystemSetting. # noqa: E501 @@ -369,37 +566,40 @@ def errors(self, errors): :param errors: The errors of this SystemSetting. # noqa: E501 - :type: list[ErrorData] + :type errors: list[ErrorData] """ self._errors = errors - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SystemSetting, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/system_setting_annotation_property.py b/src/clients/ctm_api_client/models/system_setting_annotation_property.py deleted file mode 100644 index 7e323fd..0000000 --- a/src/clients/ctm_api_client/models/system_setting_annotation_property.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class SystemSettingAnnotationProperty(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """SystemSettingAnnotationProperty - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(SystemSettingAnnotationProperty, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SystemSettingAnnotationProperty): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SystemSettingAnnotationProperty): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/system_setting_key_value.py b/src/clients/ctm_api_client/models/system_setting_key_value.py index 46fc72e..d4542d8 100644 --- a/src/clients/ctm_api_client/models/system_setting_key_value.py +++ b/src/clients/ctm_api_client/models/system_setting_key_value.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SystemSettingKeyValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str"} - - attribute_map = {"name": "name", "value": "value"} - - def __init__(self, name=None, value=None, _configuration=None): # noqa: E501 - """SystemSettingKeyValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """SystemSettingKeyValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -67,12 +77,10 @@ def name(self, name): Unique key # noqa: E501 :param name: The name of this SystemSettingKeyValue. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -94,41 +102,42 @@ def value(self, value): Any value in string form. # noqa: E501 :param value: The value of this SystemSettingKeyValue. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SystemSettingKeyValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/system_setting_key_value_component.py b/src/clients/ctm_api_client/models/system_setting_key_value_component.py index 8612912..726ee7e 100644 --- a/src/clients/ctm_api_client/models/system_setting_key_value_component.py +++ b/src/clients/ctm_api_client/models/system_setting_key_value_component.py @@ -5,44 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SystemSettingKeyValueComponent(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "value": "str", "component": "str"} - - attribute_map = {"name": "name", "value": "value", "component": "component"} - - def __init__( - self, name=None, value=None, component=None, _configuration=None - ): # noqa: E501 - """SystemSettingKeyValueComponent - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'value': 'str', + 'component': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value', + 'component': 'component' + } + + def __init__(self, name=None, value=None, component=None, local_vars_configuration=None): # noqa: E501 + """SystemSettingKeyValueComponent - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -72,12 +82,10 @@ def name(self, name): Unique key # noqa: E501 :param name: The name of this SystemSettingKeyValueComponent. # noqa: E501 - :type: str + :type name: str """ - if self._configuration.client_side_validation and name is None: - raise ValueError( - "Invalid value for `name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -99,12 +107,10 @@ def value(self, value): Any value in string form. # noqa: E501 :param value: The value of this SystemSettingKeyValueComponent. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value @@ -126,37 +132,40 @@ def component(self, component): Any value in string form. # noqa: E501 :param component: The component of this SystemSettingKeyValueComponent. # noqa: E501 - :type: str + :type component: str """ self._component = component - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SystemSettingKeyValueComponent, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/system_setting_ldap.py b/src/clients/ctm_api_client/models/system_setting_ldap.py index 03b5723..90e6f2d 100644 --- a/src/clients/ctm_api_client/models/system_setting_ldap.py +++ b/src/clients/ctm_api_client/models/system_setting_ldap.py @@ -5,52 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SystemSettingLdap(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ldap_enabled": "bool", - "default_domain": "str", - "domains": "list[LdapDomainSettings]", + openapi_types = { + 'ldap_enabled': 'bool', + 'default_domain': 'str', + 'domains': 'list[LdapDomainSettings]' } attribute_map = { - "ldap_enabled": "ldapEnabled", - "default_domain": "defaultDomain", - "domains": "domains", + 'ldap_enabled': 'ldapEnabled', + 'default_domain': 'defaultDomain', + 'domains': 'domains' } - def __init__( - self, ldap_enabled=None, default_domain=None, domains=None, _configuration=None - ): # noqa: E501 - """SystemSettingLdap - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ldap_enabled=None, default_domain=None, domains=None, local_vars_configuration=None): # noqa: E501 + """SystemSettingLdap - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ldap_enabled = None self._default_domain = None @@ -79,12 +81,10 @@ def ldap_enabled(self, ldap_enabled): :param ldap_enabled: The ldap_enabled of this SystemSettingLdap. # noqa: E501 - :type: bool + :type ldap_enabled: bool """ - if self._configuration.client_side_validation and ldap_enabled is None: - raise ValueError( - "Invalid value for `ldap_enabled`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and ldap_enabled is None: # noqa: E501 + raise ValueError("Invalid value for `ldap_enabled`, must not be `None`") # noqa: E501 self._ldap_enabled = ldap_enabled @@ -104,7 +104,7 @@ def default_domain(self, default_domain): :param default_domain: The default_domain of this SystemSettingLdap. # noqa: E501 - :type: str + :type default_domain: str """ self._default_domain = default_domain @@ -125,37 +125,40 @@ def domains(self, domains): :param domains: The domains of this SystemSettingLdap. # noqa: E501 - :type: list[LdapDomainSettings] + :type domains: list[LdapDomainSettings] """ self._domains = domains - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SystemSettingLdap, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/system_setting_property.py b/src/clients/ctm_api_client/models/system_setting_property.py index 2964334..ced925a 100644 --- a/src/clients/ctm_api_client/models/system_setting_property.py +++ b/src/clients/ctm_api_client/models/system_setting_property.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class SystemSettingProperty(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value": "str"} + openapi_types = { + 'value': 'str' + } - attribute_map = {"value": "value"} + attribute_map = { + 'value': 'value' + } - def __init__(self, value=None, _configuration=None): # noqa: E501 - """SystemSettingProperty - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """SystemSettingProperty - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value = None self.discriminator = None @@ -65,41 +73,42 @@ def value(self, value): Any value in string form. # noqa: E501 :param value: The value of this SystemSettingProperty. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(SystemSettingProperty, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/term_group.py b/src/clients/ctm_api_client/models/term_group.py deleted file mode 100644 index 50f796e..0000000 --- a/src/clients/ctm_api_client/models/term_group.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class TermGroup(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """TermGroup - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(TermGroup, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TermGroup): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TermGroup): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/token_data_request.py b/src/clients/ctm_api_client/models/token_data_request.py index 8cf724b..6dbd273 100644 --- a/src/clients/ctm_api_client/models/token_data_request.py +++ b/src/clients/ctm_api_client/models/token_data_request.py @@ -5,64 +5,73 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class TokenDataRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "token_name": "str", - "roles": "list[str]", - "expiration_date": "str", - "token_type": "str", + openapi_types = { + 'token_name': 'str', + 'roles': 'list[str]', + 'expiration_date': 'str', + 'token_type': 'str', + 'server': 'str', + 'server_host': 'str', + 'server_id': 'str', + 'tag': 'str' } attribute_map = { - "token_name": "tokenName", - "roles": "roles", - "expiration_date": "expirationDate", - "token_type": "tokenType", + 'token_name': 'tokenName', + 'roles': 'roles', + 'expiration_date': 'expirationDate', + 'token_type': 'tokenType', + 'server': 'server', + 'server_host': 'serverHost', + 'server_id': 'serverId', + 'tag': 'tag' } - def __init__( - self, - token_name=None, - roles=None, - expiration_date=None, - token_type=None, - _configuration=None, - ): # noqa: E501 - """TokenDataRequest - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, token_name=None, roles=None, expiration_date=None, token_type=None, server=None, server_host=None, server_id=None, tag=None, local_vars_configuration=None): # noqa: E501 + """TokenDataRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._token_name = None self._roles = None self._expiration_date = None self._token_type = None + self._server = None + self._server_host = None + self._server_id = None + self._tag = None self.discriminator = None self.token_name = token_name @@ -72,6 +81,14 @@ def __init__( self.expiration_date = expiration_date if token_type is not None: self.token_type = token_type + if server is not None: + self.server = server + if server_host is not None: + self.server_host = server_host + if server_id is not None: + self.server_id = server_id + if tag is not None: + self.tag = tag @property def token_name(self): @@ -91,12 +108,10 @@ def token_name(self, token_name): required field. HIDDEN. # noqa: E501 :param token_name: The token_name of this TokenDataRequest. # noqa: E501 - :type: str + :type token_name: str """ - if self._configuration.client_side_validation and token_name is None: - raise ValueError( - "Invalid value for `token_name`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and token_name is None: # noqa: E501 + raise ValueError("Invalid value for `token_name`, must not be `None`") # noqa: E501 self._token_name = token_name @@ -118,7 +133,7 @@ def roles(self, roles): required field when creates token for User. HIDDEN. # noqa: E501 :param roles: The roles of this TokenDataRequest. # noqa: E501 - :type: list[str] + :type roles: list[str] """ self._roles = roles @@ -141,7 +156,7 @@ def expiration_date(self, expiration_date): optional field. HIDDEN. # noqa: E501 :param expiration_date: The expiration_date of this TokenDataRequest. # noqa: E501 - :type: str + :type expiration_date: str """ self._expiration_date = expiration_date @@ -164,37 +179,132 @@ def token_type(self, token_type): optional field. HIDDEN. # noqa: E501 :param token_type: The token_type of this TokenDataRequest. # noqa: E501 - :type: str + :type token_type: str """ self._token_type = token_type - def to_dict(self): + @property + def server(self): + """Gets the server of this TokenDataRequest. # noqa: E501 + + optional field. HIDDEN. # noqa: E501 + + :return: The server of this TokenDataRequest. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this TokenDataRequest. + + optional field. HIDDEN. # noqa: E501 + + :param server: The server of this TokenDataRequest. # noqa: E501 + :type server: str + """ + + self._server = server + + @property + def server_host(self): + """Gets the server_host of this TokenDataRequest. # noqa: E501 + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :return: The server_host of this TokenDataRequest. # noqa: E501 + :rtype: str + """ + return self._server_host + + @server_host.setter + def server_host(self, server_host): + """Sets the server_host of this TokenDataRequest. + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :param server_host: The server_host of this TokenDataRequest. # noqa: E501 + :type server_host: str + """ + + self._server_host = server_host + + @property + def server_id(self): + """Gets the server_id of this TokenDataRequest. # noqa: E501 + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :return: The server_id of this TokenDataRequest. # noqa: E501 + :rtype: str + """ + return self._server_id + + @server_id.setter + def server_id(self, server_id): + """Sets the server_id of this TokenDataRequest. + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :param server_id: The server_id of this TokenDataRequest. # noqa: E501 + :type server_id: str + """ + + self._server_id = server_id + + @property + def tag(self): + """Gets the tag of this TokenDataRequest. # noqa: E501 + + optional field. HIDDEN. # noqa: E501 + + :return: The tag of this TokenDataRequest. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this TokenDataRequest. + + optional field. HIDDEN. # noqa: E501 + + :param tag: The tag of this TokenDataRequest. # noqa: E501 + :type tag: str + """ + + self._tag = tag + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(TokenDataRequest, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/token_data_response.py b/src/clients/ctm_api_client/models/token_data_response.py index 6ab27da..931e613 100644 --- a/src/clients/ctm_api_client/models/token_data_response.py +++ b/src/clients/ctm_api_client/models/token_data_response.py @@ -5,71 +5,72 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class TokenDataResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "token_name": "str", - "token_type": "str", - "token_value": "str", - "user": "str", - "roles": "list[str]", - "expiration_date": "str", - "created_date": "str", - "last_updated_date": "str", + openapi_types = { + 'token_name': 'str', + 'token_type': 'str', + 'token_value': 'str', + 'user': 'str', + 'roles': 'list[str]', + 'expiration_date': 'str', + 'created_date': 'str', + 'last_updated_date': 'str', + 'server': 'str', + 'server_host': 'str', + 'server_id': 'str', + 'tag': 'str' } attribute_map = { - "token_name": "tokenName", - "token_type": "tokenType", - "token_value": "tokenValue", - "user": "user", - "roles": "roles", - "expiration_date": "expirationDate", - "created_date": "createdDate", - "last_updated_date": "lastUpdatedDate", + 'token_name': 'tokenName', + 'token_type': 'tokenType', + 'token_value': 'tokenValue', + 'user': 'user', + 'roles': 'roles', + 'expiration_date': 'expirationDate', + 'created_date': 'createdDate', + 'last_updated_date': 'lastUpdatedDate', + 'server': 'server', + 'server_host': 'serverHost', + 'server_id': 'serverId', + 'tag': 'tag' } - def __init__( - self, - token_name=None, - token_type=None, - token_value=None, - user=None, - roles=None, - expiration_date=None, - created_date=None, - last_updated_date=None, - _configuration=None, - ): # noqa: E501 - """TokenDataResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, token_name=None, token_type=None, token_value=None, user=None, roles=None, expiration_date=None, created_date=None, last_updated_date=None, server=None, server_host=None, server_id=None, tag=None, local_vars_configuration=None): # noqa: E501 + """TokenDataResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._token_name = None self._token_type = None @@ -79,11 +80,18 @@ def __init__( self._expiration_date = None self._created_date = None self._last_updated_date = None + self._server = None + self._server_host = None + self._server_id = None + self._tag = None self.discriminator = None - self.token_name = token_name - self.token_type = token_type - self.token_value = token_value + if token_name is not None: + self.token_name = token_name + if token_type is not None: + self.token_type = token_type + if token_value is not None: + self.token_value = token_value if user is not None: self.user = user if roles is not None: @@ -94,12 +102,19 @@ def __init__( self.created_date = created_date if last_updated_date is not None: self.last_updated_date = last_updated_date + if server is not None: + self.server = server + if server_host is not None: + self.server_host = server_host + if server_id is not None: + self.server_id = server_id + if tag is not None: + self.tag = tag @property def token_name(self): """Gets the token_name of this TokenDataResponse. # noqa: E501 - required field. HIDDEN. # noqa: E501 :return: The token_name of this TokenDataResponse. # noqa: E501 :rtype: str @@ -110,15 +125,10 @@ def token_name(self): def token_name(self, token_name): """Sets the token_name of this TokenDataResponse. - required field. HIDDEN. # noqa: E501 :param token_name: The token_name of this TokenDataResponse. # noqa: E501 - :type: str + :type token_name: str """ - if self._configuration.client_side_validation and token_name is None: - raise ValueError( - "Invalid value for `token_name`, must not be `None`" - ) # noqa: E501 self._token_name = token_name @@ -126,7 +136,6 @@ def token_name(self, token_name): def token_type(self): """Gets the token_type of this TokenDataResponse. # noqa: E501 - required field. HIDDEN. # noqa: E501 :return: The token_type of this TokenDataResponse. # noqa: E501 :rtype: str @@ -137,15 +146,10 @@ def token_type(self): def token_type(self, token_type): """Sets the token_type of this TokenDataResponse. - required field. HIDDEN. # noqa: E501 :param token_type: The token_type of this TokenDataResponse. # noqa: E501 - :type: str + :type token_type: str """ - if self._configuration.client_side_validation and token_type is None: - raise ValueError( - "Invalid value for `token_type`, must not be `None`" - ) # noqa: E501 self._token_type = token_type @@ -153,7 +157,6 @@ def token_type(self, token_type): def token_value(self): """Gets the token_value of this TokenDataResponse. # noqa: E501 - required field. HIDDEN. # noqa: E501 :return: The token_value of this TokenDataResponse. # noqa: E501 :rtype: str @@ -164,15 +167,10 @@ def token_value(self): def token_value(self, token_value): """Sets the token_value of this TokenDataResponse. - required field. HIDDEN. # noqa: E501 :param token_value: The token_value of this TokenDataResponse. # noqa: E501 - :type: str + :type token_value: str """ - if self._configuration.client_side_validation and token_value is None: - raise ValueError( - "Invalid value for `token_value`, must not be `None`" - ) # noqa: E501 self._token_value = token_value @@ -194,7 +192,7 @@ def user(self, user): is not provided in API Token for Agent. HIDDEN. # noqa: E501 :param user: The user of this TokenDataResponse. # noqa: E501 - :type: str + :type user: str """ self._user = user @@ -217,7 +215,7 @@ def roles(self, roles): is not provided in API Token for Agent. HIDDEN. # noqa: E501 :param roles: The roles of this TokenDataResponse. # noqa: E501 - :type: list[str] + :type roles: list[str] """ self._roles = roles @@ -240,7 +238,7 @@ def expiration_date(self, expiration_date): optional field. HIDDEN. # noqa: E501 :param expiration_date: The expiration_date of this TokenDataResponse. # noqa: E501 - :type: str + :type expiration_date: str """ self._expiration_date = expiration_date @@ -263,7 +261,7 @@ def created_date(self, created_date): transient field. HIDDEN. # noqa: E501 :param created_date: The created_date of this TokenDataResponse. # noqa: E501 - :type: str + :type created_date: str """ self._created_date = created_date @@ -286,37 +284,132 @@ def last_updated_date(self, last_updated_date): transient field. HIDDEN. # noqa: E501 :param last_updated_date: The last_updated_date of this TokenDataResponse. # noqa: E501 - :type: str + :type last_updated_date: str """ self._last_updated_date = last_updated_date - def to_dict(self): + @property + def server(self): + """Gets the server of this TokenDataResponse. # noqa: E501 + + optional field. HIDDEN. # noqa: E501 + + :return: The server of this TokenDataResponse. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this TokenDataResponse. + + optional field. HIDDEN. # noqa: E501 + + :param server: The server of this TokenDataResponse. # noqa: E501 + :type server: str + """ + + self._server = server + + @property + def server_host(self): + """Gets the server_host of this TokenDataResponse. # noqa: E501 + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :return: The server_host of this TokenDataResponse. # noqa: E501 + :rtype: str + """ + return self._server_host + + @server_host.setter + def server_host(self, server_host): + """Sets the server_host of this TokenDataResponse. + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :param server_host: The server_host of this TokenDataResponse. # noqa: E501 + :type server_host: str + """ + + self._server_host = server_host + + @property + def server_id(self): + """Gets the server_id of this TokenDataResponse. # noqa: E501 + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :return: The server_id of this TokenDataResponse. # noqa: E501 + :rtype: str + """ + return self._server_id + + @server_id.setter + def server_id(self, server_id): + """Sets the server_id of this TokenDataResponse. + + optional field used in for CTM token. HIDDEN. # noqa: E501 + + :param server_id: The server_id of this TokenDataResponse. # noqa: E501 + :type server_id: str + """ + + self._server_id = server_id + + @property + def tag(self): + """Gets the tag of this TokenDataResponse. # noqa: E501 + + optional field. HIDDEN. # noqa: E501 + + :return: The tag of this TokenDataResponse. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this TokenDataResponse. + + optional field. HIDDEN. # noqa: E501 + + :param tag: The tag of this TokenDataResponse. # noqa: E501 + :type tag: str + """ + + self._tag = tag + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(TokenDataResponse, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/token_list.py b/src/clients/ctm_api_client/models/token_list.py index a159daa..297a24b 100644 --- a/src/clients/ctm_api_client/models/token_list.py +++ b/src/clients/ctm_api_client/models/token_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class TokenList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"tokens": "TokenListArray"} + openapi_types = { + 'tokens': 'list[TokenDataResponse]' + } - attribute_map = {"tokens": "tokens"} + attribute_map = { + 'tokens': 'tokens' + } - def __init__(self, tokens=None, _configuration=None): # noqa: E501 - """TokenList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, tokens=None, local_vars_configuration=None): # noqa: E501 + """TokenList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._tokens = None self.discriminator = None @@ -51,10 +59,9 @@ def __init__(self, tokens=None, _configuration=None): # noqa: E501 def tokens(self): """Gets the tokens of this TokenList. # noqa: E501 - HIDDEN. # noqa: E501 :return: The tokens of this TokenList. # noqa: E501 - :rtype: TokenListArray + :rtype: list[TokenDataResponse] """ return self._tokens @@ -62,44 +69,44 @@ def tokens(self): def tokens(self, tokens): """Sets the tokens of this TokenList. - HIDDEN. # noqa: E501 :param tokens: The tokens of this TokenList. # noqa: E501 - :type: TokenListArray + :type tokens: list[TokenDataResponse] """ - if self._configuration.client_side_validation and tokens is None: - raise ValueError( - "Invalid value for `tokens`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and tokens is None: # noqa: E501 + raise ValueError("Invalid value for `tokens`, must not be `None`") # noqa: E501 self._tokens = tokens - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(TokenList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/token_list_array.py b/src/clients/ctm_api_client/models/token_list_array.py deleted file mode 100644 index 067281b..0000000 --- a/src/clients/ctm_api_client/models/token_list_array.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class TokenListArray(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """TokenListArray - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(TokenListArray, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TokenListArray): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TokenListArray): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/tools_privilege_category.py b/src/clients/ctm_api_client/models/tools_privilege_category.py index d8be033..f6534b3 100644 --- a/src/clients/ctm_api_client/models/tools_privilege_category.py +++ b/src/clients/ctm_api_client/models/tools_privilege_category.py @@ -5,68 +5,86 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ToolsPrivilegeCategory(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "cli": "str", - "batch_impact_manager_report": "str", - "forecast_report": "str", + openapi_types = { + 'cli': 'str', + 'batch_impact_manager_report': 'str', + 'sla_management_reports': 'str', + 'forecast_report': 'str', + 'history_reports': 'str', + 'control_m_report': 'str', + 'site_standard_policies': 'str' } attribute_map = { - "cli": "Cli", - "batch_impact_manager_report": "BatchImpactManagerReport", - "forecast_report": "ForecastReport", + 'cli': 'Cli', + 'batch_impact_manager_report': 'BatchImpactManagerReport', + 'sla_management_reports': 'SlaManagementReports', + 'forecast_report': 'ForecastReport', + 'history_reports': 'HistoryReports', + 'control_m_report': 'ControlMReport', + 'site_standard_policies': 'SiteStandardPolicies' } - def __init__( - self, - cli=None, - batch_impact_manager_report=None, - forecast_report=None, - _configuration=None, - ): # noqa: E501 - """ToolsPrivilegeCategory - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, cli=None, batch_impact_manager_report=None, sla_management_reports=None, forecast_report=None, history_reports=None, control_m_report=None, site_standard_policies=None, local_vars_configuration=None): # noqa: E501 + """ToolsPrivilegeCategory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._cli = None self._batch_impact_manager_report = None + self._sla_management_reports = None self._forecast_report = None + self._history_reports = None + self._control_m_report = None + self._site_standard_policies = None self.discriminator = None if cli is not None: self.cli = cli if batch_impact_manager_report is not None: self.batch_impact_manager_report = batch_impact_manager_report + if sla_management_reports is not None: + self.sla_management_reports = sla_management_reports if forecast_report is not None: self.forecast_report = forecast_report + if history_reports is not None: + self.history_reports = history_reports + if control_m_report is not None: + self.control_m_report = control_m_report + if site_standard_policies is not None: + self.site_standard_policies = site_standard_policies @property def cli(self): @@ -86,7 +104,7 @@ def cli(self, cli): CLI access level (None, Browse, Update, Full) # noqa: E501 :param cli: The cli of this ToolsPrivilegeCategory. # noqa: E501 - :type: str + :type cli: str """ self._cli = cli @@ -109,11 +127,34 @@ def batch_impact_manager_report(self, batch_impact_manager_report): BIM Reports access level (None, Browse, Update, Full) # noqa: E501 :param batch_impact_manager_report: The batch_impact_manager_report of this ToolsPrivilegeCategory. # noqa: E501 - :type: str + :type batch_impact_manager_report: str """ self._batch_impact_manager_report = batch_impact_manager_report + @property + def sla_management_reports(self): + """Gets the sla_management_reports of this ToolsPrivilegeCategory. # noqa: E501 + + SLA Management Reports access level (None, Browse, Update, Full) # noqa: E501 + + :return: The sla_management_reports of this ToolsPrivilegeCategory. # noqa: E501 + :rtype: str + """ + return self._sla_management_reports + + @sla_management_reports.setter + def sla_management_reports(self, sla_management_reports): + """Sets the sla_management_reports of this ToolsPrivilegeCategory. + + SLA Management Reports access level (None, Browse, Update, Full) # noqa: E501 + + :param sla_management_reports: The sla_management_reports of this ToolsPrivilegeCategory. # noqa: E501 + :type sla_management_reports: str + """ + + self._sla_management_reports = sla_management_reports + @property def forecast_report(self): """Gets the forecast_report of this ToolsPrivilegeCategory. # noqa: E501 @@ -132,37 +173,109 @@ def forecast_report(self, forecast_report): Forecast Reports access level (None, Browse, Update, Full) # noqa: E501 :param forecast_report: The forecast_report of this ToolsPrivilegeCategory. # noqa: E501 - :type: str + :type forecast_report: str """ self._forecast_report = forecast_report - def to_dict(self): + @property + def history_reports(self): + """Gets the history_reports of this ToolsPrivilegeCategory. # noqa: E501 + + History Reports access level (None, Browse, Update, Full) # noqa: E501 + + :return: The history_reports of this ToolsPrivilegeCategory. # noqa: E501 + :rtype: str + """ + return self._history_reports + + @history_reports.setter + def history_reports(self, history_reports): + """Sets the history_reports of this ToolsPrivilegeCategory. + + History Reports access level (None, Browse, Update, Full) # noqa: E501 + + :param history_reports: The history_reports of this ToolsPrivilegeCategory. # noqa: E501 + :type history_reports: str + """ + + self._history_reports = history_reports + + @property + def control_m_report(self): + """Gets the control_m_report of this ToolsPrivilegeCategory. # noqa: E501 + + Control-M Reports access level (None, Full) # noqa: E501 + + :return: The control_m_report of this ToolsPrivilegeCategory. # noqa: E501 + :rtype: str + """ + return self._control_m_report + + @control_m_report.setter + def control_m_report(self, control_m_report): + """Sets the control_m_report of this ToolsPrivilegeCategory. + + Control-M Reports access level (None, Full) # noqa: E501 + + :param control_m_report: The control_m_report of this ToolsPrivilegeCategory. # noqa: E501 + :type control_m_report: str + """ + + self._control_m_report = control_m_report + + @property + def site_standard_policies(self): + """Gets the site_standard_policies of this ToolsPrivilegeCategory. # noqa: E501 + + Site Standard Policies access level (Browse, Update, Full) # noqa: E501 + + :return: The site_standard_policies of this ToolsPrivilegeCategory. # noqa: E501 + :rtype: str + """ + return self._site_standard_policies + + @site_standard_policies.setter + def site_standard_policies(self, site_standard_policies): + """Sets the site_standard_policies of this ToolsPrivilegeCategory. + + Site Standard Policies access level (Browse, Update, Full) # noqa: E501 + + :param site_standard_policies: The site_standard_policies of this ToolsPrivilegeCategory. # noqa: E501 + :type site_standard_policies: str + """ + + self._site_standard_policies = site_standard_policies + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ToolsPrivilegeCategory, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/topology.py b/src/clients/ctm_api_client/models/topology.py index 9ab9ab4..196c7e5 100644 --- a/src/clients/ctm_api_client/models/topology.py +++ b/src/clients/ctm_api_client/models/topology.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Topology(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"clusters": "list[Cluster]"} + openapi_types = { + 'clusters': 'list[Cluster]' + } - attribute_map = {"clusters": "clusters"} + attribute_map = { + 'clusters': 'clusters' + } - def __init__(self, clusters=None, _configuration=None): # noqa: E501 - """Topology - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, clusters=None, local_vars_configuration=None): # noqa: E501 + """Topology - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._clusters = None self.discriminator = None @@ -64,37 +72,40 @@ def clusters(self, clusters): :param clusters: The clusters of this Topology. # noqa: E501 - :type: list[Cluster] + :type clusters: list[Cluster] """ self._clusters = clusters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Topology, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_agent_info.py b/src/clients/ctm_api_client/models/upgrade_agent_info.py index cfba021..075387b 100644 --- a/src/clients/ctm_api_client/models/upgrade_agent_info.py +++ b/src/clients/ctm_api_client/models/upgrade_agent_info.py @@ -5,65 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeAgentInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "agent": "str", - "ctm": "str", - "type": "str", - "platform": "str", - "from_version": "str", - "to_version": "str", + openapi_types = { + 'agent': 'str', + 'ctm': 'str', + 'type': 'str', + 'platform': 'str', + 'from_version': 'str', + 'to_version': 'str', + 'package_name': 'str', + 'reason': 'str', + 'eligible_to_upgrade': 'bool' } attribute_map = { - "agent": "agent", - "ctm": "ctm", - "type": "type", - "platform": "platform", - "from_version": "fromVersion", - "to_version": "toVersion", + 'agent': 'agent', + 'ctm': 'ctm', + 'type': 'type', + 'platform': 'platform', + 'from_version': 'fromVersion', + 'to_version': 'toVersion', + 'package_name': 'packageName', + 'reason': 'reason', + 'eligible_to_upgrade': 'eligibleToUpgrade' } - def __init__( - self, - agent=None, - ctm=None, - type=None, - platform=None, - from_version=None, - to_version=None, - _configuration=None, - ): # noqa: E501 - """UpgradeAgentInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, agent=None, ctm=None, type=None, platform=None, from_version=None, to_version=None, package_name=None, reason=None, eligible_to_upgrade=None, local_vars_configuration=None): # noqa: E501 + """UpgradeAgentInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._agent = None self._ctm = None @@ -71,6 +72,9 @@ def __init__( self._platform = None self._from_version = None self._to_version = None + self._package_name = None + self._reason = None + self._eligible_to_upgrade = None self.discriminator = None if agent is not None: @@ -85,6 +89,12 @@ def __init__( self.from_version = from_version if to_version is not None: self.to_version = to_version + if package_name is not None: + self.package_name = package_name + if reason is not None: + self.reason = reason + if eligible_to_upgrade is not None: + self.eligible_to_upgrade = eligible_to_upgrade @property def agent(self): @@ -104,7 +114,7 @@ def agent(self, agent): Agent name. # noqa: E501 :param agent: The agent of this UpgradeAgentInfo. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -127,7 +137,7 @@ def ctm(self, ctm): Control-M name. # noqa: E501 :param ctm: The ctm of this UpgradeAgentInfo. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -150,7 +160,7 @@ def type(self, type): Agent type (Agent, MFT, AppPack). # noqa: E501 :param type: The type of this UpgradeAgentInfo. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -173,7 +183,7 @@ def platform(self, platform): Platform. # noqa: E501 :param platform: The platform of this UpgradeAgentInfo. # noqa: E501 - :type: str + :type platform: str """ self._platform = platform @@ -196,7 +206,7 @@ def from_version(self, from_version): From version. # noqa: E501 :param from_version: The from_version of this UpgradeAgentInfo. # noqa: E501 - :type: str + :type from_version: str """ self._from_version = from_version @@ -219,37 +229,109 @@ def to_version(self, to_version): To version. # noqa: E501 :param to_version: The to_version of this UpgradeAgentInfo. # noqa: E501 - :type: str + :type to_version: str """ self._to_version = to_version - def to_dict(self): + @property + def package_name(self): + """Gets the package_name of this UpgradeAgentInfo. # noqa: E501 + + Package Name. # noqa: E501 + + :return: The package_name of this UpgradeAgentInfo. # noqa: E501 + :rtype: str + """ + return self._package_name + + @package_name.setter + def package_name(self, package_name): + """Sets the package_name of this UpgradeAgentInfo. + + Package Name. # noqa: E501 + + :param package_name: The package_name of this UpgradeAgentInfo. # noqa: E501 + :type package_name: str + """ + + self._package_name = package_name + + @property + def reason(self): + """Gets the reason of this UpgradeAgentInfo. # noqa: E501 + + Reason for ineligibility # noqa: E501 + + :return: The reason of this UpgradeAgentInfo. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this UpgradeAgentInfo. + + Reason for ineligibility # noqa: E501 + + :param reason: The reason of this UpgradeAgentInfo. # noqa: E501 + :type reason: str + """ + + self._reason = reason + + @property + def eligible_to_upgrade(self): + """Gets the eligible_to_upgrade of this UpgradeAgentInfo. # noqa: E501 + + Eligibility Status # noqa: E501 + + :return: The eligible_to_upgrade of this UpgradeAgentInfo. # noqa: E501 + :rtype: bool + """ + return self._eligible_to_upgrade + + @eligible_to_upgrade.setter + def eligible_to_upgrade(self, eligible_to_upgrade): + """Sets the eligible_to_upgrade of this UpgradeAgentInfo. + + Eligibility Status # noqa: E501 + + :param eligible_to_upgrade: The eligible_to_upgrade of this UpgradeAgentInfo. # noqa: E501 + :type eligible_to_upgrade: bool + """ + + self._eligible_to_upgrade = eligible_to_upgrade + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeAgentInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_agent_info_list.py b/src/clients/ctm_api_client/models/upgrade_agent_info_list.py deleted file mode 100644 index d153b2e..0000000 --- a/src/clients/ctm_api_client/models/upgrade_agent_info_list.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class UpgradeAgentInfoList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """UpgradeAgentInfoList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(UpgradeAgentInfoList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpgradeAgentInfoList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpgradeAgentInfoList): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/upgrade_info.py b/src/clients/ctm_api_client/models/upgrade_info.py index 0401cc5..3ad2b50 100644 --- a/src/clients/ctm_api_client/models/upgrade_info.py +++ b/src/clients/ctm_api_client/models/upgrade_info.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"type": "str", "version": "str"} - - attribute_map = {"type": "type", "version": "version"} - - def __init__(self, type=None, version=None, _configuration=None): # noqa: E501 - """UpgradeInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'type': 'str', + 'version': 'str' + } + + attribute_map = { + 'type': 'type', + 'version': 'version' + } + + def __init__(self, type=None, version=None, local_vars_configuration=None): # noqa: E501 + """UpgradeInfo - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._type = None self._version = None @@ -69,7 +79,7 @@ def type(self, type): product type (Agent, MFT, AppPack). # noqa: E501 :param type: The type of this UpgradeInfo. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -92,37 +102,40 @@ def version(self, version): upgrade version # noqa: E501 :param version: The version of this UpgradeInfo. # noqa: E501 - :type: str + :type version: str """ self._version = version - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeInfo, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_notification.py b/src/clients/ctm_api_client/models/upgrade_notification.py index b1da0bd..4728c7d 100644 --- a/src/clients/ctm_api_client/models/upgrade_notification.py +++ b/src/clients/ctm_api_client/models/upgrade_notification.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeNotification(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"message": "str"} + openapi_types = { + 'message': 'str' + } - attribute_map = {"message": "message"} + attribute_map = { + 'message': 'message' + } - def __init__(self, message=None, _configuration=None): # noqa: E501 - """UpgradeNotification - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, message=None, local_vars_configuration=None): # noqa: E501 + """UpgradeNotification - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self.discriminator = None @@ -64,37 +72,40 @@ def message(self, message): :param message: The message of this UpgradeNotification. # noqa: E501 - :type: str + :type message: str """ self._message = message - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeNotification, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_record.py b/src/clients/ctm_api_client/models/upgrade_record.py index 78ff1ff..f4aabc7 100644 --- a/src/clients/ctm_api_client/models/upgrade_record.py +++ b/src/clients/ctm_api_client/models/upgrade_record.py @@ -5,101 +5,86 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeRecord(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "upgrade_id": "str", - "ctm": "str", - "agent": "str", - "package": "str", - "from_version": "str", - "to_version": "str", - "activity": "str", - "status": "str", - "message": "str", - "creation_time": "str", - "transfer_start_time": "str", - "transfer_end_time": "str", - "install_start_time": "str", - "install_end_time": "str", - "activity_name": "str", - "install_user": "str", - "notify_address": "str", - "description": "str", + openapi_types = { + 'upgrade_id': 'str', + 'ctm': 'str', + 'agent': 'str', + 'package': 'str', + 'from_version': 'str', + 'to_version': 'str', + 'activity': 'str', + 'status': 'str', + 'message': 'str', + 'creation_time': 'str', + 'transfer_start_time': 'str', + 'transfer_end_time': 'str', + 'install_start_time': 'str', + 'install_end_time': 'str', + 'activity_name': 'str', + 'install_user': 'str', + 'notify_address': 'str', + 'description': 'str', + 'external_java_path': 'str' } attribute_map = { - "upgrade_id": "upgradeId", - "ctm": "ctm", - "agent": "agent", - "package": "package", - "from_version": "fromVersion", - "to_version": "toVersion", - "activity": "activity", - "status": "status", - "message": "message", - "creation_time": "creationTime", - "transfer_start_time": "transferStartTime", - "transfer_end_time": "transferEndTime", - "install_start_time": "installStartTime", - "install_end_time": "installEndTime", - "activity_name": "activityName", - "install_user": "installUser", - "notify_address": "notifyAddress", - "description": "description", + 'upgrade_id': 'upgradeId', + 'ctm': 'ctm', + 'agent': 'agent', + 'package': 'package', + 'from_version': 'fromVersion', + 'to_version': 'toVersion', + 'activity': 'activity', + 'status': 'status', + 'message': 'message', + 'creation_time': 'creationTime', + 'transfer_start_time': 'transferStartTime', + 'transfer_end_time': 'transferEndTime', + 'install_start_time': 'installStartTime', + 'install_end_time': 'installEndTime', + 'activity_name': 'activityName', + 'install_user': 'installUser', + 'notify_address': 'notifyAddress', + 'description': 'description', + 'external_java_path': 'externalJavaPath' } - def __init__( - self, - upgrade_id=None, - ctm=None, - agent=None, - package=None, - from_version=None, - to_version=None, - activity=None, - status=None, - message=None, - creation_time=None, - transfer_start_time=None, - transfer_end_time=None, - install_start_time=None, - install_end_time=None, - activity_name=None, - install_user=None, - notify_address=None, - description=None, - _configuration=None, - ): # noqa: E501 - """UpgradeRecord - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, upgrade_id=None, ctm=None, agent=None, package=None, from_version=None, to_version=None, activity=None, status=None, message=None, creation_time=None, transfer_start_time=None, transfer_end_time=None, install_start_time=None, install_end_time=None, activity_name=None, install_user=None, notify_address=None, description=None, external_java_path=None, local_vars_configuration=None): # noqa: E501 + """UpgradeRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._upgrade_id = None self._ctm = None @@ -119,6 +104,7 @@ def __init__( self._install_user = None self._notify_address = None self._description = None + self._external_java_path = None self.discriminator = None if upgrade_id is not None: @@ -157,6 +143,8 @@ def __init__( self.notify_address = notify_address if description is not None: self.description = description + if external_java_path is not None: + self.external_java_path = external_java_path @property def upgrade_id(self): @@ -176,7 +164,7 @@ def upgrade_id(self, upgrade_id): upgrade id # noqa: E501 :param upgrade_id: The upgrade_id of this UpgradeRecord. # noqa: E501 - :type: str + :type upgrade_id: str """ self._upgrade_id = upgrade_id @@ -199,7 +187,7 @@ def ctm(self, ctm): Control-M name # noqa: E501 :param ctm: The ctm of this UpgradeRecord. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -222,7 +210,7 @@ def agent(self, agent): agnet name # noqa: E501 :param agent: The agent of this UpgradeRecord. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -245,7 +233,7 @@ def package(self, package): upgrade package type # noqa: E501 :param package: The package of this UpgradeRecord. # noqa: E501 - :type: str + :type package: str """ self._package = package @@ -268,7 +256,7 @@ def from_version(self, from_version): upgrade from version # noqa: E501 :param from_version: The from_version of this UpgradeRecord. # noqa: E501 - :type: str + :type from_version: str """ self._from_version = from_version @@ -291,7 +279,7 @@ def to_version(self, to_version): upgrade to version # noqa: E501 :param to_version: The to_version of this UpgradeRecord. # noqa: E501 - :type: str + :type to_version: str """ self._to_version = to_version @@ -314,7 +302,7 @@ def activity(self, activity): activity type (Transfer, Install, Rollback) # noqa: E501 :param activity: The activity of this UpgradeRecord. # noqa: E501 - :type: str + :type activity: str """ self._activity = activity @@ -337,7 +325,7 @@ def status(self, status): status tyoe (Cancel, Running Complete,TransferCompleted, Failed,Unavailable) # noqa: E501 :param status: The status of this UpgradeRecord. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -360,7 +348,7 @@ def message(self, message): massage # noqa: E501 :param message: The message of this UpgradeRecord. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -383,7 +371,7 @@ def creation_time(self, creation_time): creation time # noqa: E501 :param creation_time: The creation_time of this UpgradeRecord. # noqa: E501 - :type: str + :type creation_time: str """ self._creation_time = creation_time @@ -406,7 +394,7 @@ def transfer_start_time(self, transfer_start_time): transfer start time # noqa: E501 :param transfer_start_time: The transfer_start_time of this UpgradeRecord. # noqa: E501 - :type: str + :type transfer_start_time: str """ self._transfer_start_time = transfer_start_time @@ -429,7 +417,7 @@ def transfer_end_time(self, transfer_end_time): transfer end time # noqa: E501 :param transfer_end_time: The transfer_end_time of this UpgradeRecord. # noqa: E501 - :type: str + :type transfer_end_time: str """ self._transfer_end_time = transfer_end_time @@ -452,7 +440,7 @@ def install_start_time(self, install_start_time): installation start time # noqa: E501 :param install_start_time: The install_start_time of this UpgradeRecord. # noqa: E501 - :type: str + :type install_start_time: str """ self._install_start_time = install_start_time @@ -475,7 +463,7 @@ def install_end_time(self, install_end_time): installation end time # noqa: E501 :param install_end_time: The install_end_time of this UpgradeRecord. # noqa: E501 - :type: str + :type install_end_time: str """ self._install_end_time = install_end_time @@ -498,7 +486,7 @@ def activity_name(self, activity_name): activity name # noqa: E501 :param activity_name: The activity_name of this UpgradeRecord. # noqa: E501 - :type: str + :type activity_name: str """ self._activity_name = activity_name @@ -521,7 +509,7 @@ def install_user(self, install_user): install user # noqa: E501 :param install_user: The install_user of this UpgradeRecord. # noqa: E501 - :type: str + :type install_user: str """ self._install_user = install_user @@ -544,7 +532,7 @@ def notify_address(self, notify_address): notify address # noqa: E501 :param notify_address: The notify_address of this UpgradeRecord. # noqa: E501 - :type: str + :type notify_address: str """ self._notify_address = notify_address @@ -567,37 +555,63 @@ def description(self, description): description # noqa: E501 :param description: The description of this UpgradeRecord. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + @property + def external_java_path(self): + """Gets the external_java_path of this UpgradeRecord. # noqa: E501 + + Gets the value of the externalJavaPath property. # noqa: E501 + + :return: The external_java_path of this UpgradeRecord. # noqa: E501 + :rtype: str + """ + return self._external_java_path + + @external_java_path.setter + def external_java_path(self, external_java_path): + """Sets the external_java_path of this UpgradeRecord. + + Gets the value of the externalJavaPath property. # noqa: E501 + + :param external_java_path: The external_java_path of this UpgradeRecord. # noqa: E501 + :type external_java_path: str + """ + + self._external_java_path = external_java_path + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeRecord, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_record_list.py b/src/clients/ctm_api_client/models/upgrade_record_list.py index 24bfd2b..cfd425e 100644 --- a/src/clients/ctm_api_client/models/upgrade_record_list.py +++ b/src/clients/ctm_api_client/models/upgrade_record_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeRecordList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"upgrade_records": "list[UpgradeRecord]"} + openapi_types = { + 'upgrade_records': 'list[UpgradeRecord]' + } - attribute_map = {"upgrade_records": "upgradeRecords"} + attribute_map = { + 'upgrade_records': 'upgradeRecords' + } - def __init__(self, upgrade_records=None, _configuration=None): # noqa: E501 - """UpgradeRecordList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, upgrade_records=None, local_vars_configuration=None): # noqa: E501 + """UpgradeRecordList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._upgrade_records = None self.discriminator = None @@ -64,37 +72,40 @@ def upgrade_records(self, upgrade_records): :param upgrade_records: The upgrade_records of this UpgradeRecordList. # noqa: E501 - :type: list[UpgradeRecord] + :type upgrade_records: list[UpgradeRecord] """ self._upgrade_records = upgrade_records - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeRecordList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_request.py b/src/clients/ctm_api_client/models/upgrade_request.py index 5e37577..e200670 100644 --- a/src/clients/ctm_api_client/models/upgrade_request.py +++ b/src/clients/ctm_api_client/models/upgrade_request.py @@ -5,71 +5,70 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "ctm": "str", - "agent": "str", - "type": "str", - "version": "str", - "activity_name": "str", - "install_user": "str", - "notify_address": "str", - "description": "str", + openapi_types = { + 'ctm': 'str', + 'agent': 'str', + 'type': 'str', + 'version': 'str', + 'activity_name': 'str', + 'install_user': 'str', + 'notify_address': 'str', + 'description': 'str', + 'use_network_deployment': 'bool', + 'transfer_only': 'bool', + 'java_home': 'str' } attribute_map = { - "ctm": "ctm", - "agent": "agent", - "type": "type", - "version": "version", - "activity_name": "activityName", - "install_user": "installUser", - "notify_address": "notifyAddress", - "description": "description", + 'ctm': 'ctm', + 'agent': 'agent', + 'type': 'type', + 'version': 'version', + 'activity_name': 'activityName', + 'install_user': 'installUser', + 'notify_address': 'notifyAddress', + 'description': 'description', + 'use_network_deployment': 'useNetworkDeployment', + 'transfer_only': 'transferOnly', + 'java_home': 'javaHome' } - def __init__( - self, - ctm=None, - agent=None, - type=None, - version=None, - activity_name=None, - install_user=None, - notify_address=None, - description=None, - _configuration=None, - ): # noqa: E501 - """UpgradeRequest - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, ctm=None, agent=None, type=None, version=None, activity_name=None, install_user=None, notify_address=None, description=None, use_network_deployment=None, transfer_only=None, java_home=None, local_vars_configuration=None): # noqa: E501 + """UpgradeRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._ctm = None self._agent = None @@ -79,6 +78,9 @@ def __init__( self._install_user = None self._notify_address = None self._description = None + self._use_network_deployment = None + self._transfer_only = None + self._java_home = None self.discriminator = None if ctm is not None: @@ -97,6 +99,12 @@ def __init__( self.notify_address = notify_address if description is not None: self.description = description + if use_network_deployment is not None: + self.use_network_deployment = use_network_deployment + if transfer_only is not None: + self.transfer_only = transfer_only + if java_home is not None: + self.java_home = java_home @property def ctm(self): @@ -116,7 +124,7 @@ def ctm(self, ctm): Control-M name. REQUIRED # noqa: E501 :param ctm: The ctm of this UpgradeRequest. # noqa: E501 - :type: str + :type ctm: str """ self._ctm = ctm @@ -139,7 +147,7 @@ def agent(self, agent): Agent name. REQUIRED # noqa: E501 :param agent: The agent of this UpgradeRequest. # noqa: E501 - :type: str + :type agent: str """ self._agent = agent @@ -162,7 +170,7 @@ def type(self, type): Product type (Agent, MFT, AppPack). REQUIRED # noqa: E501 :param type: The type of this UpgradeRequest. # noqa: E501 - :type: str + :type type: str """ self._type = type @@ -185,7 +193,7 @@ def version(self, version): Target version to be installed or version that should be rollback REQUIRED # noqa: E501 :param version: The version of this UpgradeRequest. # noqa: E501 - :type: str + :type version: str """ self._version = version @@ -208,7 +216,7 @@ def activity_name(self, activity_name): Name of activity # noqa: E501 :param activity_name: The activity_name of this UpgradeRequest. # noqa: E501 - :type: str + :type activity_name: str """ self._activity_name = activity_name @@ -231,7 +239,7 @@ def install_user(self, install_user): User that will install, upgrade or uninstall HIDDEN # noqa: E501 :param install_user: The install_user of this UpgradeRequest. # noqa: E501 - :type: str + :type install_user: str """ self._install_user = install_user @@ -254,7 +262,7 @@ def notify_address(self, notify_address): List of email addresses separated by semicolon HIDDEN # noqa: E501 :param notify_address: The notify_address of this UpgradeRequest. # noqa: E501 - :type: str + :type notify_address: str """ self._notify_address = notify_address @@ -277,37 +285,109 @@ def description(self, description): Description of activity HIDDEN # noqa: E501 :param description: The description of this UpgradeRequest. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + @property + def use_network_deployment(self): + """Gets the use_network_deployment of this UpgradeRequest. # noqa: E501 + + Whether to deploy from a network location HIDDEN # noqa: E501 + + :return: The use_network_deployment of this UpgradeRequest. # noqa: E501 + :rtype: bool + """ + return self._use_network_deployment + + @use_network_deployment.setter + def use_network_deployment(self, use_network_deployment): + """Sets the use_network_deployment of this UpgradeRequest. + + Whether to deploy from a network location HIDDEN # noqa: E501 + + :param use_network_deployment: The use_network_deployment of this UpgradeRequest. # noqa: E501 + :type use_network_deployment: bool + """ + + self._use_network_deployment = use_network_deployment + + @property + def transfer_only(self): + """Gets the transfer_only of this UpgradeRequest. # noqa: E501 + + True means perform only transfer. Install as well as transfer otherwise HIDDEN # noqa: E501 + + :return: The transfer_only of this UpgradeRequest. # noqa: E501 + :rtype: bool + """ + return self._transfer_only + + @transfer_only.setter + def transfer_only(self, transfer_only): + """Sets the transfer_only of this UpgradeRequest. + + True means perform only transfer. Install as well as transfer otherwise HIDDEN # noqa: E501 + + :param transfer_only: The transfer_only of this UpgradeRequest. # noqa: E501 + :type transfer_only: bool + """ + + self._transfer_only = transfer_only + + @property + def java_home(self): + """Gets the java_home of this UpgradeRequest. # noqa: E501 + + The JRE location. If specified - will be used by the upgrade process and the upgraded Agent/Managed File Transfer/AppPack HIDDEN # noqa: E501 + + :return: The java_home of this UpgradeRequest. # noqa: E501 + :rtype: str + """ + return self._java_home + + @java_home.setter + def java_home(self, java_home): + """Sets the java_home of this UpgradeRequest. + + The JRE location. If specified - will be used by the upgrade process and the upgraded Agent/Managed File Transfer/AppPack HIDDEN # noqa: E501 + + :param java_home: The java_home of this UpgradeRequest. # noqa: E501 + :type java_home: str + """ + + self._java_home = java_home + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeRequest, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/upgrade_response.py b/src/clients/ctm_api_client/models/upgrade_response.py index 6076500..68d1723 100644 --- a/src/clients/ctm_api_client/models/upgrade_response.py +++ b/src/clients/ctm_api_client/models/upgrade_response.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UpgradeResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"upgrade_id": "str"} + openapi_types = { + 'upgrade_id': 'str' + } - attribute_map = {"upgrade_id": "upgradeId"} + attribute_map = { + 'upgrade_id': 'upgradeId' + } - def __init__(self, upgrade_id=None, _configuration=None): # noqa: E501 - """UpgradeResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, upgrade_id=None, local_vars_configuration=None): # noqa: E501 + """UpgradeResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._upgrade_id = None self.discriminator = None @@ -66,37 +74,40 @@ def upgrade_id(self, upgrade_id): ID of upgrade activity # noqa: E501 :param upgrade_id: The upgrade_id of this UpgradeResponse. # noqa: E501 - :type: str + :type upgrade_id: str """ self._upgrade_id = upgrade_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UpgradeResponse, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_additional_properties.py b/src/clients/ctm_api_client/models/user_additional_properties.py index 22e1bc5..c33a05b 100644 --- a/src/clients/ctm_api_client/models/user_additional_properties.py +++ b/src/clients/ctm_api_client/models/user_additional_properties.py @@ -5,56 +5,54 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserAdditionalProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "member_of_groups": "list[str]", - "authentication": "AuthenticationData", - "is_external_user": "bool", + openapi_types = { + 'member_of_groups': 'list[str]', + 'authentication': 'AuthenticationData', + 'is_external_user': 'bool' } attribute_map = { - "member_of_groups": "memberOfGroups", - "authentication": "authentication", - "is_external_user": "isExternalUser", + 'member_of_groups': 'memberOfGroups', + 'authentication': 'authentication', + 'is_external_user': 'isExternalUser' } - def __init__( - self, - member_of_groups=None, - authentication=None, - is_external_user=None, - _configuration=None, - ): # noqa: E501 - """UserAdditionalProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, member_of_groups=None, authentication=None, is_external_user=None, local_vars_configuration=None): # noqa: E501 + """UserAdditionalProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._member_of_groups = None self._authentication = None @@ -86,7 +84,7 @@ def member_of_groups(self, member_of_groups): List of role names # noqa: E501 :param member_of_groups: The member_of_groups of this UserAdditionalProperties. # noqa: E501 - :type: list[str] + :type member_of_groups: list[str] """ self._member_of_groups = member_of_groups @@ -95,7 +93,6 @@ def member_of_groups(self, member_of_groups): def authentication(self): """Gets the authentication of this UserAdditionalProperties. # noqa: E501 - user authentication # noqa: E501 :return: The authentication of this UserAdditionalProperties. # noqa: E501 :rtype: AuthenticationData @@ -106,10 +103,9 @@ def authentication(self): def authentication(self, authentication): """Sets the authentication of this UserAdditionalProperties. - user authentication # noqa: E501 :param authentication: The authentication of this UserAdditionalProperties. # noqa: E501 - :type: AuthenticationData + :type authentication: AuthenticationData """ self._authentication = authentication @@ -130,37 +126,40 @@ def is_external_user(self, is_external_user): :param is_external_user: The is_external_user of this UserAdditionalProperties. # noqa: E501 - :type: bool + :type is_external_user: bool """ self._is_external_user = is_external_user - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserAdditionalProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_allowed_folders_properties.py b/src/clients/ctm_api_client/models/user_allowed_folders_properties.py index 9ccc325..ddae9c9 100644 --- a/src/clients/ctm_api_client/models/user_allowed_folders_properties.py +++ b/src/clients/ctm_api_client/models/user_allowed_folders_properties.py @@ -5,104 +5,88 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserAllowedFoldersProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "allowed_folders_names": "list[str]", - "as2_certificate_alias": "str", - "as2_id": "str", - "as2_public_key_certificate": "str", - "as2_target_folder": "str", - "company": "str", - "description": "str", - "email": "str", - "full_name": "str", - "hashed_password": "str", - "is_ldap_auth": "int", - "name": "str", - "phone_number": "str", - "ssh_public_key": "str", - "is_locked": "bool", - "lock_reason": "str", - "change_password_at_next_login": "bool", - "password_never_expires": "bool", - "last_successful_login_time": "str", + openapi_types = { + 'allowed_folders_names': 'list[str]', + 'as2_certificate_alias': 'str', + 'as2_id': 'str', + 'as2_public_key_certificate': 'str', + 'as2_target_folder': 'str', + 'company': 'str', + 'description': 'str', + 'email': 'str', + 'full_name': 'str', + 'hashed_password': 'str', + 'is_ldap_auth': 'int', + 'name': 'str', + 'phone_number': 'str', + 'ssh_public_key': 'str', + 'is_locked': 'bool', + 'lock_reason': 'str', + 'change_password_at_next_login': 'bool', + 'password_never_expires': 'bool', + 'last_successful_login_time': 'str', + 'home_folder': 'str' } attribute_map = { - "allowed_folders_names": "allowedFoldersNames", - "as2_certificate_alias": "as2CertificateAlias", - "as2_id": "as2Id", - "as2_public_key_certificate": "as2PublicKeyCertificate", - "as2_target_folder": "as2TargetFolder", - "company": "company", - "description": "description", - "email": "email", - "full_name": "fullName", - "hashed_password": "hashedPassword", - "is_ldap_auth": "isLdapAuth", - "name": "name", - "phone_number": "phoneNumber", - "ssh_public_key": "sshPublicKey", - "is_locked": "isLocked", - "lock_reason": "lockReason", - "change_password_at_next_login": "changePasswordAtNextLogin", - "password_never_expires": "passwordNeverExpires", - "last_successful_login_time": "lastSuccessfulLoginTime", + 'allowed_folders_names': 'allowedFoldersNames', + 'as2_certificate_alias': 'as2CertificateAlias', + 'as2_id': 'as2Id', + 'as2_public_key_certificate': 'as2PublicKeyCertificate', + 'as2_target_folder': 'as2TargetFolder', + 'company': 'company', + 'description': 'description', + 'email': 'email', + 'full_name': 'fullName', + 'hashed_password': 'hashedPassword', + 'is_ldap_auth': 'isLdapAuth', + 'name': 'name', + 'phone_number': 'phoneNumber', + 'ssh_public_key': 'sshPublicKey', + 'is_locked': 'isLocked', + 'lock_reason': 'lockReason', + 'change_password_at_next_login': 'changePasswordAtNextLogin', + 'password_never_expires': 'passwordNeverExpires', + 'last_successful_login_time': 'lastSuccessfulLoginTime', + 'home_folder': 'homeFolder' } - def __init__( - self, - allowed_folders_names=None, - as2_certificate_alias=None, - as2_id=None, - as2_public_key_certificate=None, - as2_target_folder=None, - company=None, - description=None, - email=None, - full_name=None, - hashed_password=None, - is_ldap_auth=None, - name=None, - phone_number=None, - ssh_public_key=None, - is_locked=None, - lock_reason=None, - change_password_at_next_login=None, - password_never_expires=None, - last_successful_login_time=None, - _configuration=None, - ): # noqa: E501 - """UserAllowedFoldersProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, allowed_folders_names=None, as2_certificate_alias=None, as2_id=None, as2_public_key_certificate=None, as2_target_folder=None, company=None, description=None, email=None, full_name=None, hashed_password=None, is_ldap_auth=None, name=None, phone_number=None, ssh_public_key=None, is_locked=None, lock_reason=None, change_password_at_next_login=None, password_never_expires=None, last_successful_login_time=None, home_folder=None, local_vars_configuration=None): # noqa: E501 + """UserAllowedFoldersProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._allowed_folders_names = None self._as2_certificate_alias = None @@ -123,6 +107,7 @@ def __init__( self._change_password_at_next_login = None self._password_never_expires = None self._last_successful_login_time = None + self._home_folder = None self.discriminator = None if allowed_folders_names is not None: @@ -163,6 +148,8 @@ def __init__( self.password_never_expires = password_never_expires if last_successful_login_time is not None: self.last_successful_login_time = last_successful_login_time + if home_folder is not None: + self.home_folder = home_folder @property def allowed_folders_names(self): @@ -180,7 +167,7 @@ def allowed_folders_names(self, allowed_folders_names): :param allowed_folders_names: The allowed_folders_names of this UserAllowedFoldersProperties. # noqa: E501 - :type: list[str] + :type allowed_folders_names: list[str] """ self._allowed_folders_names = allowed_folders_names @@ -201,7 +188,7 @@ def as2_certificate_alias(self, as2_certificate_alias): :param as2_certificate_alias: The as2_certificate_alias of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type as2_certificate_alias: str """ self._as2_certificate_alias = as2_certificate_alias @@ -222,7 +209,7 @@ def as2_id(self, as2_id): :param as2_id: The as2_id of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type as2_id: str """ self._as2_id = as2_id @@ -243,7 +230,7 @@ def as2_public_key_certificate(self, as2_public_key_certificate): :param as2_public_key_certificate: The as2_public_key_certificate of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type as2_public_key_certificate: str """ self._as2_public_key_certificate = as2_public_key_certificate @@ -264,7 +251,7 @@ def as2_target_folder(self, as2_target_folder): :param as2_target_folder: The as2_target_folder of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type as2_target_folder: str """ self._as2_target_folder = as2_target_folder @@ -285,7 +272,7 @@ def company(self, company): :param company: The company of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type company: str """ self._company = company @@ -306,7 +293,7 @@ def description(self, description): :param description: The description of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -327,7 +314,7 @@ def email(self, email): :param email: The email of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type email: str """ self._email = email @@ -348,7 +335,7 @@ def full_name(self, full_name): :param full_name: The full_name of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type full_name: str """ self._full_name = full_name @@ -369,7 +356,7 @@ def hashed_password(self, hashed_password): :param hashed_password: The hashed_password of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type hashed_password: str """ self._hashed_password = hashed_password @@ -390,7 +377,7 @@ def is_ldap_auth(self, is_ldap_auth): :param is_ldap_auth: The is_ldap_auth of this UserAllowedFoldersProperties. # noqa: E501 - :type: int + :type is_ldap_auth: int """ self._is_ldap_auth = is_ldap_auth @@ -411,7 +398,7 @@ def name(self, name): :param name: The name of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -432,7 +419,7 @@ def phone_number(self, phone_number): :param phone_number: The phone_number of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type phone_number: str """ self._phone_number = phone_number @@ -453,7 +440,7 @@ def ssh_public_key(self, ssh_public_key): :param ssh_public_key: The ssh_public_key of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type ssh_public_key: str """ self._ssh_public_key = ssh_public_key @@ -474,7 +461,7 @@ def is_locked(self, is_locked): :param is_locked: The is_locked of this UserAllowedFoldersProperties. # noqa: E501 - :type: bool + :type is_locked: bool """ self._is_locked = is_locked @@ -495,7 +482,7 @@ def lock_reason(self, lock_reason): :param lock_reason: The lock_reason of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type lock_reason: str """ self._lock_reason = lock_reason @@ -516,7 +503,7 @@ def change_password_at_next_login(self, change_password_at_next_login): :param change_password_at_next_login: The change_password_at_next_login of this UserAllowedFoldersProperties. # noqa: E501 - :type: bool + :type change_password_at_next_login: bool """ self._change_password_at_next_login = change_password_at_next_login @@ -537,7 +524,7 @@ def password_never_expires(self, password_never_expires): :param password_never_expires: The password_never_expires of this UserAllowedFoldersProperties. # noqa: E501 - :type: bool + :type password_never_expires: bool """ self._password_never_expires = password_never_expires @@ -558,37 +545,61 @@ def last_successful_login_time(self, last_successful_login_time): :param last_successful_login_time: The last_successful_login_time of this UserAllowedFoldersProperties. # noqa: E501 - :type: str + :type last_successful_login_time: str """ self._last_successful_login_time = last_successful_login_time - def to_dict(self): + @property + def home_folder(self): + """Gets the home_folder of this UserAllowedFoldersProperties. # noqa: E501 + + + :return: The home_folder of this UserAllowedFoldersProperties. # noqa: E501 + :rtype: str + """ + return self._home_folder + + @home_folder.setter + def home_folder(self, home_folder): + """Sets the home_folder of this UserAllowedFoldersProperties. + + + :param home_folder: The home_folder of this UserAllowedFoldersProperties. # noqa: E501 + :type home_folder: str + """ + + self._home_folder = home_folder + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserAllowedFoldersProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_data.py b/src/clients/ctm_api_client/models/user_data.py index 1b031a3..9a6e6e8 100644 --- a/src/clients/ctm_api_client/models/user_data.py +++ b/src/clients/ctm_api_client/models/user_data.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "description": "str", - "full_name": "str", - "authentication": "AuthenticationData", - "roles": "list[str]", - "authorization": "RoleData", + openapi_types = { + 'name': 'str', + 'description': 'str', + 'full_name': 'str', + 'authentication': 'AuthenticationData', + 'roles': 'list[str]', + 'authorization': 'RoleData' } attribute_map = { - "name": "Name", - "description": "Description", - "full_name": "FullName", - "authentication": "Authentication", - "roles": "Roles", - "authorization": "Authorization", + 'name': 'Name', + 'description': 'Description', + 'full_name': 'FullName', + 'authentication': 'Authentication', + 'roles': 'Roles', + 'authorization': 'Authorization' } - def __init__( - self, - name=None, - description=None, - full_name=None, - authentication=None, - roles=None, - authorization=None, - _configuration=None, - ): # noqa: E501 - """UserData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, description=None, full_name=None, authentication=None, roles=None, authorization=None, local_vars_configuration=None): # noqa: E501 + """UserData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._description = None @@ -104,7 +99,7 @@ def name(self, name): user name # noqa: E501 :param name: The name of this UserData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -127,7 +122,7 @@ def description(self, description): user description # noqa: E501 :param description: The description of this UserData. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -150,7 +145,7 @@ def full_name(self, full_name): full user name # noqa: E501 :param full_name: The full_name of this UserData. # noqa: E501 - :type: str + :type full_name: str """ self._full_name = full_name @@ -159,7 +154,6 @@ def full_name(self, full_name): def authentication(self): """Gets the authentication of this UserData. # noqa: E501 - user authentication # noqa: E501 :return: The authentication of this UserData. # noqa: E501 :rtype: AuthenticationData @@ -170,10 +164,9 @@ def authentication(self): def authentication(self, authentication): """Sets the authentication of this UserData. - user authentication # noqa: E501 :param authentication: The authentication of this UserData. # noqa: E501 - :type: AuthenticationData + :type authentication: AuthenticationData """ self._authentication = authentication @@ -194,7 +187,7 @@ def roles(self, roles): :param roles: The roles of this UserData. # noqa: E501 - :type: list[str] + :type roles: list[str] """ self._roles = roles @@ -215,37 +208,40 @@ def authorization(self, authorization): :param authorization: The authorization of this UserData. # noqa: E501 - :type: RoleData + :type authorization: RoleData """ self._authorization = authorization - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_group_details_data.py b/src/clients/ctm_api_client/models/user_group_details_data.py index d511b4b..b64c65b 100644 --- a/src/clients/ctm_api_client/models/user_group_details_data.py +++ b/src/clients/ctm_api_client/models/user_group_details_data.py @@ -5,53 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserGroupDetailsData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"external_users": "list[str]", "ldap_groups": "list[str]"} - - attribute_map = {"external_users": "externalUsers", "ldap_groups": "ldapGroups"} - - def __init__( - self, external_users=None, ldap_groups=None, _configuration=None - ): # noqa: E501 - """UserGroupDetailsData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'external_users': 'list[str]', + 'ldap_groups': 'list[str]', + 'ldap_users': 'list[str]' + } + + attribute_map = { + 'external_users': 'externalUsers', + 'ldap_groups': 'ldapGroups', + 'ldap_users': 'ldapUsers' + } + + def __init__(self, external_users=None, ldap_groups=None, ldap_users=None, local_vars_configuration=None): # noqa: E501 + """UserGroupDetailsData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._external_users = None self._ldap_groups = None + self._ldap_users = None self.discriminator = None if external_users is not None: self.external_users = external_users if ldap_groups is not None: self.ldap_groups = ldap_groups + if ldap_users is not None: + self.ldap_users = ldap_users @property def external_users(self): @@ -71,7 +84,7 @@ def external_users(self, external_users): external users HIDDEN # noqa: E501 :param external_users: The external_users of this UserGroupDetailsData. # noqa: E501 - :type: list[str] + :type external_users: list[str] """ self._external_users = external_users @@ -94,37 +107,63 @@ def ldap_groups(self, ldap_groups): ldap groups HIDDEN # noqa: E501 :param ldap_groups: The ldap_groups of this UserGroupDetailsData. # noqa: E501 - :type: list[str] + :type ldap_groups: list[str] """ self._ldap_groups = ldap_groups - def to_dict(self): + @property + def ldap_users(self): + """Gets the ldap_users of this UserGroupDetailsData. # noqa: E501 + + ldap users HIDDEN # noqa: E501 + + :return: The ldap_users of this UserGroupDetailsData. # noqa: E501 + :rtype: list[str] + """ + return self._ldap_users + + @ldap_users.setter + def ldap_users(self, ldap_users): + """Sets the ldap_users of this UserGroupDetailsData. + + ldap users HIDDEN # noqa: E501 + + :param ldap_users: The ldap_users of this UserGroupDetailsData. # noqa: E501 + :type ldap_users: list[str] + """ + + self._ldap_users = ldap_users + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserGroupDetailsData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_group_properties_data.py b/src/clients/ctm_api_client/models/user_group_properties_data.py index 5dcc0c0..b1652a7 100644 --- a/src/clients/ctm_api_client/models/user_group_properties_data.py +++ b/src/clients/ctm_api_client/models/user_group_properties_data.py @@ -5,56 +5,61 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserGroupPropertiesData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "external_users": "list[str]", - "ldap_groups": "list[str]", + openapi_types = { + 'name': 'str', + 'external_users': 'list[str]', + 'ldap_groups': 'list[str]', + 'ldap_users': 'list[str]' } attribute_map = { - "name": "name", - "external_users": "externalUsers", - "ldap_groups": "ldapGroups", + 'name': 'name', + 'external_users': 'externalUsers', + 'ldap_groups': 'ldapGroups', + 'ldap_users': 'ldapUsers' } - def __init__( - self, name=None, external_users=None, ldap_groups=None, _configuration=None - ): # noqa: E501 - """UserGroupPropertiesData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, external_users=None, ldap_groups=None, ldap_users=None, local_vars_configuration=None): # noqa: E501 + """UserGroupPropertiesData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._external_users = None self._ldap_groups = None + self._ldap_users = None self.discriminator = None if name is not None: @@ -63,6 +68,8 @@ def __init__( self.external_users = external_users if ldap_groups is not None: self.ldap_groups = ldap_groups + if ldap_users is not None: + self.ldap_users = ldap_users @property def name(self): @@ -82,7 +89,7 @@ def name(self, name): user group name REQUIRED # noqa: E501 :param name: The name of this UserGroupPropertiesData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -105,7 +112,7 @@ def external_users(self, external_users): external users HIDDEN # noqa: E501 :param external_users: The external_users of this UserGroupPropertiesData. # noqa: E501 - :type: list[str] + :type external_users: list[str] """ self._external_users = external_users @@ -128,37 +135,63 @@ def ldap_groups(self, ldap_groups): ldap groups HIDDEN # noqa: E501 :param ldap_groups: The ldap_groups of this UserGroupPropertiesData. # noqa: E501 - :type: list[str] + :type ldap_groups: list[str] """ self._ldap_groups = ldap_groups - def to_dict(self): + @property + def ldap_users(self): + """Gets the ldap_users of this UserGroupPropertiesData. # noqa: E501 + + ldap users HIDDEN # noqa: E501 + + :return: The ldap_users of this UserGroupPropertiesData. # noqa: E501 + :rtype: list[str] + """ + return self._ldap_users + + @ldap_users.setter + def ldap_users(self, ldap_users): + """Sets the ldap_users of this UserGroupPropertiesData. + + ldap users HIDDEN # noqa: E501 + + :param ldap_users: The ldap_users of this UserGroupPropertiesData. # noqa: E501 + :type ldap_users: list[str] + """ + + self._ldap_users = ldap_users + + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserGroupPropertiesData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_header.py b/src/clients/ctm_api_client/models/user_header.py index 45595de..afa4822 100644 --- a/src/clients/ctm_api_client/models/user_header.py +++ b/src/clients/ctm_api_client/models/user_header.py @@ -5,68 +5,64 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserHeader(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "full_name": "str", - "description": "str", - "status": "str", - "last_updated": "str", - "created": "str", - "member_of": "list[str]", + openapi_types = { + 'name': 'str', + 'full_name': 'str', + 'description': 'str', + 'status': 'str', + 'last_updated': 'str', + 'created': 'str', + 'account_locked_on_date': 'str', + 'member_of': 'list[str]' } attribute_map = { - "name": "name", - "full_name": "fullName", - "description": "description", - "status": "status", - "last_updated": "lastUpdated", - "created": "created", - "member_of": "memberOf", + 'name': 'name', + 'full_name': 'fullName', + 'description': 'description', + 'status': 'status', + 'last_updated': 'lastUpdated', + 'created': 'created', + 'account_locked_on_date': 'accountLockedOnDate', + 'member_of': 'memberOf' } - def __init__( - self, - name=None, - full_name=None, - description=None, - status=None, - last_updated=None, - created=None, - member_of=None, - _configuration=None, - ): # noqa: E501 - """UserHeader - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, full_name=None, description=None, status=None, last_updated=None, created=None, account_locked_on_date=None, member_of=None, local_vars_configuration=None): # noqa: E501 + """UserHeader - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._full_name = None @@ -74,6 +70,7 @@ def __init__( self._status = None self._last_updated = None self._created = None + self._account_locked_on_date = None self._member_of = None self.discriminator = None @@ -89,6 +86,8 @@ def __init__( self.last_updated = last_updated if created is not None: self.created = created + if account_locked_on_date is not None: + self.account_locked_on_date = account_locked_on_date if member_of is not None: self.member_of = member_of @@ -110,7 +109,7 @@ def name(self, name): user name # noqa: E501 :param name: The name of this UserHeader. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -133,7 +132,7 @@ def full_name(self, full_name): full user name # noqa: E501 :param full_name: The full_name of this UserHeader. # noqa: E501 - :type: str + :type full_name: str """ self._full_name = full_name @@ -156,7 +155,7 @@ def description(self, description): user description # noqa: E501 :param description: The description of this UserHeader. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -179,7 +178,7 @@ def status(self, status): user status (output only) # noqa: E501 :param status: The status of this UserHeader. # noqa: E501 - :type: str + :type status: str """ self._status = status @@ -202,7 +201,7 @@ def last_updated(self, last_updated): updated date (output only) # noqa: E501 :param last_updated: The last_updated of this UserHeader. # noqa: E501 - :type: str + :type last_updated: str """ self._last_updated = last_updated @@ -225,11 +224,34 @@ def created(self, created): create date (output only) # noqa: E501 :param created: The created of this UserHeader. # noqa: E501 - :type: str + :type created: str """ self._created = created + @property + def account_locked_on_date(self): + """Gets the account_locked_on_date of this UserHeader. # noqa: E501 + + account locked on date (output only) # noqa: E501 + + :return: The account_locked_on_date of this UserHeader. # noqa: E501 + :rtype: str + """ + return self._account_locked_on_date + + @account_locked_on_date.setter + def account_locked_on_date(self, account_locked_on_date): + """Sets the account_locked_on_date of this UserHeader. + + account locked on date (output only) # noqa: E501 + + :param account_locked_on_date: The account_locked_on_date of this UserHeader. # noqa: E501 + :type account_locked_on_date: str + """ + + self._account_locked_on_date = account_locked_on_date + @property def member_of(self): """Gets the member_of of this UserHeader. # noqa: E501 @@ -248,37 +270,40 @@ def member_of(self, member_of): list of groups user belongs to # noqa: E501 :param member_of: The member_of of this UserHeader. # noqa: E501 - :type: list[str] + :type member_of: list[str] """ self._member_of = member_of - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserHeader, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_password.py b/src/clients/ctm_api_client/models/user_password.py index 3ecacae..2df42bb 100644 --- a/src/clients/ctm_api_client/models/user_password.py +++ b/src/clients/ctm_api_client/models/user_password.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserPassword(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"new_password": "str"} + openapi_types = { + 'new_password': 'str' + } - attribute_map = {"new_password": "newPassword"} + attribute_map = { + 'new_password': 'newPassword' + } - def __init__(self, new_password=None, _configuration=None): # noqa: E501 - """UserPassword - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, new_password=None, local_vars_configuration=None): # noqa: E501 + """UserPassword - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._new_password = None self.discriminator = None @@ -66,37 +74,40 @@ def new_password(self, new_password): new user password # noqa: E501 :param new_password: The new_password of this UserPassword. # noqa: E501 - :type: str + :type new_password: str """ self._new_password = new_password - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserPassword, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/user_preferences.py b/src/clients/ctm_api_client/models/user_preferences.py index 3095d6f..93b15e7 100644 --- a/src/clients/ctm_api_client/models/user_preferences.py +++ b/src/clients/ctm_api_client/models/user_preferences.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class UserPreferences(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"user_preferences": "list[CTMNameValueSW]"} + openapi_types = { + 'user_preferences': 'list[CTMNameValueSW]' + } - attribute_map = {"user_preferences": "userPreferences"} + attribute_map = { + 'user_preferences': 'userPreferences' + } - def __init__(self, user_preferences=None, _configuration=None): # noqa: E501 - """UserPreferences - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, user_preferences=None, local_vars_configuration=None): # noqa: E501 + """UserPreferences - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._user_preferences = None self.discriminator = None @@ -52,6 +60,7 @@ def __init__(self, user_preferences=None, _configuration=None): # noqa: E501 def user_preferences(self): """Gets the user_preferences of this UserPreferences. # noqa: E501 + The user preferences HIDDEN # noqa: E501 :return: The user_preferences of this UserPreferences. # noqa: E501 :rtype: list[CTMNameValueSW] @@ -62,39 +71,43 @@ def user_preferences(self): def user_preferences(self, user_preferences): """Sets the user_preferences of this UserPreferences. + The user preferences HIDDEN # noqa: E501 :param user_preferences: The user_preferences of this UserPreferences. # noqa: E501 - :type: list[CTMNameValueSW] + :type user_preferences: list[CTMNameValueSW] """ self._user_preferences = user_preferences - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(UserPreferences, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/validation_properties.py b/src/clients/ctm_api_client/models/validation_properties.py index 65bb1c9..9a04e21 100644 --- a/src/clients/ctm_api_client/models/validation_properties.py +++ b/src/clients/ctm_api_client/models/validation_properties.py @@ -5,74 +5,66 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ValidationProperties(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "max": "int", - "min": "int", - "regex_pattern": "str", - "regex_pattern_java": "str", - "regex_pattern_java_script": "str", - "regex_pattern_no_match_message": "str", - "regex_pattern_no_match_message_id": "str", - "required": "bool", - "required_if": "ConditionProperties", + openapi_types = { + 'max': 'int', + 'min': 'int', + 'regex_pattern': 'str', + 'regex_pattern_java': 'str', + 'regex_pattern_java_script': 'str', + 'regex_pattern_no_match_message': 'str', + 'regex_pattern_no_match_message_id': 'str', + 'required': 'bool', + 'required_if': 'ConditionProperties' } attribute_map = { - "max": "max", - "min": "min", - "regex_pattern": "regexPattern", - "regex_pattern_java": "regexPatternJava", - "regex_pattern_java_script": "regexPatternJavaScript", - "regex_pattern_no_match_message": "regexPatternNoMatchMessage", - "regex_pattern_no_match_message_id": "regexPatternNoMatchMessageID", - "required": "required", - "required_if": "requiredIf", + 'max': 'max', + 'min': 'min', + 'regex_pattern': 'regexPattern', + 'regex_pattern_java': 'regexPatternJava', + 'regex_pattern_java_script': 'regexPatternJavaScript', + 'regex_pattern_no_match_message': 'regexPatternNoMatchMessage', + 'regex_pattern_no_match_message_id': 'regexPatternNoMatchMessageID', + 'required': 'required', + 'required_if': 'requiredIf' } - def __init__( - self, - max=None, - min=None, - regex_pattern=None, - regex_pattern_java=None, - regex_pattern_java_script=None, - regex_pattern_no_match_message=None, - regex_pattern_no_match_message_id=None, - required=None, - required_if=None, - _configuration=None, - ): # noqa: E501 - """ValidationProperties - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, max=None, min=None, regex_pattern=None, regex_pattern_java=None, regex_pattern_java_script=None, regex_pattern_no_match_message=None, regex_pattern_no_match_message_id=None, required=None, required_if=None, local_vars_configuration=None): # noqa: E501 + """ValidationProperties - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._max = None self._min = None @@ -120,7 +112,7 @@ def max(self, max): :param max: The max of this ValidationProperties. # noqa: E501 - :type: int + :type max: int """ self._max = max @@ -141,7 +133,7 @@ def min(self, min): :param min: The min of this ValidationProperties. # noqa: E501 - :type: int + :type min: int """ self._min = min @@ -162,7 +154,7 @@ def regex_pattern(self, regex_pattern): :param regex_pattern: The regex_pattern of this ValidationProperties. # noqa: E501 - :type: str + :type regex_pattern: str """ self._regex_pattern = regex_pattern @@ -183,7 +175,7 @@ def regex_pattern_java(self, regex_pattern_java): :param regex_pattern_java: The regex_pattern_java of this ValidationProperties. # noqa: E501 - :type: str + :type regex_pattern_java: str """ self._regex_pattern_java = regex_pattern_java @@ -204,7 +196,7 @@ def regex_pattern_java_script(self, regex_pattern_java_script): :param regex_pattern_java_script: The regex_pattern_java_script of this ValidationProperties. # noqa: E501 - :type: str + :type regex_pattern_java_script: str """ self._regex_pattern_java_script = regex_pattern_java_script @@ -225,7 +217,7 @@ def regex_pattern_no_match_message(self, regex_pattern_no_match_message): :param regex_pattern_no_match_message: The regex_pattern_no_match_message of this ValidationProperties. # noqa: E501 - :type: str + :type regex_pattern_no_match_message: str """ self._regex_pattern_no_match_message = regex_pattern_no_match_message @@ -246,7 +238,7 @@ def regex_pattern_no_match_message_id(self, regex_pattern_no_match_message_id): :param regex_pattern_no_match_message_id: The regex_pattern_no_match_message_id of this ValidationProperties. # noqa: E501 - :type: str + :type regex_pattern_no_match_message_id: str """ self._regex_pattern_no_match_message_id = regex_pattern_no_match_message_id @@ -267,7 +259,7 @@ def required(self, required): :param required: The required of this ValidationProperties. # noqa: E501 - :type: bool + :type required: bool """ self._required = required @@ -288,37 +280,40 @@ def required_if(self, required_if): :param required_if: The required_if of this ValidationProperties. # noqa: E501 - :type: ConditionProperties + :type required_if: ConditionProperties """ self._required_if = required_if - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ValidationProperties, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/value.py b/src/clients/ctm_api_client/models/value.py index 1fb59fc..23c3582 100644 --- a/src/clients/ctm_api_client/models/value.py +++ b/src/clients/ctm_api_client/models/value.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Value(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"value": "str"} + openapi_types = { + 'value': 'str' + } - attribute_map = {"value": "value"} + attribute_map = { + 'value': 'value' + } - def __init__(self, value=None, _configuration=None): # noqa: E501 - """Value - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """Value - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._value = None self.discriminator = None @@ -65,41 +73,42 @@ def value(self, value): The parameter value # noqa: E501 :param value: The value of this Value. # noqa: E501 - :type: str + :type value: str """ - if self._configuration.client_side_validation and value is None: - raise ValueError( - "Invalid value for `value`, must not be `None`" - ) # noqa: E501 + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 self._value = value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Value, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/values.py b/src/clients/ctm_api_client/models/values.py deleted file mode 100644 index 07add8a..0000000 --- a/src/clients/ctm_api_client/models/values.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Control-M Services - - Provides access to BMC Control-M Services # noqa: E501 - - OpenAPI spec version: 9.20.215 - Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from clients.ctm_api_client.configuration import Configuration - - -class Values(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - - def __init__(self, _configuration=None): # noqa: E501 - """Values - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Values, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Values): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Values): - return True - - return self.to_dict() != other.to_dict() diff --git a/src/clients/ctm_api_client/models/variable_name_value.py b/src/clients/ctm_api_client/models/variable_name_value.py index d21cf4c..ab0379e 100644 --- a/src/clients/ctm_api_client/models/variable_name_value.py +++ b/src/clients/ctm_api_client/models/variable_name_value.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class VariableNameValue(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"variable_name": "str", "variable_value": "str"} + openapi_types = { + 'variable_name': 'str', + 'variable_value': 'str' + } attribute_map = { - "variable_name": "variable_name", - "variable_value": "variable_value", + 'variable_name': 'variable_name', + 'variable_value': 'variable_value' } - def __init__( - self, variable_name=None, variable_value=None, _configuration=None - ): # noqa: E501 - """VariableNameValue - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, variable_name=None, variable_value=None, local_vars_configuration=None): # noqa: E501 + """VariableNameValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._variable_name = None self._variable_value = None @@ -72,7 +77,7 @@ def variable_name(self, variable_name): :param variable_name: The variable_name of this VariableNameValue. # noqa: E501 - :type: str + :type variable_name: str """ self._variable_name = variable_name @@ -93,37 +98,40 @@ def variable_value(self, variable_value): :param variable_value: The variable_value of this VariableNameValue. # noqa: E501 - :type: str + :type variable_value: str """ self._variable_value = variable_value - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(VariableNameValue, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/variable_names.py b/src/clients/ctm_api_client/models/variable_names.py index bc9f8a7..0a6e652 100644 --- a/src/clients/ctm_api_client/models/variable_names.py +++ b/src/clients/ctm_api_client/models/variable_names.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class VariableNames(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"variables": "list[str]"} + openapi_types = { + 'variables': 'list[str]' + } - attribute_map = {"variables": "variables"} + attribute_map = { + 'variables': 'variables' + } - def __init__(self, variables=None, _configuration=None): # noqa: E501 - """VariableNames - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, variables=None, local_vars_configuration=None): # noqa: E501 + """VariableNames - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._variables = None self.discriminator = None @@ -66,37 +74,40 @@ def variables(self, variables): Array of pool variables in format %%\\\\PoolName\\AUTOVarInPool. HIDDEN. # noqa: E501 :param variables: The variables of this VariableNames. # noqa: E501 - :type: list[str] + :type variables: list[str] """ self._variables = variables - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(VariableNames, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/variables.py b/src/clients/ctm_api_client/models/variables.py index 7527dc3..9754b45 100644 --- a/src/clients/ctm_api_client/models/variables.py +++ b/src/clients/ctm_api_client/models/variables.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class Variables(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"variables": "list[dict(str, str)]"} + openapi_types = { + 'variables': 'list[dict(str, str)]' + } - attribute_map = {"variables": "variables"} + attribute_map = { + 'variables': 'variables' + } - def __init__(self, variables=None, _configuration=None): # noqa: E501 - """Variables - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, variables=None, local_vars_configuration=None): # noqa: E501 + """Variables - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._variables = None self.discriminator = None @@ -66,37 +74,40 @@ def variables(self, variables): Key value map where key is pool variables in format %%\\\\PoolName\\AUTOVarInPool. HIDDEN. # noqa: E501 :param variables: The variables of this Variables. # noqa: E501 - :type: list[dict(str, str)] + :type variables: list[dict(str, str)] """ self._variables = variables - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(Variables, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/viewpoint_manager_privilege_category.py b/src/clients/ctm_api_client/models/viewpoint_manager_privilege_category.py index 9b4043c..b93b693 100644 --- a/src/clients/ctm_api_client/models/viewpoint_manager_privilege_category.py +++ b/src/clients/ctm_api_client/models/viewpoint_manager_privilege_category.py @@ -5,59 +5,56 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ViewpointManagerPrivilegeCategory(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "collections": "str", - "hierarchies": "str", - "filters": "str", - "viewpoints": "str", + openapi_types = { + 'collections': 'str', + 'hierarchies': 'str', + 'filters': 'str', + 'viewpoints': 'str' } attribute_map = { - "collections": "Collections", - "hierarchies": "Hierarchies", - "filters": "Filters", - "viewpoints": "Viewpoints", + 'collections': 'Collections', + 'hierarchies': 'Hierarchies', + 'filters': 'Filters', + 'viewpoints': 'Viewpoints' } - def __init__( - self, - collections=None, - hierarchies=None, - filters=None, - viewpoints=None, - _configuration=None, - ): # noqa: E501 - """ViewpointManagerPrivilegeCategory - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, collections=None, hierarchies=None, filters=None, viewpoints=None, local_vars_configuration=None): # noqa: E501 + """ViewpointManagerPrivilegeCategory - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._collections = None self._hierarchies = None @@ -92,7 +89,7 @@ def collections(self, collections): Collections access level (None, Browse, Update, Full) # noqa: E501 :param collections: The collections of this ViewpointManagerPrivilegeCategory. # noqa: E501 - :type: str + :type collections: str """ self._collections = collections @@ -115,7 +112,7 @@ def hierarchies(self, hierarchies): Hierarchies access level (None, Browse, Update, Full) # noqa: E501 :param hierarchies: The hierarchies of this ViewpointManagerPrivilegeCategory. # noqa: E501 - :type: str + :type hierarchies: str """ self._hierarchies = hierarchies @@ -138,7 +135,7 @@ def filters(self, filters): Filters access level (None, Browse, Update, Full) # noqa: E501 :param filters: The filters of this ViewpointManagerPrivilegeCategory. # noqa: E501 - :type: str + :type filters: str """ self._filters = filters @@ -161,37 +158,40 @@ def viewpoints(self, viewpoints): Viewpoints access level (None, Browse, Update, Full) # noqa: E501 :param viewpoints: The viewpoints of this ViewpointManagerPrivilegeCategory. # noqa: E501 - :type: str + :type viewpoints: str """ self._viewpoints = viewpoints - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ViewpointManagerPrivilegeCategory, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/warning_data.py b/src/clients/ctm_api_client/models/warning_data.py index 6a48446..c48b102 100644 --- a/src/clients/ctm_api_client/models/warning_data.py +++ b/src/clients/ctm_api_client/models/warning_data.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WarningData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "message": "str", - "id": "str", - "item": "str", - "file": "str", - "line": "int", - "col": "int", + openapi_types = { + 'message': 'str', + 'id': 'str', + 'item': 'str', + 'file': 'str', + 'line': 'int', + 'col': 'int' } attribute_map = { - "message": "message", - "id": "id", - "item": "item", - "file": "file", - "line": "line", - "col": "col", + 'message': 'message', + 'id': 'id', + 'item': 'item', + 'file': 'file', + 'line': 'line', + 'col': 'col' } - def __init__( - self, - message=None, - id=None, - item=None, - file=None, - line=None, - col=None, - _configuration=None, - ): # noqa: E501 - """WarningData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, message=None, id=None, item=None, file=None, line=None, col=None, local_vars_configuration=None): # noqa: E501 + """WarningData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._message = None self._id = None @@ -104,7 +99,7 @@ def message(self, message): The error message that describes the problem. # noqa: E501 :param message: The message of this WarningData. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -127,7 +122,7 @@ def id(self, id): An internal identifier of the error. # noqa: E501 :param id: The id of this WarningData. # noqa: E501 - :type: str + :type id: str """ self._id = id @@ -150,7 +145,7 @@ def item(self, item): Reference to the item this error is referring to. # noqa: E501 :param item: The item of this WarningData. # noqa: E501 - :type: str + :type item: str """ self._item = item @@ -173,7 +168,7 @@ def file(self, file): The file this error occurred in. # noqa: E501 :param file: The file of this WarningData. # noqa: E501 - :type: str + :type file: str """ self._file = file @@ -196,7 +191,7 @@ def line(self, line): The number of line in the file this error occurred in. # noqa: E501 :param line: The line of this WarningData. # noqa: E501 - :type: int + :type line: int """ self._line = line @@ -219,37 +214,40 @@ def col(self, col): The number of column in the file this error occurred in. # noqa: E501 :param col: The col of this WarningData. # noqa: E501 - :type: int + :type col: int """ self._col = col - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WarningData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/warning_list.py b/src/clients/ctm_api_client/models/warning_list.py index 9e60bd7..11373f5 100644 --- a/src/clients/ctm_api_client/models/warning_list.py +++ b/src/clients/ctm_api_client/models/warning_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WarningList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"errors": "list[WarningData]"} + openapi_types = { + 'errors': 'list[WarningData]' + } - attribute_map = {"errors": "errors"} + attribute_map = { + 'errors': 'errors' + } - def __init__(self, errors=None, _configuration=None): # noqa: E501 - """WarningList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, errors=None, local_vars_configuration=None): # noqa: E501 + """WarningList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._errors = None self.discriminator = None @@ -64,37 +72,40 @@ def errors(self, errors): :param errors: The errors of this WarningList. # noqa: E501 - :type: list[WarningData] + :type errors: list[WarningData] """ self._errors = errors - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WarningList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/warnings_collection.py b/src/clients/ctm_api_client/models/warnings_collection.py index bced082..367fb77 100644 --- a/src/clients/ctm_api_client/models/warnings_collection.py +++ b/src/clients/ctm_api_client/models/warnings_collection.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WarningsCollection(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"warning_list": "list[str]"} + openapi_types = { + 'warning_list': 'list[str]' + } - attribute_map = {"warning_list": "WarningList"} + attribute_map = { + 'warning_list': 'WarningList' + } - def __init__(self, warning_list=None, _configuration=None): # noqa: E501 - """WarningsCollection - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, warning_list=None, local_vars_configuration=None): # noqa: E501 + """WarningsCollection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._warning_list = None self.discriminator = None @@ -64,37 +72,40 @@ def warning_list(self, warning_list): :param warning_list: The warning_list of this WarningsCollection. # noqa: E501 - :type: list[str] + :type warning_list: list[str] """ self._warning_list = warning_list - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WarningsCollection, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/why_job_parameters.py b/src/clients/ctm_api_client/models/why_job_parameters.py index 10cd22b..aae3d5f 100644 --- a/src/clients/ctm_api_client/models/why_job_parameters.py +++ b/src/clients/ctm_api_client/models/why_job_parameters.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WhyJobParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"order_id": "str"} + openapi_types = { + 'order_id': 'str' + } - attribute_map = {"order_id": "order_id"} + attribute_map = { + 'order_id': 'order_id' + } - def __init__(self, order_id=None, _configuration=None): # noqa: E501 - """WhyJobParameters - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, order_id=None, local_vars_configuration=None): # noqa: E501 + """WhyJobParameters - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._order_id = None self.discriminator = None @@ -64,37 +72,40 @@ def order_id(self, order_id): :param order_id: The order_id of this WhyJobParameters. # noqa: E501 - :type: str + :type order_id: str """ self._order_id = order_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WhyJobParameters, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/why_job_result_item.py b/src/clients/ctm_api_client/models/why_job_result_item.py index d71807a..f8dc499 100644 --- a/src/clients/ctm_api_client/models/why_job_result_item.py +++ b/src/clients/ctm_api_client/models/why_job_result_item.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WhyJobResultItem(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"line": "str"} + openapi_types = { + 'line': 'str' + } - attribute_map = {"line": "line"} + attribute_map = { + 'line': 'line' + } - def __init__(self, line=None, _configuration=None): # noqa: E501 - """WhyJobResultItem - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, line=None, local_vars_configuration=None): # noqa: E501 + """WhyJobResultItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._line = None self.discriminator = None @@ -64,37 +72,40 @@ def line(self, line): :param line: The line of this WhyJobResultItem. # noqa: E501 - :type: str + :type line: str """ self._line = line - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WhyJobResultItem, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/why_job_results.py b/src/clients/ctm_api_client/models/why_job_results.py index 67d690c..a1d168c 100644 --- a/src/clients/ctm_api_client/models/why_job_results.py +++ b/src/clients/ctm_api_client/models/why_job_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WhyJobResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "completed_status": "ResultsStatus", - "error": "ApiThrowable", - "_from": "int", - "results": "list[WhyJobResultItem]", - "to": "int", + openapi_types = { + 'completed_status': 'ResultsStatus', + 'error': 'ApiThrowable', + '_from': 'int', + 'results': 'list[WhyJobResultItem]', + 'to': 'int' } attribute_map = { - "completed_status": "completed_status", - "error": "error", - "_from": "from", - "results": "results", - "to": "to", + 'completed_status': 'completed_status', + 'error': 'error', + '_from': 'from', + 'results': 'results', + 'to': 'to' } - def __init__( - self, - completed_status=None, - error=None, - _from=None, - results=None, - to=None, - _configuration=None, - ): # noqa: E501 - """WhyJobResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, completed_status=None, error=None, _from=None, results=None, to=None, local_vars_configuration=None): # noqa: E501 + """WhyJobResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._completed_status = None self._error = None @@ -73,12 +69,9 @@ def __init__( self.completed_status = completed_status if error is not None: self.error = error - if _from is not None: - self._from = _from - if results is not None: - self.results = results - if to is not None: - self.to = to + self._from = _from + self.results = results + self.to = to @property def completed_status(self): @@ -96,7 +89,7 @@ def completed_status(self, completed_status): :param completed_status: The completed_status of this WhyJobResults. # noqa: E501 - :type: ResultsStatus + :type completed_status: ResultsStatus """ self._completed_status = completed_status @@ -117,7 +110,7 @@ def error(self, error): :param error: The error of this WhyJobResults. # noqa: E501 - :type: ApiThrowable + :type error: ApiThrowable """ self._error = error @@ -138,7 +131,7 @@ def _from(self, _from): :param _from: The _from of this WhyJobResults. # noqa: E501 - :type: int + :type _from: int """ self.__from = _from @@ -159,7 +152,7 @@ def results(self, results): :param results: The results of this WhyJobResults. # noqa: E501 - :type: list[WhyJobResultItem] + :type results: list[WhyJobResultItem] """ self._results = results @@ -180,37 +173,40 @@ def to(self, to): :param to: The to of this WhyJobResults. # noqa: E501 - :type: int + :type to: int """ self._to = to - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WhyJobResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workflow_insights_status.py b/src/clients/ctm_api_client/models/workflow_insights_status.py index 3ee896c..ee9263c 100644 --- a/src/clients/ctm_api_client/models/workflow_insights_status.py +++ b/src/clients/ctm_api_client/models/workflow_insights_status.py @@ -5,47 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkflowInsightsStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "topology": "list[Topology]", - "system_parameters": "list[SystemParameter]", + openapi_types = { + 'topology': 'list[Topology]', + 'system_parameters': 'list[SystemParameter]' } - attribute_map = {"topology": "topology", "system_parameters": "systemParameters"} + attribute_map = { + 'topology': 'topology', + 'system_parameters': 'systemParameters' + } - def __init__( - self, topology=None, system_parameters=None, _configuration=None - ): # noqa: E501 - """WorkflowInsightsStatus - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, topology=None, system_parameters=None, local_vars_configuration=None): # noqa: E501 + """WorkflowInsightsStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._topology = None self._system_parameters = None @@ -72,7 +77,7 @@ def topology(self, topology): :param topology: The topology of this WorkflowInsightsStatus. # noqa: E501 - :type: list[Topology] + :type topology: list[Topology] """ self._topology = topology @@ -93,37 +98,40 @@ def system_parameters(self, system_parameters): :param system_parameters: The system_parameters of this WorkflowInsightsStatus. # noqa: E501 - :type: list[SystemParameter] + :type system_parameters: list[SystemParameter] """ self._system_parameters = system_parameters - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkflowInsightsStatus, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workload_policies_file_results.py b/src/clients/ctm_api_client/models/workload_policies_file_results.py index 53bdd9f..3dcf3f3 100644 --- a/src/clients/ctm_api_client/models/workload_policies_file_results.py +++ b/src/clients/ctm_api_client/models/workload_policies_file_results.py @@ -5,62 +5,58 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkloadPoliciesFileResults(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "work_load_policies_file": "str", - "success_workpolicies_count": "int", - "is_deploy_descriptor_valid": "bool", - "added_workload_policies": "list[str]", - "errors": "list[str]", + openapi_types = { + 'work_load_policies_file': 'str', + 'success_workpolicies_count': 'int', + 'is_deploy_descriptor_valid': 'bool', + 'added_workload_policies': 'list[str]', + 'errors': 'list[str]' } attribute_map = { - "work_load_policies_file": "workLoadPoliciesFile", - "success_workpolicies_count": "successWorkpoliciesCount", - "is_deploy_descriptor_valid": "isDeployDescriptorValid", - "added_workload_policies": "addedWorkloadPolicies", - "errors": "errors", + 'work_load_policies_file': 'workLoadPoliciesFile', + 'success_workpolicies_count': 'successWorkpoliciesCount', + 'is_deploy_descriptor_valid': 'isDeployDescriptorValid', + 'added_workload_policies': 'addedWorkloadPolicies', + 'errors': 'errors' } - def __init__( - self, - work_load_policies_file=None, - success_workpolicies_count=None, - is_deploy_descriptor_valid=None, - added_workload_policies=None, - errors=None, - _configuration=None, - ): # noqa: E501 - """WorkloadPoliciesFileResults - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, work_load_policies_file=None, success_workpolicies_count=None, is_deploy_descriptor_valid=None, added_workload_policies=None, errors=None, local_vars_configuration=None): # noqa: E501 + """WorkloadPoliciesFileResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._work_load_policies_file = None self._success_workpolicies_count = None @@ -98,7 +94,7 @@ def work_load_policies_file(self, work_load_policies_file): The name of a specific workLoad policies file. # noqa: E501 :param work_load_policies_file: The work_load_policies_file of this WorkloadPoliciesFileResults. # noqa: E501 - :type: str + :type work_load_policies_file: str """ self._work_load_policies_file = work_load_policies_file @@ -121,7 +117,7 @@ def success_workpolicies_count(self, success_workpolicies_count): Determines the number of successfully added workload policies. # noqa: E501 :param success_workpolicies_count: The success_workpolicies_count of this WorkloadPoliciesFileResults. # noqa: E501 - :type: int + :type success_workpolicies_count: int """ self._success_workpolicies_count = success_workpolicies_count @@ -144,7 +140,7 @@ def is_deploy_descriptor_valid(self, is_deploy_descriptor_valid): Determines if the workLoad policies file file is a valid deploy descriptor file. # noqa: E501 :param is_deploy_descriptor_valid: The is_deploy_descriptor_valid of this WorkloadPoliciesFileResults. # noqa: E501 - :type: bool + :type is_deploy_descriptor_valid: bool """ self._is_deploy_descriptor_valid = is_deploy_descriptor_valid @@ -165,7 +161,7 @@ def added_workload_policies(self, added_workload_policies): :param added_workload_policies: The added_workload_policies of this WorkloadPoliciesFileResults. # noqa: E501 - :type: list[str] + :type added_workload_policies: list[str] """ self._added_workload_policies = added_workload_policies @@ -186,37 +182,40 @@ def errors(self, errors): :param errors: The errors of this WorkloadPoliciesFileResults. # noqa: E501 - :type: list[str] + :type errors: list[str] """ self._errors = errors - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkloadPoliciesFileResults, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workload_policy.py b/src/clients/ctm_api_client/models/workload_policy.py index f31d90f..4b006e5 100644 --- a/src/clients/ctm_api_client/models/workload_policy.py +++ b/src/clients/ctm_api_client/models/workload_policy.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkloadPolicy(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "state": "str", - "order_no": "str", - "last_update": "str", - "updated_by": "str", - "description": "str", + openapi_types = { + 'name': 'str', + 'state': 'str', + 'order_no': 'str', + 'last_update': 'str', + 'updated_by': 'str', + 'description': 'str' } attribute_map = { - "name": "name", - "state": "state", - "order_no": "orderNo", - "last_update": "lastUpdate", - "updated_by": "updatedBy", - "description": "description", + 'name': 'name', + 'state': 'state', + 'order_no': 'orderNo', + 'last_update': 'lastUpdate', + 'updated_by': 'updatedBy', + 'description': 'description' } - def __init__( - self, - name=None, - state=None, - order_no=None, - last_update=None, - updated_by=None, - description=None, - _configuration=None, - ): # noqa: E501 - """WorkloadPolicy - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, state=None, order_no=None, last_update=None, updated_by=None, description=None, local_vars_configuration=None): # noqa: E501 + """WorkloadPolicy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._state = None @@ -104,7 +99,7 @@ def name(self, name): unique workload policy name # noqa: E501 :param name: The name of this WorkloadPolicy. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -127,7 +122,7 @@ def state(self, state): workload policy state # noqa: E501 :param state: The state of this WorkloadPolicy. # noqa: E501 - :type: str + :type state: str """ self._state = state @@ -150,7 +145,7 @@ def order_no(self, order_no): workload policy order number # noqa: E501 :param order_no: The order_no of this WorkloadPolicy. # noqa: E501 - :type: str + :type order_no: str """ self._order_no = order_no @@ -173,7 +168,7 @@ def last_update(self, last_update): workload policy update date # noqa: E501 :param last_update: The last_update of this WorkloadPolicy. # noqa: E501 - :type: str + :type last_update: str """ self._last_update = last_update @@ -196,7 +191,7 @@ def updated_by(self, updated_by): user which updated workload policy # noqa: E501 :param updated_by: The updated_by of this WorkloadPolicy. # noqa: E501 - :type: str + :type updated_by: str """ self._updated_by = updated_by @@ -219,37 +214,40 @@ def description(self, description): workload policy description # noqa: E501 :param description: The description of this WorkloadPolicy. # noqa: E501 - :type: str + :type description: str """ self._description = description - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkloadPolicy, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workload_policy_list.py b/src/clients/ctm_api_client/models/workload_policy_list.py index a1eb08e..c100f38 100644 --- a/src/clients/ctm_api_client/models/workload_policy_list.py +++ b/src/clients/ctm_api_client/models/workload_policy_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkloadPolicyList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"workload_policies": "list[WorkloadPolicy]"} + openapi_types = { + 'workload_policies': 'list[WorkloadPolicy]' + } - attribute_map = {"workload_policies": "workloadPolicies"} + attribute_map = { + 'workload_policies': 'workloadPolicies' + } - def __init__(self, workload_policies=None, _configuration=None): # noqa: E501 - """WorkloadPolicyList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, workload_policies=None, local_vars_configuration=None): # noqa: E501 + """WorkloadPolicyList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._workload_policies = None self.discriminator = None @@ -64,37 +72,40 @@ def workload_policies(self, workload_policies): :param workload_policies: The workload_policies of this WorkloadPolicyList. # noqa: E501 - :type: list[WorkloadPolicy] + :type workload_policies: list[WorkloadPolicy] """ self._workload_policies = workload_policies - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkloadPolicyList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workload_policy_state.py b/src/clients/ctm_api_client/models/workload_policy_state.py index e037152..51951df 100644 --- a/src/clients/ctm_api_client/models/workload_policy_state.py +++ b/src/clients/ctm_api_client/models/workload_policy_state.py @@ -5,42 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkloadPolicyState(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"name": "str", "state": "str"} - - attribute_map = {"name": "name", "state": "state"} - - def __init__(self, name=None, state=None, _configuration=None): # noqa: E501 - """WorkloadPolicyState - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'name': 'str', + 'state': 'str' + } + + attribute_map = { + 'name': 'name', + 'state': 'state' + } + + def __init__(self, name=None, state=None, local_vars_configuration=None): # noqa: E501 + """WorkloadPolicyState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._state = None @@ -69,7 +79,7 @@ def name(self, name): unique workload policy name # noqa: E501 :param name: The name of this WorkloadPolicyState. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -92,37 +102,40 @@ def state(self, state): workload policy state # noqa: E501 :param state: The state of this WorkloadPolicyState. # noqa: E501 - :type: str + :type state: str """ self._state = state - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkloadPolicyState, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workload_policy_state_list.py b/src/clients/ctm_api_client/models/workload_policy_state_list.py index 707f0af..5701dff 100644 --- a/src/clients/ctm_api_client/models/workload_policy_state_list.py +++ b/src/clients/ctm_api_client/models/workload_policy_state_list.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkloadPolicyStateList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"workload_policies": "list[WorkloadPolicyState]"} + openapi_types = { + 'workload_policies': 'list[WorkloadPolicyState]' + } - attribute_map = {"workload_policies": "workloadPolicies"} + attribute_map = { + 'workload_policies': 'workloadPolicies' + } - def __init__(self, workload_policies=None, _configuration=None): # noqa: E501 - """WorkloadPolicyStateList - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, workload_policies=None, local_vars_configuration=None): # noqa: E501 + """WorkloadPolicyStateList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._workload_policies = None self.discriminator = None @@ -64,37 +72,40 @@ def workload_policies(self, workload_policies): :param workload_policies: The workload_policies of this WorkloadPolicyStateList. # noqa: E501 - :type: list[WorkloadPolicyState] + :type workload_policies: list[WorkloadPolicyState] """ self._workload_policies = workload_policies - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkloadPolicyStateList, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workspace_folder.py b/src/clients/ctm_api_client/models/workspace_folder.py index 890fb5d..1372987 100644 --- a/src/clients/ctm_api_client/models/workspace_folder.py +++ b/src/clients/ctm_api_client/models/workspace_folder.py @@ -5,44 +5,52 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkspaceFolder(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"folder_data": "str", "jobs_data": "list[str]"} - - attribute_map = {"folder_data": "folderData", "jobs_data": "jobsData"} - - def __init__( - self, folder_data=None, jobs_data=None, _configuration=None - ): # noqa: E501 - """WorkspaceFolder - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + openapi_types = { + 'folder_data': 'str', + 'jobs_data': 'list[str]' + } + + attribute_map = { + 'folder_data': 'folderData', + 'jobs_data': 'jobsData' + } + + def __init__(self, folder_data=None, jobs_data=None, local_vars_configuration=None): # noqa: E501 + """WorkspaceFolder - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._folder_data = None self._jobs_data = None @@ -69,19 +77,11 @@ def folder_data(self, folder_data): :param folder_data: The folder_data of this WorkspaceFolder. # noqa: E501 - :type: str + :type folder_data: str """ - if ( - self._configuration.client_side_validation - and folder_data is not None - and not re.search( - r"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", - folder_data, - ) - ): # noqa: E501 - raise ValueError( - r"Invalid value for `folder_data`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`" - ) # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + folder_data is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', folder_data)): # noqa: E501 + raise ValueError(r"Invalid value for `folder_data`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501 self._folder_data = folder_data @@ -101,37 +101,40 @@ def jobs_data(self, jobs_data): :param jobs_data: The jobs_data of this WorkspaceFolder. # noqa: E501 - :type: list[str] + :type jobs_data: list[str] """ self._jobs_data = jobs_data - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkspaceFolder, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/workspace_folders.py b/src/clients/ctm_api_client/models/workspace_folders.py index 1b1b758..12ea282 100644 --- a/src/clients/ctm_api_client/models/workspace_folders.py +++ b/src/clients/ctm_api_client/models/workspace_folders.py @@ -5,42 +5,50 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class WorkspaceFolders(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {"folders": "list[WorkspaceFolder]"} + openapi_types = { + 'folders': 'list[WorkspaceFolder]' + } - attribute_map = {"folders": "folders"} + attribute_map = { + 'folders': 'folders' + } - def __init__(self, folders=None, _configuration=None): # noqa: E501 - """WorkspaceFolders - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, folders=None, local_vars_configuration=None): # noqa: E501 + """WorkspaceFolders - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._folders = None self.discriminator = None @@ -64,37 +72,40 @@ def folders(self, folders): :param folders: The folders of this WorkspaceFolders. # noqa: E501 - :type: list[WorkspaceFolder] + :type folders: list[WorkspaceFolder] """ self._folders = folders - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(WorkspaceFolders, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/zoo_keeper.py b/src/clients/ctm_api_client/models/zoo_keeper.py index d57a71e..a4e0c73 100644 --- a/src/clients/ctm_api_client/models/zoo_keeper.py +++ b/src/clients/ctm_api_client/models/zoo_keeper.py @@ -5,65 +5,60 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ZooKeeper(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "zookeeper_id": "int", - "zookeeper_server_host": "str", - "zookeeper_admin_server_port": "int", - "zookeeper_client_port": "int", - "zookeeper_leader_port": "int", - "zookeeper_leader_election_port": "int", + openapi_types = { + 'zookeeper_id': 'int', + 'zookeeper_server_host': 'str', + 'zookeeper_admin_server_port': 'int', + 'zookeeper_client_port': 'int', + 'zookeeper_leader_port': 'int', + 'zookeeper_leader_election_port': 'int' } attribute_map = { - "zookeeper_id": "zookeeperId", - "zookeeper_server_host": "zookeeperServerHost", - "zookeeper_admin_server_port": "zookeeperAdminServerPort", - "zookeeper_client_port": "zookeeperClientPort", - "zookeeper_leader_port": "zookeeperLeaderPort", - "zookeeper_leader_election_port": "zookeeperLeaderElectionPort", + 'zookeeper_id': 'zookeeperId', + 'zookeeper_server_host': 'zookeeperServerHost', + 'zookeeper_admin_server_port': 'zookeeperAdminServerPort', + 'zookeeper_client_port': 'zookeeperClientPort', + 'zookeeper_leader_port': 'zookeeperLeaderPort', + 'zookeeper_leader_election_port': 'zookeeperLeaderElectionPort' } - def __init__( - self, - zookeeper_id=None, - zookeeper_server_host=None, - zookeeper_admin_server_port=None, - zookeeper_client_port=None, - zookeeper_leader_port=None, - zookeeper_leader_election_port=None, - _configuration=None, - ): # noqa: E501 - """ZooKeeper - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, zookeeper_id=None, zookeeper_server_host=None, zookeeper_admin_server_port=None, zookeeper_client_port=None, zookeeper_leader_port=None, zookeeper_leader_election_port=None, local_vars_configuration=None): # noqa: E501 + """ZooKeeper - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._zookeeper_id = None self._zookeeper_server_host = None @@ -104,7 +99,7 @@ def zookeeper_id(self, zookeeper_id): zookeeper Id # noqa: E501 :param zookeeper_id: The zookeeper_id of this ZooKeeper. # noqa: E501 - :type: int + :type zookeeper_id: int """ self._zookeeper_id = zookeeper_id @@ -127,7 +122,7 @@ def zookeeper_server_host(self, zookeeper_server_host): zookeeper Server Host # noqa: E501 :param zookeeper_server_host: The zookeeper_server_host of this ZooKeeper. # noqa: E501 - :type: str + :type zookeeper_server_host: str """ self._zookeeper_server_host = zookeeper_server_host @@ -150,7 +145,7 @@ def zookeeper_admin_server_port(self, zookeeper_admin_server_port): zookeeper Admin Server Port # noqa: E501 :param zookeeper_admin_server_port: The zookeeper_admin_server_port of this ZooKeeper. # noqa: E501 - :type: int + :type zookeeper_admin_server_port: int """ self._zookeeper_admin_server_port = zookeeper_admin_server_port @@ -173,7 +168,7 @@ def zookeeper_client_port(self, zookeeper_client_port): zookeeper Client Port # noqa: E501 :param zookeeper_client_port: The zookeeper_client_port of this ZooKeeper. # noqa: E501 - :type: int + :type zookeeper_client_port: int """ self._zookeeper_client_port = zookeeper_client_port @@ -196,7 +191,7 @@ def zookeeper_leader_port(self, zookeeper_leader_port): zookeeper Leader Port # noqa: E501 :param zookeeper_leader_port: The zookeeper_leader_port of this ZooKeeper. # noqa: E501 - :type: int + :type zookeeper_leader_port: int """ self._zookeeper_leader_port = zookeeper_leader_port @@ -219,37 +214,40 @@ def zookeeper_leader_election_port(self, zookeeper_leader_election_port): zookeeper Leader Election Port # noqa: E501 :param zookeeper_leader_election_port: The zookeeper_leader_election_port of this ZooKeeper. # noqa: E501 - :type: int + :type zookeeper_leader_election_port: int """ self._zookeeper_leader_election_port = zookeeper_leader_election_port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ZooKeeper, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/models/zos_template_data.py b/src/clients/ctm_api_client/models/zos_template_data.py index f30ef8f..d992ca1 100644 --- a/src/clients/ctm_api_client/models/zos_template_data.py +++ b/src/clients/ctm_api_client/models/zos_template_data.py @@ -5,98 +5,82 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from clients.ctm_api_client.configuration import Configuration class ZosTemplateData(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = { - "name": "str", - "record_format": "str", - "logical_record_length": "int", - "block_size": "int", - "translation_table": "str", - "transfer_mode": "str", - "sms_managment_class": "str", - "allocation_units": "str", - "volume": "str", - "unit": "str", - "primary_allocation": "int", - "secondary_allocation": "int", - "sms_data_class": "str", - "dbcs_encoding": "str", - "transfer_to_unique_file": "bool", - "additional_options_host1": "str", - "additional_options_host2": "str", + openapi_types = { + 'name': 'str', + 'record_format': 'str', + 'logical_record_length': 'int', + 'block_size': 'int', + 'translation_table': 'str', + 'transfer_mode': 'str', + 'sms_managment_class': 'str', + 'allocation_units': 'str', + 'volume': 'str', + 'unit': 'str', + 'primary_allocation': 'int', + 'secondary_allocation': 'int', + 'sms_data_class': 'str', + 'dbcs_encoding': 'str', + 'transfer_to_unique_file': 'bool', + 'additional_options_host1': 'str', + 'additional_options_host2': 'str' } attribute_map = { - "name": "name", - "record_format": "recordFormat", - "logical_record_length": "logicalRecordLength", - "block_size": "blockSize", - "translation_table": "translationTable", - "transfer_mode": "transferMode", - "sms_managment_class": "smsManagmentClass", - "allocation_units": "allocationUnits", - "volume": "volume", - "unit": "unit", - "primary_allocation": "primaryAllocation", - "secondary_allocation": "secondaryAllocation", - "sms_data_class": "smsDataClass", - "dbcs_encoding": "dbcsEncoding", - "transfer_to_unique_file": "transferToUniqueFile", - "additional_options_host1": "additionalOptionsHost1", - "additional_options_host2": "additionalOptionsHost2", + 'name': 'name', + 'record_format': 'recordFormat', + 'logical_record_length': 'logicalRecordLength', + 'block_size': 'blockSize', + 'translation_table': 'translationTable', + 'transfer_mode': 'transferMode', + 'sms_managment_class': 'smsManagmentClass', + 'allocation_units': 'allocationUnits', + 'volume': 'volume', + 'unit': 'unit', + 'primary_allocation': 'primaryAllocation', + 'secondary_allocation': 'secondaryAllocation', + 'sms_data_class': 'smsDataClass', + 'dbcs_encoding': 'dbcsEncoding', + 'transfer_to_unique_file': 'transferToUniqueFile', + 'additional_options_host1': 'additionalOptionsHost1', + 'additional_options_host2': 'additionalOptionsHost2' } - def __init__( - self, - name=None, - record_format=None, - logical_record_length=None, - block_size=None, - translation_table=None, - transfer_mode=None, - sms_managment_class=None, - allocation_units=None, - volume=None, - unit=None, - primary_allocation=None, - secondary_allocation=None, - sms_data_class=None, - dbcs_encoding=None, - transfer_to_unique_file=None, - additional_options_host1=None, - additional_options_host2=None, - _configuration=None, - ): # noqa: E501 - """ZosTemplateData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration + def __init__(self, name=None, record_format=None, logical_record_length=None, block_size=None, translation_table=None, transfer_mode=None, sms_managment_class=None, allocation_units=None, volume=None, unit=None, primary_allocation=None, secondary_allocation=None, sms_data_class=None, dbcs_encoding=None, transfer_to_unique_file=None, additional_options_host1=None, additional_options_host2=None, local_vars_configuration=None): # noqa: E501 + """ZosTemplateData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration self._name = None self._record_format = None @@ -170,7 +154,7 @@ def name(self, name): Template name HIDDEN # noqa: E501 :param name: The name of this ZosTemplateData. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -193,7 +177,7 @@ def record_format(self, record_format): Record format HIDDEN # noqa: E501 :param record_format: The record_format of this ZosTemplateData. # noqa: E501 - :type: str + :type record_format: str """ self._record_format = record_format @@ -216,7 +200,7 @@ def logical_record_length(self, logical_record_length): Logical record length HIDDEN # noqa: E501 :param logical_record_length: The logical_record_length of this ZosTemplateData. # noqa: E501 - :type: int + :type logical_record_length: int """ self._logical_record_length = logical_record_length @@ -239,7 +223,7 @@ def block_size(self, block_size): Block Size HIDDEN # noqa: E501 :param block_size: The block_size of this ZosTemplateData. # noqa: E501 - :type: int + :type block_size: int """ self._block_size = block_size @@ -262,7 +246,7 @@ def translation_table(self, translation_table): Translation table HIDDEN # noqa: E501 :param translation_table: The translation_table of this ZosTemplateData. # noqa: E501 - :type: str + :type translation_table: str """ self._translation_table = translation_table @@ -285,7 +269,7 @@ def transfer_mode(self, transfer_mode): Transfer mode HIDDEN # noqa: E501 :param transfer_mode: The transfer_mode of this ZosTemplateData. # noqa: E501 - :type: str + :type transfer_mode: str """ self._transfer_mode = transfer_mode @@ -308,7 +292,7 @@ def sms_managment_class(self, sms_managment_class): Management class HIDDEN # noqa: E501 :param sms_managment_class: The sms_managment_class of this ZosTemplateData. # noqa: E501 - :type: str + :type sms_managment_class: str """ self._sms_managment_class = sms_managment_class @@ -331,7 +315,7 @@ def allocation_units(self, allocation_units): Allocation units HIDDEN # noqa: E501 :param allocation_units: The allocation_units of this ZosTemplateData. # noqa: E501 - :type: str + :type allocation_units: str """ self._allocation_units = allocation_units @@ -354,7 +338,7 @@ def volume(self, volume): Volume HIDDEN # noqa: E501 :param volume: The volume of this ZosTemplateData. # noqa: E501 - :type: str + :type volume: str """ self._volume = volume @@ -377,7 +361,7 @@ def unit(self, unit): Unit HIDDEN # noqa: E501 :param unit: The unit of this ZosTemplateData. # noqa: E501 - :type: str + :type unit: str """ self._unit = unit @@ -400,7 +384,7 @@ def primary_allocation(self, primary_allocation): Primary Allocation HIDDEN # noqa: E501 :param primary_allocation: The primary_allocation of this ZosTemplateData. # noqa: E501 - :type: int + :type primary_allocation: int """ self._primary_allocation = primary_allocation @@ -423,7 +407,7 @@ def secondary_allocation(self, secondary_allocation): Secondary allocation HIDDEN # noqa: E501 :param secondary_allocation: The secondary_allocation of this ZosTemplateData. # noqa: E501 - :type: int + :type secondary_allocation: int """ self._secondary_allocation = secondary_allocation @@ -446,7 +430,7 @@ def sms_data_class(self, sms_data_class): Data class HIDDEN # noqa: E501 :param sms_data_class: The sms_data_class of this ZosTemplateData. # noqa: E501 - :type: str + :type sms_data_class: str """ self._sms_data_class = sms_data_class @@ -469,7 +453,7 @@ def dbcs_encoding(self, dbcs_encoding): DBCS name HIDDEN # noqa: E501 :param dbcs_encoding: The dbcs_encoding of this ZosTemplateData. # noqa: E501 - :type: str + :type dbcs_encoding: str """ self._dbcs_encoding = dbcs_encoding @@ -492,7 +476,7 @@ def transfer_to_unique_file(self, transfer_to_unique_file): Transfer to unique file HIDDEN # noqa: E501 :param transfer_to_unique_file: The transfer_to_unique_file of this ZosTemplateData. # noqa: E501 - :type: bool + :type transfer_to_unique_file: bool """ self._transfer_to_unique_file = transfer_to_unique_file @@ -515,7 +499,7 @@ def additional_options_host1(self, additional_options_host1): Additional options host 1 HIDDEN # noqa: E501 :param additional_options_host1: The additional_options_host1 of this ZosTemplateData. # noqa: E501 - :type: str + :type additional_options_host1: str """ self._additional_options_host1 = additional_options_host1 @@ -538,37 +522,40 @@ def additional_options_host2(self, additional_options_host2): Additional options host 1 HIDDEN # noqa: E501 :param additional_options_host2: The additional_options_host2 of this ZosTemplateData. # noqa: E501 - :type: str + :type additional_options_host2: str """ self._additional_options_host2 = additional_options_host2 - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): - result[attr] = list( - map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value) - ) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() + result[attr] = list(map( + lambda x: convert(x), + value + )) elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") - else item, - value.items(), - ) - ) + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) else: - result[attr] = value - if issubclass(ZosTemplateData, dict): - for key, value in self.items(): - result[key] = value + result[attr] = convert(value) return result diff --git a/src/clients/ctm_api_client/rest.py b/src/clients/ctm_api_client/rest.py index 5d01870..627c267 100644 --- a/src/clients/ctm_api_client/rest.py +++ b/src/clients/ctm_api_client/rest.py @@ -5,9 +5,9 @@ Provides access to BMC Control-M Services # noqa: E501 - OpenAPI spec version: 9.20.215 + The version of the OpenAPI document: 9.22.30 Contact: customer_support@bmc.com - Generated by: https://github.com/swagger-api/swagger-codegen.git + Generated by: https://openapi-generator.tech """ @@ -19,22 +19,19 @@ import re import ssl -import certifi - # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode +import urllib3 -try: - import urllib3 -except ImportError: - raise ImportError("Swagger python client requires urllib3.") +from clients.ctm_api_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError logger = logging.getLogger(__name__) class RESTResponse(io.IOBase): + def __init__(self, resp): self.urllib3_response = resp self.status = resp.status @@ -51,6 +48,7 @@ def getheader(self, name, default=None): class RESTClientObject(object): + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -64,18 +62,15 @@ def __init__(self, configuration, pools_size=4, maxsize=None): else: cert_reqs = ssl.CERT_NONE - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args[ - "assert_hostname" - ] = configuration.assert_hostname # noqa: E501 + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if configuration.socket_options is not None: + addition_pool_args['socket_options'] = configuration.socket_options if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -89,10 +84,11 @@ def __init__(self, configuration, pools_size=4, maxsize=None): num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, **addition_pool_args ) else: @@ -100,23 +96,15 @@ def __init__(self, configuration, pools_size=4, maxsize=None): num_pools=pools_size, maxsize=maxsize, cert_reqs=cert_reqs, - ca_certs=ca_certs, + ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, **addition_pool_args ) - def request( - self, - method, - url, - query_params=None, - headers=None, - body=None, - post_params=None, - _preload_content=True, - _request_timeout=None, - ): + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): """Perform requests. :param method: http request method @@ -136,10 +124,11 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] if post_params and body: - raise ValueError( + raise ApiValueError( "body parameter cannot be used with post_params parameter." ) @@ -148,74 +137,62 @@ def request( timeout = None if _request_timeout: - if isinstance( - _request_timeout, (int,) if six.PY3 else (int, long) - ): # noqa: E501,F821 + if isinstance(_request_timeout, six.integer_types + (float, )): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1] - ) + connect=_request_timeout[0], read=_request_timeout[1]) - if "Content-Type" not in headers: - headers["Content-Type"] = "application/json" + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: - url += "?" + urlencode(query_params) - if re.search("json", headers["Content-Type"], re.IGNORECASE): - request_body = "{}" + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, - url, + method, url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) - elif ( - headers["Content-Type"] == "application/x-www-form-urlencoded" - ): # noqa: E501 + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( - method, - url, + method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "multipart/form-data": + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers["Content-Type"] + del headers['Content-Type'] r = self.pool_manager.request( - method, - url, + method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) + headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form - elif isinstance(body, str): + elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( - method, - url, + method, url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -224,14 +201,11 @@ def request( raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request( - method, - url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) @@ -239,177 +213,87 @@ def request( if _preload_content: r = RESTResponse(r) - # In the python 3, the response.data is bytes. - # we need to decode it to string. - if six.PY3: - r.data = r.data.decode("utf8") - # log response body logger.debug("response body: %s", r.data) if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) + if r.status == 401: + raise UnauthorizedException(http_resp=r) - return r + if r.status == 403: + raise ForbiddenException(http_resp=r) - def GET( - self, - url, - headers=None, - query_params=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "GET", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def HEAD( - self, - url, - headers=None, - query_params=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "HEAD", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def OPTIONS( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "OPTIONS", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def DELETE( - self, - url, - headers=None, - query_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "DELETE", - url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def POST( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "POST", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def PUT( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PUT", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def PATCH( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PATCH", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - -class ApiException(Exception): - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + if r.status == 404: + raise NotFoundException(http_resp=r) - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) + if 500 <= r.status <= 599: + raise ServiceException(http_resp=r) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + raise ApiException(http_resp=r) + + return r - return error_message + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/src/ctm_python_client/core/comm.py b/src/ctm_python_client/core/comm.py index 8757e6b..25b55b5 100644 --- a/src/ctm_python_client/core/comm.py +++ b/src/ctm_python_client/core/comm.py @@ -75,15 +75,14 @@ def __init__(self, endpoint: str, credentials: AbstractCredentials) -> None: def authenticate(self): self.apiclient.configuration.host = self.endpoint self.apiclient.configuration.verify_ssl = False - self.apiclient.configuration.api_key_prefix['Authorization'] = 'Bearer' - + self.apiclient.configuration.api_key_prefix['Bearer'] = 'Bearer' token = self.session_api.do_login( { 'username': self.credentials.get_username(), 'password': self.credentials.get_password() } ).token - self.apiclient.configuration.api_key['Authorization'] = token + self.apiclient.configuration.api_key['Bearer'] = token class SaasAAPIClient(AbstractAAPIClient): diff --git a/src/ctm_python_client/core/workflow.py b/src/ctm_python_client/core/workflow.py index 37c28d3..7b4c6ce 100644 --- a/src/ctm_python_client/core/workflow.py +++ b/src/ctm_python_client/core/workflow.py @@ -494,14 +494,14 @@ def get_jobs(environment: Environment, server: str, folder: str) -> "Workflow": "server": server, "folder": folder, "format": "json", - "useArrayFormat": "true" + ##"useArrayFormat": "true" } # Query the deployed folders and jobs raw_response = client.deploy_api.get_deployed_folders_new(**query_params) # Parse the raw response safely into a Python dictionary - folders_data = ast.literal_eval(raw_response) + folders_data = raw_response # Initialize an empty workflow with default settings workflow = Workflow(environment, WorkflowDefaults(run_as='default_user'))